diff options
author | Sergey M. <dstftw@gmail.com> | 2015-06-29 20:58:52 +0500 |
---|---|---|
committer | Sergey M. <dstftw@gmail.com> | 2015-06-29 20:58:52 +0500 |
commit | dc2bd20e5599b4bc32d0cf68af402d9b972a309e (patch) | |
tree | 1cc4781de41dd926d83e1e7c2f322b59234bb734 /youtube_dl | |
parent | c608ee491f48820139491b6363e48ef151cc6d8c (diff) | |
parent | 1b5a1ae257c6d64fd69ea91eaf69328d4b6d17df (diff) |
Merge pull request #6098 from dstftw/use-codecs-from-dash-manifest
[youtube] Pick up codecs info from DASH manifest when not set explicitly
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/youtube.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 036793fc0..c28ca9319 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -840,6 +840,12 @@ class YoutubeIE(YoutubeBaseInfoExtractor): except StopIteration: full_info = self._formats.get(format_id, {}).copy() full_info.update(f) + codecs = r.attrib.get('codecs') + if codecs: + if full_info.get('acodec') == 'none' and 'vcodec' not in full_info: + full_info['vcodec'] = codecs + elif full_info.get('vcodec') == 'none' and 'acodec' not in full_info: + full_info['acodec'] = codecs formats.append(full_info) else: existing_format.update(f) |