mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-25 00:00:48 +01:00
[extractor/common] Use float for scaled tbr
This commit is contained in:
parent
ffbc8386b9
commit
9c99bef704
@ -1420,7 +1420,9 @@ def build_stream_name():
|
|||||||
elif line.startswith('#') or not line.strip():
|
elif line.startswith('#') or not line.strip():
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
tbr = int_or_none(last_stream_inf.get('AVERAGE-BANDWIDTH') or last_stream_inf.get('BANDWIDTH'), scale=1000)
|
tbr = float_or_none(
|
||||||
|
last_stream_inf.get('AVERAGE-BANDWIDTH') or
|
||||||
|
last_stream_inf.get('BANDWIDTH'), scale=1000)
|
||||||
format_id = []
|
format_id = []
|
||||||
if m3u8_id:
|
if m3u8_id:
|
||||||
format_id.append(m3u8_id)
|
format_id.append(m3u8_id)
|
||||||
@ -1850,7 +1852,7 @@ def extract_Initialization(source):
|
|||||||
'ext': mimetype2ext(mime_type),
|
'ext': mimetype2ext(mime_type),
|
||||||
'width': int_or_none(representation_attrib.get('width')),
|
'width': int_or_none(representation_attrib.get('width')),
|
||||||
'height': int_or_none(representation_attrib.get('height')),
|
'height': int_or_none(representation_attrib.get('height')),
|
||||||
'tbr': int_or_none(bandwidth, 1000),
|
'tbr': float_or_none(bandwidth, 1000),
|
||||||
'asr': int_or_none(representation_attrib.get('audioSamplingRate')),
|
'asr': int_or_none(representation_attrib.get('audioSamplingRate')),
|
||||||
'fps': int_or_none(representation_attrib.get('frameRate')),
|
'fps': int_or_none(representation_attrib.get('frameRate')),
|
||||||
'language': lang if lang not in ('mul', 'und', 'zxx', 'mis') else None,
|
'language': lang if lang not in ('mul', 'und', 'zxx', 'mis') else None,
|
||||||
|
Loading…
Reference in New Issue
Block a user