1
0
Fork 0

ffmpeg: ignore extra data streams with -dn (fixes #2)

Sometimes, video files will arrive with a timecode data stream
that causes `-map 0` to error out due to the stream not being
supported in the output container. These data streams generally do
not matter, so tell ffmpeg to ignore them rather than choking on
them.
This commit is contained in:
Jody Bruchon 2021-01-07 12:26:50 -05:00
commit e0da59fe54
2 changed files with 7 additions and 7 deletions

View file

@ -96,7 +96,7 @@ class EmbedThumbnailPP(FFmpegPostProcessor):
os.rename(encodeFilename(old_thumbnail_filename), encodeFilename(thumbnail_filename))
options = [
'-c', 'copy', '-map', '0',
'-c', 'copy', '-map', '0', '-dn',
'-attach', thumbnail_filename, '-metadata:s:t', 'mimetype=image/jpeg']
self._downloader.to_screen('[ffmpeg] Adding thumbnail to "%s"' % filename)