Skip to content

Commit

Permalink
EmbedThumbnail - support m4v extention
Browse files Browse the repository at this point in the history
Some platforms can serve m4v for mpeg video, this commit simply
adds support for embedding thumbnails into m4v files.

Tested with both AtomicParsley and Mutagen. It is possible that
m4v files could include DRM, but I don't have any DRM m4v files
to test on. The existing error handling should probably be fine
in those cases.
  • Loading branch information
Neurognostic committed Jul 13, 2023
1 parent 2cfe221 commit 1bbf619
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions yt_dlp/postprocessor/embedthumbnail.py
Expand Up @@ -114,7 +114,7 @@ def run(self, info):
self._report_run('ffmpeg', filename)
self.run_ffmpeg(filename, temp_filename, options)

elif info['ext'] in ['m4a', 'mp4', 'mov']:
elif info['ext'] in ['m4a', 'mp4', 'm4v', 'mov']:
prefer_atomicparsley = 'embed-thumbnail-atomicparsley' in self.get_param('compat_opts', [])
# Method 1: Use mutagen
if not mutagen or prefer_atomicparsley:
Expand Down Expand Up @@ -213,7 +213,7 @@ def run(self, info):
temp_filename = filename

else:
raise EmbedThumbnailPPError('Supported filetypes for thumbnail embedding are: mp3, mkv/mka, ogg/opus/flac, m4a/mp4/mov')
raise EmbedThumbnailPPError('Supported filetypes for thumbnail embedding are: mp3, mkv/mka, ogg/opus/flac, m4a/mp4/m4v/mov')

if success and temp_filename != filename:
os.replace(temp_filename, filename)
Expand Down

0 comments on commit 1bbf619

Please sign in to comment.