Use the -copy_unknown flag in the stream copy otions

Also split the yield expression as the comment above was a bit
misleading (it was only related to the `-dn` flag).
This commit is contained in:
Riteo 2024-08-13 22:29:11 +02:00
parent ba3a7232f0
commit 550b3a046a

View File

@ -221,7 +221,12 @@ class FFmpegPostProcessor(PostProcessor):
yield from ('-map', '0') yield from ('-map', '0')
# Don't copy Apple TV chapters track, bin_data # Don't copy Apple TV chapters track, bin_data
# See https://github.com/yt-dlp/yt-dlp/issues/2, #19042, #19024, https://trac.ffmpeg.org/ticket/6016 # See https://github.com/yt-dlp/yt-dlp/issues/2, #19042, #19024, https://trac.ffmpeg.org/ticket/6016
yield from ('-dn', '-ignore_unknown') yield '-dn'
# Some streams, such as JSON attachments, are considered of unknown
# type by FFmpeg but we still want to copy them.
yield '-copy_unknown'
if copy: if copy:
yield from ('-c', 'copy') yield from ('-c', 'copy')
if ext in ('mp4', 'mov', 'm4a'): if ext in ('mp4', 'mov', 'm4a'):