mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-04 20:36:44 +00:00
extract audio channels from HLS streams
This commit is contained in:
parent
22df97f9c5
commit
0b6f0e18d9
|
@ -2274,6 +2274,9 @@ def extract_media(x_media_line):
|
||||||
subtitles.setdefault(lang, []).append(sub_info)
|
subtitles.setdefault(lang, []).append(sub_info)
|
||||||
if media_type not in ('VIDEO', 'AUDIO'):
|
if media_type not in ('VIDEO', 'AUDIO'):
|
||||||
return
|
return
|
||||||
|
channels = media.get('CHANNELS')
|
||||||
|
if not channels is None and channels.isDigit():
|
||||||
|
channels = int(channels)
|
||||||
media_url = media.get('URI')
|
media_url = media.get('URI')
|
||||||
if media_url:
|
if media_url:
|
||||||
manifest_url = format_url(media_url)
|
manifest_url = format_url(media_url)
|
||||||
|
@ -2284,6 +2287,7 @@ def extract_media(x_media_line):
|
||||||
'url': manifest_url,
|
'url': manifest_url,
|
||||||
'manifest_url': m3u8_url,
|
'manifest_url': m3u8_url,
|
||||||
'language': media.get('LANGUAGE'),
|
'language': media.get('LANGUAGE'),
|
||||||
|
'audio_channels': channels,
|
||||||
'ext': ext,
|
'ext': ext,
|
||||||
'protocol': entry_protocol,
|
'protocol': entry_protocol,
|
||||||
'preference': preference,
|
'preference': preference,
|
||||||
|
|
Loading…
Reference in a new issue