mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-12-22 20:20:09 +09:00
[cbc:watch] extract audio codec for audion only formats(fixes #11893)
This commit is contained in:
parent
8bdc149441
commit
81aeafeb44
@ -296,6 +296,12 @@ class CBCWatchVideoIE(CBCWatchBaseIE):
|
|||||||
formats = self._extract_m3u8_formats(re.sub(r'/([^/]+)/[^/?]+\.m3u8', r'/\1/\1.m3u8', m3u8_url), video_id, 'mp4', fatal=False)
|
formats = self._extract_m3u8_formats(re.sub(r'/([^/]+)/[^/?]+\.m3u8', r'/\1/\1.m3u8', m3u8_url), video_id, 'mp4', fatal=False)
|
||||||
if len(formats) < 2:
|
if len(formats) < 2:
|
||||||
formats = self._extract_m3u8_formats(m3u8_url, video_id, 'mp4')
|
formats = self._extract_m3u8_formats(m3u8_url, video_id, 'mp4')
|
||||||
|
for f in formats:
|
||||||
|
format_id = f.get('format_id')
|
||||||
|
if format_id.startswith('AAC'):
|
||||||
|
f['acodec'] = 'aac'
|
||||||
|
elif format_id.startswith('AC3'):
|
||||||
|
f['acodec'] = 'ac-3'
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
|
||||||
info = {
|
info = {
|
||||||
|
Loading…
Reference in New Issue
Block a user