1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2025-02-16 17:07:54 +01:00

Include vbr (or abr) in format_id if available, otherwise use media_type only

This commit is contained in:
Frank Aurich 2020-10-19 22:45:13 +02:00
parent 5d8a120efa
commit d4ad744cd1

View File

@ -141,12 +141,16 @@ class MDRIE(InfoExtractor):
f = {
'url': video_url,
'filesize': filesize,
'format_id': media_type,
'vbr': vbr,
'abr': abr,
'preference': 1,
}
if vbr or abr:
f.update({
'format_id': '%s-%d' % (media_type, vbr or abr)})
else:
f.update({'format_id': media_type})
if vbr:
width = int_or_none(xpath_text(asset, './frameWidth', 'width'))
height = int_or_none(xpath_text(asset, './frameHeight', 'height'))