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
1 changed files with 6 additions and 2 deletions

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'))