From e858a9d6d38f472e608913dadab4b8d703f45aaf Mon Sep 17 00:00:00 2001 From: pukkandan Date: Tue, 15 Jun 2021 15:04:49 +0530 Subject: [EmbedThumbnail] Add compat-option `embed-thumbnail-atomicparsley` to force use of atomicparsley for embedding thumbnails in mp4 Related: #411 --- yt_dlp/postprocessor/embedthumbnail.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'yt_dlp/postprocessor/embedthumbnail.py') diff --git a/yt_dlp/postprocessor/embedthumbnail.py b/yt_dlp/postprocessor/embedthumbnail.py index 3ac00b79a..3427b2cb4 100644 --- a/yt_dlp/postprocessor/embedthumbnail.py +++ b/yt_dlp/postprocessor/embedthumbnail.py @@ -125,8 +125,9 @@ class EmbedThumbnailPP(FFmpegPostProcessor): self.run_ffmpeg(filename, temp_filename, options) elif info['ext'] in ['m4a', 'mp4', 'mov']: + prefer_atomicparsley = 'embed-thumbnail-atomicparsley' in self.get_param('compat_opts', []) # Method 1: Use mutagen - if not has_mutagen: + if not has_mutagen or prefer_atomicparsley: success = False else: try: @@ -145,7 +146,7 @@ class EmbedThumbnailPP(FFmpegPostProcessor): success = False # Method 2: Use ffmpeg+ffprobe - if not success: + if not success and not prefer_atomicparsley: success = True try: options = ['-c', 'copy', '-map', '0', '-dn', '-map', '1'] -- cgit v1.2.3