]> jfr.im git - yt-dlp.git/commitdiff
[pp/FFmpegMetadata] Embed stream metadata in single format downloads (#8647)
authorbashonly <redacted>
Sun, 26 Nov 2023 02:40:09 +0000 (20:40 -0600)
committerGitHub <redacted>
Sun, 26 Nov 2023 02:40:09 +0000 (02:40 +0000)
Closes #8568
Authored by: bashonly

yt_dlp/postprocessor/ffmpeg.py

index 323f4303c0b5140af648c9f0fcf5f7d35d734f88..7c904417baefcda495bb809049efcbf96f0fbd79 100644 (file)
@@ -780,7 +780,7 @@ def add(meta_list, info_list=None):
             yield ('-metadata', f'{name}={value}')
 
         stream_idx = 0
-        for fmt in info.get('requested_formats') or []:
+        for fmt in info.get('requested_formats') or [info]:
             stream_count = 2 if 'none' not in (fmt.get('vcodec'), fmt.get('acodec')) else 1
             lang = ISO639Utils.short2long(fmt.get('language') or '') or fmt.get('language')
             for i in range(stream_idx, stream_idx + stream_count):