| 526 | _args_key = 'animation.ffmpeg_args' |
| 527 | |
| 528 | def _supports_transparency(self): |
| 529 | suffix = Path(self.outfile).suffix |
| 530 | if suffix in {'.apng', '.avif', '.gif', '.webm', '.webp'}: |
| 531 | return True |
| 532 | # This list was found by going through `ffmpeg -codecs` for video encoders, |
| 533 | # running them with _support_transparency() forced to True, and checking that |
| 534 | # the "Pixel format" in Kdenlive included alpha. Note this is not a guarantee |
| 535 | # that transparency will work; you may also need to pass `-pix_fmt`, but we |
| 536 | # trust the user has done so if they are asking for these formats. |
| 537 | return self.codec in { |
| 538 | 'apng', 'avrp', 'bmp', 'cfhd', 'dpx', 'ffv1', 'ffvhuff', 'gif', 'huffyuv', |
| 539 | 'jpeg2000', 'ljpeg', 'png', 'prores', 'prores_aw', 'prores_ks', 'qtrle', |
| 540 | 'rawvideo', 'targa', 'tiff', 'utvideo', 'v408', } |
| 541 | |
| 542 | @property |
| 543 | def output_args(self): |