mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-12-07 15:25:12 +01:00
[EmbedThumbnail] Add compat-option embed-thumbnail-atomicparsley
to force use of atomicparsley for embedding thumbnails in mp4 Related: #411
This commit is contained in:
parent
7e87e27c52
commit
e858a9d6d3
4 changed files with 8 additions and 4 deletions
|
|
@ -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']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue