mirror of
https://codeberg.org/polarisfm/youtube-dl.git
synced 2024-12-24 00:32:34 +00:00
[kaltura] Improve audio detection
This commit is contained in:
parent
e8bcd982cc
commit
1d16035bb4
1 changed files with 5 additions and 1 deletions
|
@ -268,6 +268,10 @@ class KalturaIE(InfoExtractor):
|
||||||
continue
|
continue
|
||||||
video_url = sign_url(
|
video_url = sign_url(
|
||||||
'%s/flavorId/%s' % (data_url, f['id']))
|
'%s/flavorId/%s' % (data_url, f['id']))
|
||||||
|
# audio-only has no videoCodecId (e.g. kaltura:1926081:0_c03e1b5g
|
||||||
|
# -f mp4-56)
|
||||||
|
vcodec = 'none' if 'videoCodecId' not in f and f.get(
|
||||||
|
'frameRate') == 0 else f.get('videoCodecId')
|
||||||
formats.append({
|
formats.append({
|
||||||
'format_id': '%(fileExt)s-%(bitrate)s' % f,
|
'format_id': '%(fileExt)s-%(bitrate)s' % f,
|
||||||
'ext': f.get('fileExt'),
|
'ext': f.get('fileExt'),
|
||||||
|
@ -275,7 +279,7 @@ class KalturaIE(InfoExtractor):
|
||||||
'fps': int_or_none(f.get('frameRate')),
|
'fps': int_or_none(f.get('frameRate')),
|
||||||
'filesize_approx': int_or_none(f.get('size'), invscale=1024),
|
'filesize_approx': int_or_none(f.get('size'), invscale=1024),
|
||||||
'container': f.get('containerFormat'),
|
'container': f.get('containerFormat'),
|
||||||
'vcodec': f.get('videoCodecId'),
|
'vcodec': vcodec,
|
||||||
'height': int_or_none(f.get('height')),
|
'height': int_or_none(f.get('height')),
|
||||||
'width': int_or_none(f.get('width')),
|
'width': int_or_none(f.get('width')),
|
||||||
'url': video_url,
|
'url': video_url,
|
||||||
|
|
Loading…
Reference in a new issue