mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
[youtube] Fix parsing codecs (closes #12091)
This commit is contained in:
parent
8d38dafbbf
commit
6310acf512
1 changed files with 2 additions and 9 deletions
|
@ -34,6 +34,7 @@
|
|||
int_or_none,
|
||||
mimetype2ext,
|
||||
orderedSet,
|
||||
parse_codecs,
|
||||
parse_duration,
|
||||
remove_quotes,
|
||||
remove_start,
|
||||
|
@ -1696,15 +1697,7 @@ def _map_to_format_list(urlmap):
|
|||
codecs = mobj.group('val')
|
||||
break
|
||||
if codecs:
|
||||
codecs = codecs.split(',')
|
||||
if len(codecs) == 2:
|
||||
acodec, vcodec = codecs[1], codecs[0]
|
||||
else:
|
||||
acodec, vcodec = (codecs[0], 'none') if kind == 'audio' else ('none', codecs[0])
|
||||
dct.update({
|
||||
'acodec': acodec,
|
||||
'vcodec': vcodec,
|
||||
})
|
||||
dct.update(parse_codecs(codecs))
|
||||
formats.append(dct)
|
||||
elif video_info.get('hlsvp'):
|
||||
manifest_url = video_info['hlsvp'][0]
|
||||
|
|
Loading…
Reference in a new issue