diff options
Diffstat (limited to 'yt_dlp')
-rw-r--r-- | yt_dlp/YoutubeDL.py | 5 | ||||
-rw-r--r-- | yt_dlp/__init__.py | 1 | ||||
-rw-r--r-- | yt_dlp/postprocessor/embedthumbnail.py | 5 |
3 files changed, 7 insertions, 4 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 6d54b2808..f60b7eec9 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -391,8 +391,9 @@ class YoutubeDL(object): compat_opts: Compatibility options. See "Differences in default behavior". Note that only format-sort, format-spec, no-live-chat, no-attach-info-json, playlist-index, list-formats, - no-direct-merge, no-youtube-channel-redirect, - and no-youtube-unavailable-videos works when used via the API + no-direct-merge, embed-thumbnail-atomicparsley, + no-youtube-unavailable-videos, no-youtube-channel-redirect, + works when used via the API The following parameters are not used by YoutubeDL itself, they are used by the downloader (see yt_dlp/downloader/common.py): diff --git a/yt_dlp/__init__.py b/yt_dlp/__init__.py index 6d6b0dd66..728b3321f 100644 --- a/yt_dlp/__init__.py +++ b/yt_dlp/__init__.py @@ -268,6 +268,7 @@ def _real_main(argv=None): 'filename', 'format-sort', 'abort-on-error', 'format-spec', 'no-playlist-metafiles', 'multistreams', 'no-live-chat', 'playlist-index', 'list-formats', 'no-direct-merge', 'no-youtube-channel-redirect', 'no-youtube-unavailable-videos', 'no-attach-info-json', + 'embed-thumbnail-atomicparsley', ] compat_opts = parse_compat_opts() 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'] |