0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-10 00:25:06 +00:00

[FFmpegThumbnailsConvertor] Fix conversion from GIF

Closes #2988
This commit is contained in:
pukkandan 2022-08-01 07:14:32 +05:30
parent 30389593c2
commit 5f2a7f7c4a
No known key found for this signature in database
GPG key ID: 7EEE9E1E817D0A39

View file

@ -1083,8 +1083,9 @@ def convert_thumbnail(self, thumbnail_filename, target_ext):
thumbnail_conv_filename = replace_extension(thumbnail_filename, target_ext)
self.to_screen(f'Converting thumbnail "{thumbnail_filename}" to {target_ext}')
_, source_ext = os.path.splitext(thumbnail_filename)
self.real_run_ffmpeg(
[(thumbnail_filename, ['-f', 'image2', '-pattern_type', 'none'])],
[(thumbnail_filename, [] if source_ext == '.gif' else ['-f', 'image2', '-pattern_type', 'none'])],
[(thumbnail_conv_filename.replace('%', '%%'), self._options(target_ext))])
return thumbnail_conv_filename