Use media_type as format_id, and set vbr and abr separately.
This commit is contained in:
parent
2dfbb6c4d7
commit
5d8a120efa
@ -141,14 +141,12 @@ class MDRIE(InfoExtractor):
|
|||||||
f = {
|
f = {
|
||||||
'url': video_url,
|
'url': video_url,
|
||||||
'filesize': filesize,
|
'filesize': filesize,
|
||||||
|
'format_id': media_type,
|
||||||
|
'vbr': vbr,
|
||||||
'abr': abr,
|
'abr': abr,
|
||||||
'preference': 1,
|
'preference': 1,
|
||||||
}
|
}
|
||||||
|
|
||||||
if vbr or abr:
|
|
||||||
f.update({
|
|
||||||
'format_id': '%s-%d' % (media_type, vbr or abr)})
|
|
||||||
|
|
||||||
if vbr:
|
if vbr:
|
||||||
width = int_or_none(xpath_text(asset, './frameWidth', 'width'))
|
width = int_or_none(xpath_text(asset, './frameWidth', 'width'))
|
||||||
height = int_or_none(xpath_text(asset, './frameHeight', 'height'))
|
height = int_or_none(xpath_text(asset, './frameHeight', 'height'))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user