1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-20 01:42:50 +01:00

[pp/FFmpegMetadata] Embed stream metadata in single format downloads (#8647)

Closes #8568
Authored by: bashonly
This commit is contained in:
bashonly 2023-11-25 20:40:09 -06:00 committed by GitHub
parent bb5a54e6db
commit deeb13eae8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -780,7 +780,7 @@ def add(meta_list, info_list=None):
yield ('-metadata', f'{name}={value}') yield ('-metadata', f'{name}={value}')
stream_idx = 0 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 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') lang = ISO639Utils.short2long(fmt.get('language') or '') or fmt.get('language')
for i in range(stream_idx, stream_idx + stream_count): for i in range(stream_idx, stream_idx + stream_count):