mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 03:03:01 +00:00
[common] Prefer the manifest than formats_dict in determining codecs
This commit is contained in:
parent
5ea1eb78f5
commit
df374b5222
1 changed files with 9 additions and 4 deletions
|
@ -1376,10 +1376,15 @@ def _add_ns(tag):
|
||||||
full_info.update(f)
|
full_info.update(f)
|
||||||
codecs = r.attrib.get('codecs')
|
codecs = r.attrib.get('codecs')
|
||||||
if codecs:
|
if codecs:
|
||||||
if full_info.get('acodec') == 'none':
|
if mime_type.startswith('video/'):
|
||||||
full_info['vcodec'] = codecs
|
vcodec, acodec = codecs, 'none'
|
||||||
elif full_info.get('vcodec') == 'none':
|
else: # mime_type.startswith('audio/')
|
||||||
full_info['acodec'] = codecs
|
vcodec, acodec = 'none', codecs
|
||||||
|
|
||||||
|
full_info.update({
|
||||||
|
'vcodec': vcodec,
|
||||||
|
'acodec': acodec,
|
||||||
|
})
|
||||||
formats.append(full_info)
|
formats.append(full_info)
|
||||||
else:
|
else:
|
||||||
existing_format.update(f)
|
existing_format.update(f)
|
||||||
|
|
Loading…
Reference in a new issue