diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py index bebbc6b43..9628a876c 100644 --- a/yt_dlp/extractor/common.py +++ b/yt_dlp/extractor/common.py @@ -2211,6 +2211,12 @@ def build_stream_name(): 'quality': quality, 'has_drm': has_drm, } + + # YouTube Specific + if last_stream_inf.get('YT-EXT-AUDIO-CONTENT-ID'): + # Strip anything after and including from the end '.' + f['language'] = last_stream_inf.get('YT-EXT-AUDIO-CONTENT-ID').split('.')[0] + resolution = last_stream_inf.get('RESOLUTION') if resolution: mobj = re.search(r'(?P\d+)[xX](?P\d+)', resolution)