From 81b6102d2099eec78a2db9ae3d101a8503dd4f25 Mon Sep 17 00:00:00 2001 From: nixxo Date: Fri, 30 Sep 2022 19:33:29 +0200 Subject: [downloader/ism] Support ec-3 codec (#5004) Closes #296 Authored by: nixxo --- yt_dlp/extractor/common.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'yt_dlp/extractor/common.py') diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py index d36f025ab..11e715871 100644 --- a/yt_dlp/extractor/common.py +++ b/yt_dlp/extractor/common.py @@ -3124,9 +3124,10 @@ class InfoExtractor: stream_name = stream.get('Name') stream_language = stream.get('Language', 'und') for track in stream.findall('QualityLevel'): - fourcc = track.get('FourCC') or ('AACL' if track.get('AudioTag') == '255' else None) + KNOWN_TAGS = {'255': 'AACL', '65534': 'EC-3'} + fourcc = track.get('FourCC') or KNOWN_TAGS.get(track.get('AudioTag')) # TODO: add support for WVC1 and WMAP - if fourcc not in ('H264', 'AVC1', 'AACL', 'TTML'): + if fourcc not in ('H264', 'AVC1', 'AACL', 'TTML', 'EC-3'): self.report_warning('%s is not a supported codec' % fourcc) continue tbr = int(track.attrib['Bitrate']) // 1000 -- cgit v1.2.3