mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-30 16:42:57 +01:00
[limelight] improve extraction for audio only formats
This commit is contained in:
parent
91399b2fcc
commit
a6f3a162f3
@ -62,13 +62,21 @@ def _extract_info(self, streams, mobile_urls, properties):
|
|||||||
fmt = {
|
fmt = {
|
||||||
'url': stream_url,
|
'url': stream_url,
|
||||||
'abr': float_or_none(stream.get('audioBitRate')),
|
'abr': float_or_none(stream.get('audioBitRate')),
|
||||||
'vbr': float_or_none(stream.get('videoBitRate')),
|
|
||||||
'fps': float_or_none(stream.get('videoFrameRate')),
|
'fps': float_or_none(stream.get('videoFrameRate')),
|
||||||
'width': int_or_none(stream.get('videoWidthInPixels')),
|
|
||||||
'height': int_or_none(stream.get('videoHeightInPixels')),
|
|
||||||
'ext': ext,
|
'ext': ext,
|
||||||
}
|
}
|
||||||
rtmp = re.search(r'^(?P<url>rtmpe?://(?P<host>[^/]+)/(?P<app>.+))/(?P<playpath>mp4:.+)$', stream_url)
|
width = int_or_none(stream.get('videoWidthInPixels'))
|
||||||
|
height = int_or_none(stream.get('videoHeightInPixels'))
|
||||||
|
vbr = float_or_none(stream.get('videoBitRate'))
|
||||||
|
if width or height or vbr:
|
||||||
|
fmt.update({
|
||||||
|
'width': width,
|
||||||
|
'height': height,
|
||||||
|
'vbr': vbr,
|
||||||
|
})
|
||||||
|
else:
|
||||||
|
fmt['vcodec'] = 'none'
|
||||||
|
rtmp = re.search(r'^(?P<url>rtmpe?://(?P<host>[^/]+)/(?P<app>.+))/(?P<playpath>mp[34]:.+)$', stream_url)
|
||||||
if rtmp:
|
if rtmp:
|
||||||
format_id = 'rtmp'
|
format_id = 'rtmp'
|
||||||
if stream.get('videoBitRate'):
|
if stream.get('videoBitRate'):
|
||||||
|
Loading…
Reference in New Issue
Block a user