mirror of
https://github.com/l1ving/youtube-dl
synced 2025-01-24 13:22:55 +08:00
[seznamzpravy] Add more metadata for SDN streams
This commit is contained in:
parent
d4be9c663e
commit
0b74f2f934
@ -44,12 +44,21 @@ class SeznamZpravyIE(InfoExtractor):
|
|||||||
width, height = fmtdata.get('resolution')
|
width, height = fmtdata.get('resolution')
|
||||||
except (TypeError, ValueError):
|
except (TypeError, ValueError):
|
||||||
width, height = None, None
|
width, height = None, None
|
||||||
|
tbr = int_or_none(fmtdata['bandwidth'])
|
||||||
|
if tbr:
|
||||||
|
tbr = int(tbr / 1000)
|
||||||
|
duration = int_or_none(fmtdata['duration'])
|
||||||
|
if duration:
|
||||||
|
duration = int(duration / 1000)
|
||||||
|
|
||||||
formats.append({
|
formats.append({
|
||||||
'format_id': fmt,
|
'format_id': fmt,
|
||||||
'width': int_or_none(width),
|
'width': int_or_none(width),
|
||||||
'height': int_or_none(height),
|
'height': int_or_none(height),
|
||||||
'url': urljoin(sdn_url, relative_url),
|
'url': urljoin(sdn_url, relative_url),
|
||||||
|
'vcodec': fmtdata.get('codec'),
|
||||||
|
'tbr': tbr,
|
||||||
|
'duration': duration,
|
||||||
})
|
})
|
||||||
|
|
||||||
playlists = sdn_data.get('pls', {})
|
playlists = sdn_data.get('pls', {})
|
||||||
|
Loading…
Reference in New Issue
Block a user