Browse Source

[youtube] Pick up codecs info from DASH manifest when not set explicitly

totalwebcasting
Sergey M․ 9 years ago
parent
commit
1b5a1ae257
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      youtube_dl/extractor/youtube.py

+ 6
- 0
youtube_dl/extractor/youtube.py View File

@ -824,6 +824,12 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
except StopIteration: except StopIteration:
full_info = self._formats.get(format_id, {}).copy() full_info = self._formats.get(format_id, {}).copy()
full_info.update(f) 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) formats.append(full_info)
else: else:
existing_format.update(f) existing_format.update(f)


Loading…
Cancel
Save