From 89ce723eddb1b07727d0c051cfaa8ad0e92bd1df Mon Sep 17 00:00:00 2001 From: Ashish <39122144+Ashish0804@users.noreply.github.com> Date: Thu, 29 Jul 2021 09:57:09 +0530 Subject: [PATCH] [Mxplayer] Add h265 formats (#572) Authored by: Ashish0804 --- yt_dlp/extractor/mxplayer.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/yt_dlp/extractor/mxplayer.py b/yt_dlp/extractor/mxplayer.py index dd05f82ef..0bad51d15 100644 --- a/yt_dlp/extractor/mxplayer.py +++ b/yt_dlp/extractor/mxplayer.py @@ -110,10 +110,15 @@ def _real_extract(self, url): for frmt in dash_formats: frmt['quality'] = get_quality(quality) formats.extend(dash_formats) + dash_formats_h265 = self._extract_mpd_formats( + format_url.replace('h264_high', 'h265_main'), video_id, mpd_id='dash-%s' % quality, headers={'Referer': url}, fatal=False) + for frmt in dash_formats_h265: + frmt['quality'] = get_quality(quality) + formats.extend(dash_formats_h265) elif stream_type == 'hls': formats.extend(self._extract_m3u8_formats( format_url, video_id, fatal=False, - m3u8_id='hls-%s' % quality, quality=get_quality(quality))) + m3u8_id='hls-%s' % quality, quality=get_quality(quality), ext='mp4')) self._sort_formats(formats) return {