mirror of
https://github.com/yt-dlp/yt-dlp
synced 2024-12-27 21:59:17 +01:00
parent
705e7c2005
commit
fee3f44f5f
1 changed files with 6 additions and 2 deletions
|
@ -8,6 +8,8 @@ from ..utils import (
|
||||||
ExtractorError,
|
ExtractorError,
|
||||||
float_or_none,
|
float_or_none,
|
||||||
int_or_none,
|
int_or_none,
|
||||||
|
try_get,
|
||||||
|
parse_codecs,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -29,7 +31,7 @@ class StreamableIE(InfoExtractor):
|
||||||
'view_count': int,
|
'view_count': int,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
# older video without bitrate, width/height, etc. info
|
# older video without bitrate, width/height, codecs, etc. info
|
||||||
{
|
{
|
||||||
'url': 'https://streamable.com/moo',
|
'url': 'https://streamable.com/moo',
|
||||||
'md5': '2cf6923639b87fba3279ad0df3a64e73',
|
'md5': '2cf6923639b87fba3279ad0df3a64e73',
|
||||||
|
@ -95,7 +97,9 @@ class StreamableIE(InfoExtractor):
|
||||||
'height': int_or_none(info.get('height')),
|
'height': int_or_none(info.get('height')),
|
||||||
'filesize': int_or_none(info.get('size')),
|
'filesize': int_or_none(info.get('size')),
|
||||||
'fps': int_or_none(info.get('framerate')),
|
'fps': int_or_none(info.get('framerate')),
|
||||||
'vbr': float_or_none(info.get('bitrate'), 1000)
|
'vbr': float_or_none(info.get('bitrate'), 1000),
|
||||||
|
'vcodec': parse_codecs(try_get(info, lambda x: x['input_metadata']['video_codec_name'])).get('vcodec'),
|
||||||
|
'acodec': parse_codecs(try_get(info, lambda x: x['input_metadata']['audio_codec_name'])).get('acodec'),
|
||||||
})
|
})
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue