diff options
author | Remita Amine <remitamine@gmail.com> | 2017-02-02 08:07:06 +0100 |
---|---|---|
committer | Remita Amine <remitamine@gmail.com> | 2017-02-02 08:07:28 +0100 |
commit | 81aeafeb44a16b341e47c3bb85d288252a095eda (patch) | |
tree | 015f2e2ddc0120fd4dbe6637caf5e630d433bae3 /youtube_dl/extractor | |
parent | 8bdc149441a86e01c56946090087c005a525260e (diff) | |
download | youtube-dl-81aeafeb44a16b341e47c3bb85d288252a095eda.tar.xz |
[cbc:watch] extract audio codec for audion only formats(fixes #11893)
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r-- | youtube_dl/extractor/cbc.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/youtube_dl/extractor/cbc.py b/youtube_dl/extractor/cbc.py index a291685bf..cf678e7f8 100644 --- a/youtube_dl/extractor/cbc.py +++ b/youtube_dl/extractor/cbc.py @@ -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) if len(formats) < 2: 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) info = { |