1
0
Fork 0
mirror of https://github.com/blackjack4494/yt-dlc.git synced 2024-12-23 00:07:49 +00:00

Merge pull request #6098 from dstftw/use-codecs-from-dash-manifest

[youtube] Pick up codecs info from DASH manifest when not set explicitly
This commit is contained in:
Sergey M. 2015-06-29 20:58:52 +05:00
commit dc2bd20e55

View file

@ -840,6 +840,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)