]> jfr.im git - yt-dlp.git/commitdiff
[extractor] Always prefer native hls downloader by default
authorpukkandan <redacted>
Sat, 22 May 2021 18:28:11 +0000 (23:58 +0530)
committerpukkandan <redacted>
Tue, 25 May 2021 19:57:39 +0000 (01:27 +0530)
When the manifest is not downloadable by native downloader, it already is able to detect it and switch to `ffmpeg`. So there doesn't seem to be a reason anymore to use ffmpeg as the preferred downloader

test/test_InfoExtractor.py
yt_dlp/extractor/common.py
yt_dlp/extractor/egghead.py
yt_dlp/extractor/odnoklassniki.py
yt_dlp/extractor/whowatch.py

index f3578efe102ad4ba25d2471ea1ccfd61ef3fd0db..c4b7f689e3210efabddaa48d49c6ed0c60394749 100644 (file)
@@ -450,7 +450,7 @@ def test_parse_m3u8_formats(self):
                     'manifest_url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/master.m3u8',
                     'language': 'en',
                     'ext': 'mp4',
-                    'protocol': 'm3u8',
+                    'protocol': 'm3u8_native',
                     'audio_ext': 'mp4',
                 }, {
                     'format_id': 'aud2-English',
@@ -458,7 +458,7 @@ def test_parse_m3u8_formats(self):
                     'manifest_url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/master.m3u8',
                     'language': 'en',
                     'ext': 'mp4',
-                    'protocol': 'm3u8',
+                    'protocol': 'm3u8_native',
                     'audio_ext': 'mp4',
                 }, {
                     'format_id': 'aud3-English',
@@ -466,14 +466,14 @@ def test_parse_m3u8_formats(self):
                     'manifest_url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/master.m3u8',
                     'language': 'en',
                     'ext': 'mp4',
-                    'protocol': 'm3u8',
+                    'protocol': 'm3u8_native',
                     'audio_ext': 'mp4',
                 }, {
                     'format_id': '530',
                     'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/v2/prog_index.m3u8',
                     'manifest_url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/master.m3u8',
                     'ext': 'mp4',
-                    'protocol': 'm3u8',
+                    'protocol': 'm3u8_native',
                     'width': 480,
                     'height': 270,
                     'vcodec': 'avc1.640015',
@@ -482,7 +482,7 @@ def test_parse_m3u8_formats(self):
                     'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/v2/prog_index.m3u8',
                     'manifest_url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/master.m3u8',
                     'ext': 'mp4',
-                    'protocol': 'm3u8',
+                    'protocol': 'm3u8_native',
                     'width': 480,
                     'height': 270,
                     'vcodec': 'avc1.640015',
@@ -491,7 +491,7 @@ def test_parse_m3u8_formats(self):
                     'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/v2/prog_index.m3u8',
                     'manifest_url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/master.m3u8',
                     'ext': 'mp4',
-                    'protocol': 'm3u8',
+                    'protocol': 'm3u8_native',
                     'width': 480,
                     'height': 270,
                     'vcodec': 'avc1.640015',
@@ -500,7 +500,7 @@ def test_parse_m3u8_formats(self):
                     'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/v3/prog_index.m3u8',
                     'manifest_url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/master.m3u8',
                     'ext': 'mp4',
-                    'protocol': 'm3u8',
+                    'protocol': 'm3u8_native',
                     'width': 640,
                     'height': 360,
                     'vcodec': 'avc1.64001e',
@@ -509,7 +509,7 @@ def test_parse_m3u8_formats(self):
                     'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/v3/prog_index.m3u8',
                     'manifest_url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/master.m3u8',
                     'ext': 'mp4',
-                    'protocol': 'm3u8',
+                    'protocol': 'm3u8_native',
                     'width': 640,
                     'height': 360,
                     'vcodec': 'avc1.64001e',
@@ -518,7 +518,7 @@ def test_parse_m3u8_formats(self):
                     'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/v3/prog_index.m3u8',
                     'manifest_url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/master.m3u8',
                     'ext': 'mp4',
-                    'protocol': 'm3u8',
+                    'protocol': 'm3u8_native',
                     'width': 640,
                     'height': 360,
                     'vcodec': 'avc1.64001e',
@@ -527,7 +527,7 @@ def test_parse_m3u8_formats(self):
                     'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/v4/prog_index.m3u8',
                     'manifest_url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/master.m3u8',
                     'ext': 'mp4',
-                    'protocol': 'm3u8',
+                    'protocol': 'm3u8_native',
                     'width': 768,
                     'height': 432,
                     'vcodec': 'avc1.64001e',
@@ -536,7 +536,7 @@ def test_parse_m3u8_formats(self):
                     'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/v4/prog_index.m3u8',
                     'manifest_url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/master.m3u8',
                     'ext': 'mp4',
-                    'protocol': 'm3u8',
+                    'protocol': 'm3u8_native',
                     'width': 768,
                     'height': 432,
                     'vcodec': 'avc1.64001e',
@@ -545,7 +545,7 @@ def test_parse_m3u8_formats(self):
                     'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/v4/prog_index.m3u8',
                     'manifest_url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/master.m3u8',
                     'ext': 'mp4',
-                    'protocol': 'm3u8',
+                    'protocol': 'm3u8_native',
                     'width': 768,
                     'height': 432,
                     'vcodec': 'avc1.64001e',
@@ -554,7 +554,7 @@ def test_parse_m3u8_formats(self):
                     'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/v5/prog_index.m3u8',
                     'manifest_url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/master.m3u8',
                     'ext': 'mp4',
-                    'protocol': 'm3u8',
+                    'protocol': 'm3u8_native',
                     'width': 960,
                     'height': 540,
                     'vcodec': 'avc1.640020',
@@ -563,7 +563,7 @@ def test_parse_m3u8_formats(self):
                     'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/v5/prog_index.m3u8',
                     'manifest_url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/master.m3u8',
                     'ext': 'mp4',
-                    'protocol': 'm3u8',
+                    'protocol': 'm3u8_native',
                     'width': 960,
                     'height': 540,
                     'vcodec': 'avc1.640020',
@@ -572,7 +572,7 @@ def test_parse_m3u8_formats(self):
                     'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/v5/prog_index.m3u8',
                     'manifest_url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/master.m3u8',
                     'ext': 'mp4',
-                    'protocol': 'm3u8',
+                    'protocol': 'm3u8_native',
                     'width': 960,
                     'height': 540,
                     'vcodec': 'avc1.640020',
@@ -581,7 +581,7 @@ def test_parse_m3u8_formats(self):
                     'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/v6/prog_index.m3u8',
                     'manifest_url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/master.m3u8',
                     'ext': 'mp4',
-                    'protocol': 'm3u8',
+                    'protocol': 'm3u8_native',
                     'width': 1280,
                     'height': 720,
                     'vcodec': 'avc1.640020',
@@ -590,7 +590,7 @@ def test_parse_m3u8_formats(self):
                     'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/v6/prog_index.m3u8',
                     'manifest_url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/master.m3u8',
                     'ext': 'mp4',
-                    'protocol': 'm3u8',
+                    'protocol': 'm3u8_native',
                     'width': 1280,
                     'height': 720,
                     'vcodec': 'avc1.640020',
@@ -599,7 +599,7 @@ def test_parse_m3u8_formats(self):
                     'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/v6/prog_index.m3u8',
                     'manifest_url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/master.m3u8',
                     'ext': 'mp4',
-                    'protocol': 'm3u8',
+                    'protocol': 'm3u8_native',
                     'width': 1280,
                     'height': 720,
                     'vcodec': 'avc1.640020',
@@ -608,7 +608,7 @@ def test_parse_m3u8_formats(self):
                     'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/v7/prog_index.m3u8',
                     'manifest_url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/master.m3u8',
                     'ext': 'mp4',
-                    'protocol': 'm3u8',
+                    'protocol': 'm3u8_native',
                     'width': 1920,
                     'height': 1080,
                     'vcodec': 'avc1.64002a',
@@ -617,7 +617,7 @@ def test_parse_m3u8_formats(self):
                     'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/v7/prog_index.m3u8',
                     'manifest_url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/master.m3u8',
                     'ext': 'mp4',
-                    'protocol': 'm3u8',
+                    'protocol': 'm3u8_native',
                     'width': 1920,
                     'height': 1080,
                     'vcodec': 'avc1.64002a',
@@ -626,7 +626,7 @@ def test_parse_m3u8_formats(self):
                     'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/v7/prog_index.m3u8',
                     'manifest_url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/master.m3u8',
                     'ext': 'mp4',
-                    'protocol': 'm3u8',
+                    'protocol': 'm3u8_native',
                     'width': 1920,
                     'height': 1080,
                     'vcodec': 'avc1.64002a',
@@ -635,7 +635,7 @@ def test_parse_m3u8_formats(self):
                     'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/v8/prog_index.m3u8',
                     'manifest_url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/master.m3u8',
                     'ext': 'mp4',
-                    'protocol': 'm3u8',
+                    'protocol': 'm3u8_native',
                     'width': 1920,
                     'height': 1080,
                     'vcodec': 'avc1.64002a',
@@ -644,7 +644,7 @@ def test_parse_m3u8_formats(self):
                     'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/v8/prog_index.m3u8',
                     'manifest_url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/master.m3u8',
                     'ext': 'mp4',
-                    'protocol': 'm3u8',
+                    'protocol': 'm3u8_native',
                     'width': 1920,
                     'height': 1080,
                     'vcodec': 'avc1.64002a',
@@ -653,7 +653,7 @@ def test_parse_m3u8_formats(self):
                     'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/v8/prog_index.m3u8',
                     'manifest_url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/master.m3u8',
                     'ext': 'mp4',
-                    'protocol': 'm3u8',
+                    'protocol': 'm3u8_native',
                     'width': 1920,
                     'height': 1080,
                     'vcodec': 'avc1.64002a',
@@ -662,7 +662,7 @@ def test_parse_m3u8_formats(self):
                     'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/v9/prog_index.m3u8',
                     'manifest_url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/master.m3u8',
                     'ext': 'mp4',
-                    'protocol': 'm3u8',
+                    'protocol': 'm3u8_native',
                     'width': 1920,
                     'height': 1080,
                     'vcodec': 'avc1.64002a',
@@ -671,7 +671,7 @@ def test_parse_m3u8_formats(self):
                     'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/v9/prog_index.m3u8',
                     'manifest_url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/master.m3u8',
                     'ext': 'mp4',
-                    'protocol': 'm3u8',
+                    'protocol': 'm3u8_native',
                     'width': 1920,
                     'height': 1080,
                     'vcodec': 'avc1.64002a',
@@ -680,7 +680,7 @@ def test_parse_m3u8_formats(self):
                     'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/v9/prog_index.m3u8',
                     'manifest_url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/master.m3u8',
                     'ext': 'mp4',
-                    'protocol': 'm3u8',
+                    'protocol': 'm3u8_native',
                     'width': 1920,
                     'height': 1080,
                     'vcodec': 'avc1.64002a',
@@ -691,166 +691,166 @@ def test_parse_m3u8_formats(self):
                 'bipbop_16x9',
                 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8',
                 [{
-                    "format_id": "bipbop_audio-BipBop Audio 2",
-                    "format_index": None,
-                    "url": "https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/alternate_audio_aac/prog_index.m3u8",
-                    "manifest_url": "https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8",
-                    "language": "eng",
-                    "ext": "mp4",
-                    "protocol": "m3u8",
-                    "preference": None,
-                    "quality": None,
-                    "vcodec": "none",
-                    "audio_ext": "mp4",
-                    "video_ext": "none",
-                }, {
-                    "format_id": "41",
-                    "format_index": None,
-                    "url": "https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/gear0/prog_index.m3u8",
-                    "manifest_url": "https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8",
-                    "tbr": 41.457,
-                    "ext": "mp4",
-                    "fps": None,
-                    "protocol": "m3u8",
-                    "preference": None,
-                    "quality": None,
-                    "vcodec": "none",
-                    "acodec": "mp4a.40.2",
-                    "audio_ext": "mp4",
-                    "video_ext": "none",
-                    "abr": 41.457,
-                }, {
-                    "format_id": "263",
-                    "format_index": None,
-                    "url": "https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/gear1/prog_index.m3u8",
-                    "manifest_url": "https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8",
-                    "tbr": 263.851,
-                    "ext": "mp4",
-                    "fps": None,
-                    "protocol": "m3u8",
-                    "preference": None,
-                    "quality": None,
-                    "width": 416,
-                    "height": 234,
-                    "vcodec": "avc1.4d400d",
-                    "acodec": "mp4a.40.2",
-                    "video_ext": "mp4",
-                    "audio_ext": "none",
-                    "vbr": 263.851,
-                    "abr": 0,
-                }, {
-                    "format_id": "577",
-                    "format_index": None,
-                    "url": "https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/gear2/prog_index.m3u8",
-                    "manifest_url": "https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8",
-                    "tbr": 577.61,
-                    "ext": "mp4",
-                    "fps": None,
-                    "protocol": "m3u8",
-                    "preference": None,
-                    "quality": None,
-                    "width": 640,
-                    "height": 360,
-                    "vcodec": "avc1.4d401e",
-                    "acodec": "mp4a.40.2",
-                    "video_ext": "mp4",
-                    "audio_ext": "none",
-                    "vbr": 577.61,
-                    "abr": 0,
-                }, {
-                    "format_id": "915",
-                    "format_index": None,
-                    "url": "https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/gear3/prog_index.m3u8",
-                    "manifest_url": "https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8",
-                    "tbr": 915.905,
-                    "ext": "mp4",
-                    "fps": None,
-                    "protocol": "m3u8",
-                    "preference": None,
-                    "quality": None,
-                    "width": 960,
-                    "height": 540,
-                    "vcodec": "avc1.4d401f",
-                    "acodec": "mp4a.40.2",
-                    "video_ext": "mp4",
-                    "audio_ext": "none",
-                    "vbr": 915.905,
-                    "abr": 0,
-                }, {
-                    "format_id": "1030",
-                    "format_index": None,
-                    "url": "https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/gear4/prog_index.m3u8",
-                    "manifest_url": "https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8",
-                    "tbr": 1030.138,
-                    "ext": "mp4",
-                    "fps": None,
-                    "protocol": "m3u8",
-                    "preference": None,
-                    "quality": None,
-                    "width": 1280,
-                    "height": 720,
-                    "vcodec": "avc1.4d401f",
-                    "acodec": "mp4a.40.2",
-                    "video_ext": "mp4",
-                    "audio_ext": "none",
-                    "vbr": 1030.138,
-                    "abr": 0,
-                }, {
-                    "format_id": "1924",
-                    "format_index": None,
-                    "url": "https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/gear5/prog_index.m3u8",
-                    "manifest_url": "https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8",
-                    "tbr": 1924.009,
-                    "ext": "mp4",
-                    "fps": None,
-                    "protocol": "m3u8",
-                    "preference": None,
-                    "quality": None,
-                    "width": 1920,
-                    "height": 1080,
-                    "vcodec": "avc1.4d401f",
-                    "acodec": "mp4a.40.2",
-                    "video_ext": "mp4",
-                    "audio_ext": "none",
-                    "vbr": 1924.009,
-                    "abr": 0,
+                    'format_id': 'bipbop_audio-BipBop Audio 2',
+                    'format_index': None,
+                    'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/alternate_audio_aac/prog_index.m3u8',
+                    'manifest_url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8',
+                    'language': 'eng',
+                    'ext': 'mp4',
+                    'protocol': 'm3u8_native',
+                    'preference': None,
+                    'quality': None,
+                    'vcodec': 'none',
+                    'audio_ext': 'mp4',
+                    'video_ext': 'none',
+                }, {
+                    'format_id': '41',
+                    'format_index': None,
+                    'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/gear0/prog_index.m3u8',
+                    'manifest_url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8',
+                    'tbr': 41.457,
+                    'ext': 'mp4',
+                    'fps': None,
+                    'protocol': 'm3u8_native',
+                    'preference': None,
+                    'quality': None,
+                    'vcodec': 'none',
+                    'acodec': 'mp4a.40.2',
+                    'audio_ext': 'mp4',
+                    'video_ext': 'none',
+                    'abr': 41.457,
+                }, {
+                    'format_id': '263',
+                    'format_index': None,
+                    'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/gear1/prog_index.m3u8',
+                    'manifest_url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8',
+                    'tbr': 263.851,
+                    'ext': 'mp4',
+                    'fps': None,
+                    'protocol': 'm3u8_native',
+                    'preference': None,
+                    'quality': None,
+                    'width': 416,
+                    'height': 234,
+                    'vcodec': 'avc1.4d400d',
+                    'acodec': 'mp4a.40.2',
+                    'video_ext': 'mp4',
+                    'audio_ext': 'none',
+                    'vbr': 263.851,
+                    'abr': 0,
+                }, {
+                    'format_id': '577',
+                    'format_index': None,
+                    'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/gear2/prog_index.m3u8',
+                    'manifest_url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8',
+                    'tbr': 577.61,
+                    'ext': 'mp4',
+                    'fps': None,
+                    'protocol': 'm3u8_native',
+                    'preference': None,
+                    'quality': None,
+                    'width': 640,
+                    'height': 360,
+                    'vcodec': 'avc1.4d401e',
+                    'acodec': 'mp4a.40.2',
+                    'video_ext': 'mp4',
+                    'audio_ext': 'none',
+                    'vbr': 577.61,
+                    'abr': 0,
+                }, {
+                    'format_id': '915',
+                    'format_index': None,
+                    'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/gear3/prog_index.m3u8',
+                    'manifest_url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8',
+                    'tbr': 915.905,
+                    'ext': 'mp4',
+                    'fps': None,
+                    'protocol': 'm3u8_native',
+                    'preference': None,
+                    'quality': None,
+                    'width': 960,
+                    'height': 540,
+                    'vcodec': 'avc1.4d401f',
+                    'acodec': 'mp4a.40.2',
+                    'video_ext': 'mp4',
+                    'audio_ext': 'none',
+                    'vbr': 915.905,
+                    'abr': 0,
+                }, {
+                    'format_id': '1030',
+                    'format_index': None,
+                    'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/gear4/prog_index.m3u8',
+                    'manifest_url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8',
+                    'tbr': 1030.138,
+                    'ext': 'mp4',
+                    'fps': None,
+                    'protocol': 'm3u8_native',
+                    'preference': None,
+                    'quality': None,
+                    'width': 1280,
+                    'height': 720,
+                    'vcodec': 'avc1.4d401f',
+                    'acodec': 'mp4a.40.2',
+                    'video_ext': 'mp4',
+                    'audio_ext': 'none',
+                    'vbr': 1030.138,
+                    'abr': 0,
+                }, {
+                    'format_id': '1924',
+                    'format_index': None,
+                    'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/gear5/prog_index.m3u8',
+                    'manifest_url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8',
+                    'tbr': 1924.009,
+                    'ext': 'mp4',
+                    'fps': None,
+                    'protocol': 'm3u8_native',
+                    'preference': None,
+                    'quality': None,
+                    'width': 1920,
+                    'height': 1080,
+                    'vcodec': 'avc1.4d401f',
+                    'acodec': 'mp4a.40.2',
+                    'video_ext': 'mp4',
+                    'audio_ext': 'none',
+                    'vbr': 1924.009,
+                    'abr': 0,
                 }],
                 {
-                    "en": [{
-                        "url": "https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/subtitles/eng/prog_index.m3u8",
-                        "ext": "vtt",
-                        "protocol": "m3u8_native"
+                    'en': [{
+                        'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/subtitles/eng/prog_index.m3u8',
+                        'ext': 'vtt',
+                        'protocol': 'm3u8_native'
                     }, {
-                        "url": "https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/subtitles/eng_forced/prog_index.m3u8",
-                        "ext": "vtt",
-                        "protocol": "m3u8_native"
+                        'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/subtitles/eng_forced/prog_index.m3u8',
+                        'ext': 'vtt',
+                        'protocol': 'm3u8_native'
                     }],
-                    "fr": [{
-                        "url": "https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/subtitles/fra/prog_index.m3u8",
-                        "ext": "vtt",
-                        "protocol": "m3u8_native"
+                    'fr': [{
+                        'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/subtitles/fra/prog_index.m3u8',
+                        'ext': 'vtt',
+                        'protocol': 'm3u8_native'
                     }, {
-                        "url": "https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/subtitles/fra_forced/prog_index.m3u8",
-                        "ext": "vtt",
-                        "protocol": "m3u8_native"
+                        'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/subtitles/fra_forced/prog_index.m3u8',
+                        'ext': 'vtt',
+                        'protocol': 'm3u8_native'
                     }],
-                    "es": [{
-                        "url": "https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/subtitles/spa/prog_index.m3u8",
-                        "ext": "vtt",
-                        "protocol": "m3u8_native"
+                    'es': [{
+                        'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/subtitles/spa/prog_index.m3u8',
+                        'ext': 'vtt',
+                        'protocol': 'm3u8_native'
                     }, {
-                        "url": "https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/subtitles/spa_forced/prog_index.m3u8",
-                        "ext": "vtt",
-                        "protocol": "m3u8_native"
+                        'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/subtitles/spa_forced/prog_index.m3u8',
+                        'ext': 'vtt',
+                        'protocol': 'm3u8_native'
                     }],
-                    "ja": [{
-                        "url": "https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/subtitles/jpn/prog_index.m3u8",
-                        "ext": "vtt",
-                        "protocol": "m3u8_native"
+                    'ja': [{
+                        'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/subtitles/jpn/prog_index.m3u8',
+                        'ext': 'vtt',
+                        'protocol': 'm3u8_native'
                     }, {
-                        "url": "https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/subtitles/jpn_forced/prog_index.m3u8",
-                        "ext": "vtt",
-                        "protocol": "m3u8_native"
+                        'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/subtitles/jpn_forced/prog_index.m3u8',
+                        'ext': 'vtt',
+                        'protocol': 'm3u8_native'
                     }],
                 }
             ),
@@ -1087,115 +1087,115 @@ def test_parse_mpd_formats(self):
                 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/manifest.mpd',
                 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/',
                 [{
-                    "format_id": "audio=128001",
-                    "manifest_url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/manifest.mpd",
-                    "ext": "m4a",
-                    "tbr": 128.001,
-                    "asr": 48000,
-                    "format_note": "DASH audio",
-                    "container": "m4a_dash",
-                    "vcodec": "none",
-                    "acodec": "mp4a.40.2",
-                    "url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/manifest.mpd",
-                    "fragment_base_url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/dash/",
-                    "protocol": "http_dash_segments",
-                    "audio_ext": "m4a",
-                    "video_ext": "none",
-                    "abr": 128.001,
-                }, {
-                    "format_id": "video=100000",
-                    "manifest_url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/manifest.mpd",
-                    "ext": "mp4",
-                    "width": 336,
-                    "height": 144,
-                    "tbr": 100,
-                    "format_note": "DASH video",
-                    "container": "mp4_dash",
-                    "vcodec": "avc1.4D401F",
-                    "acodec": "none",
-                    "url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/manifest.mpd",
-                    "fragment_base_url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/dash/",
-                    "protocol": "http_dash_segments",
-                    "video_ext": "mp4",
-                    "audio_ext": "none",
-                    "vbr": 100,
-                }, {
-                    "format_id": "video=326000",
-                    "manifest_url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/manifest.mpd",
-                    "ext": "mp4",
-                    "width": 562,
-                    "height": 240,
-                    "tbr": 326,
-                    "format_note": "DASH video",
-                    "container": "mp4_dash",
-                    "vcodec": "avc1.4D401F",
-                    "acodec": "none",
-                    "url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/manifest.mpd",
-                    "fragment_base_url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/dash/",
-                    "protocol": "http_dash_segments",
-                    "video_ext": "mp4",
-                    "audio_ext": "none",
-                    "vbr": 326,
-                }, {
-                    "format_id": "video=698000",
-                    "manifest_url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/manifest.mpd",
-                    "ext": "mp4",
-                    "width": 844,
-                    "height": 360,
-                    "tbr": 698,
-                    "format_note": "DASH video",
-                    "container": "mp4_dash",
-                    "vcodec": "avc1.4D401F",
-                    "acodec": "none",
-                    "url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/manifest.mpd",
-                    "fragment_base_url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/dash/",
-                    "protocol": "http_dash_segments",
-                    "video_ext": "mp4",
-                    "audio_ext": "none",
-                    "vbr": 698,
-                }, {
-                    "format_id": "video=1493000",
-                    "manifest_url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/manifest.mpd",
-                    "ext": "mp4",
-                    "width": 1126,
-                    "height": 480,
-                    "tbr": 1493,
-                    "format_note": "DASH video",
-                    "container": "mp4_dash",
-                    "vcodec": "avc1.4D401F",
-                    "acodec": "none",
-                    "url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/manifest.mpd",
-                    "fragment_base_url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/dash/",
-                    "protocol": "http_dash_segments",
-                    "video_ext": "mp4",
-                    "audio_ext": "none",
-                    "vbr": 1493,
-                }, {
-                    "format_id": "video=4482000",
-                    "manifest_url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/manifest.mpd",
-                    "ext": "mp4",
-                    "width": 1688,
-                    "height": 720,
-                    "tbr": 4482,
-                    "format_note": "DASH video",
-                    "container": "mp4_dash",
-                    "vcodec": "avc1.4D401F",
-                    "acodec": "none",
-                    "url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/manifest.mpd",
-                    "fragment_base_url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/dash/",
-                    "protocol": "http_dash_segments",
-                    "video_ext": "mp4",
-                    "audio_ext": "none",
-                    "vbr": 4482,
+                    'format_id': 'audio=128001',
+                    'manifest_url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/manifest.mpd',
+                    'ext': 'm4a',
+                    'tbr': 128.001,
+                    'asr': 48000,
+                    'format_note': 'DASH audio',
+                    'container': 'm4a_dash',
+                    'vcodec': 'none',
+                    'acodec': 'mp4a.40.2',
+                    'url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/manifest.mpd',
+                    'fragment_base_url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/dash/',
+                    'protocol': 'http_dash_segments',
+                    'audio_ext': 'm4a',
+                    'video_ext': 'none',
+                    'abr': 128.001,
+                }, {
+                    'format_id': 'video=100000',
+                    'manifest_url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/manifest.mpd',
+                    'ext': 'mp4',
+                    'width': 336,
+                    'height': 144,
+                    'tbr': 100,
+                    'format_note': 'DASH video',
+                    'container': 'mp4_dash',
+                    'vcodec': 'avc1.4D401F',
+                    'acodec': 'none',
+                    'url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/manifest.mpd',
+                    'fragment_base_url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/dash/',
+                    'protocol': 'http_dash_segments',
+                    'video_ext': 'mp4',
+                    'audio_ext': 'none',
+                    'vbr': 100,
+                }, {
+                    'format_id': 'video=326000',
+                    'manifest_url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/manifest.mpd',
+                    'ext': 'mp4',
+                    'width': 562,
+                    'height': 240,
+                    'tbr': 326,
+                    'format_note': 'DASH video',
+                    'container': 'mp4_dash',
+                    'vcodec': 'avc1.4D401F',
+                    'acodec': 'none',
+                    'url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/manifest.mpd',
+                    'fragment_base_url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/dash/',
+                    'protocol': 'http_dash_segments',
+                    'video_ext': 'mp4',
+                    'audio_ext': 'none',
+                    'vbr': 326,
+                }, {
+                    'format_id': 'video=698000',
+                    'manifest_url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/manifest.mpd',
+                    'ext': 'mp4',
+                    'width': 844,
+                    'height': 360,
+                    'tbr': 698,
+                    'format_note': 'DASH video',
+                    'container': 'mp4_dash',
+                    'vcodec': 'avc1.4D401F',
+                    'acodec': 'none',
+                    'url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/manifest.mpd',
+                    'fragment_base_url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/dash/',
+                    'protocol': 'http_dash_segments',
+                    'video_ext': 'mp4',
+                    'audio_ext': 'none',
+                    'vbr': 698,
+                }, {
+                    'format_id': 'video=1493000',
+                    'manifest_url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/manifest.mpd',
+                    'ext': 'mp4',
+                    'width': 1126,
+                    'height': 480,
+                    'tbr': 1493,
+                    'format_note': 'DASH video',
+                    'container': 'mp4_dash',
+                    'vcodec': 'avc1.4D401F',
+                    'acodec': 'none',
+                    'url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/manifest.mpd',
+                    'fragment_base_url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/dash/',
+                    'protocol': 'http_dash_segments',
+                    'video_ext': 'mp4',
+                    'audio_ext': 'none',
+                    'vbr': 1493,
+                }, {
+                    'format_id': 'video=4482000',
+                    'manifest_url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/manifest.mpd',
+                    'ext': 'mp4',
+                    'width': 1688,
+                    'height': 720,
+                    'tbr': 4482,
+                    'format_note': 'DASH video',
+                    'container': 'mp4_dash',
+                    'vcodec': 'avc1.4D401F',
+                    'acodec': 'none',
+                    'url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/manifest.mpd',
+                    'fragment_base_url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/dash/',
+                    'protocol': 'http_dash_segments',
+                    'video_ext': 'mp4',
+                    'audio_ext': 'none',
+                    'vbr': 4482,
                 }],
                 {
-                    "en": [
+                    'en': [
                         {
-                            "ext": "mp4",
-                            "manifest_url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/manifest.mpd",
-                            "url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/manifest.mpd",
-                            "fragment_base_url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/dash/",
-                            "protocol": "http_dash_segments",
+                            'ext': 'mp4',
+                            'manifest_url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/manifest.mpd',
+                            'url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/manifest.mpd',
+                            'fragment_base_url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/dash/',
+                            'protocol': 'http_dash_segments',
                         }
                     ]
                 },
@@ -1218,175 +1218,175 @@ def test_parse_ism_formats(self):
                 'sintel',
                 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/Manifest',
                 [{
-                    "format_id": "audio-128",
-                    "url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/Manifest",
-                    "manifest_url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/Manifest",
-                    "ext": "isma",
-                    "tbr": 128,
-                    "asr": 48000,
-                    "vcodec": "none",
-                    "acodec": "AACL",
-                    "protocol": "ism",
-                    "_download_params": {
-                        "stream_type": "audio",
-                        "duration": 8880746666,
-                        "timescale": 10000000,
-                        "width": 0,
-                        "height": 0,
-                        "fourcc": "AACL",
-                        "codec_private_data": "1190",
-                        "sampling_rate": 48000,
-                        "channels": 2,
-                        "bits_per_sample": 16,
-                        "nal_unit_length_field": 4
+                    'format_id': 'audio-128',
+                    'url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/Manifest',
+                    'manifest_url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/Manifest',
+                    'ext': 'isma',
+                    'tbr': 128,
+                    'asr': 48000,
+                    'vcodec': 'none',
+                    'acodec': 'AACL',
+                    'protocol': 'ism',
+                    '_download_params': {
+                        'stream_type': 'audio',
+                        'duration': 8880746666,
+                        'timescale': 10000000,
+                        'width': 0,
+                        'height': 0,
+                        'fourcc': 'AACL',
+                        'codec_private_data': '1190',
+                        'sampling_rate': 48000,
+                        'channels': 2,
+                        'bits_per_sample': 16,
+                        'nal_unit_length_field': 4
                     },
-                    "audio_ext": "isma",
-                    "video_ext": "none",
-                    "abr": 128,
-                }, {
-                    "format_id": "video-100",
-                    "url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/Manifest",
-                    "manifest_url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/Manifest",
-                    "ext": "ismv",
-                    "width": 336,
-                    "height": 144,
-                    "tbr": 100,
-                    "vcodec": "AVC1",
-                    "acodec": "none",
-                    "protocol": "ism",
-                    "_download_params": {
-                        "stream_type": "video",
-                        "duration": 8880746666,
-                        "timescale": 10000000,
-                        "width": 336,
-                        "height": 144,
-                        "fourcc": "AVC1",
-                        "codec_private_data": "00000001674D401FDA0544EFFC2D002CBC40000003004000000C03C60CA80000000168EF32C8",
-                        "channels": 2,
-                        "bits_per_sample": 16,
-                        "nal_unit_length_field": 4
+                    'audio_ext': 'isma',
+                    'video_ext': 'none',
+                    'abr': 128,
+                }, {
+                    'format_id': 'video-100',
+                    'url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/Manifest',
+                    'manifest_url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/Manifest',
+                    'ext': 'ismv',
+                    'width': 336,
+                    'height': 144,
+                    'tbr': 100,
+                    'vcodec': 'AVC1',
+                    'acodec': 'none',
+                    'protocol': 'ism',
+                    '_download_params': {
+                        'stream_type': 'video',
+                        'duration': 8880746666,
+                        'timescale': 10000000,
+                        'width': 336,
+                        'height': 144,
+                        'fourcc': 'AVC1',
+                        'codec_private_data': '00000001674D401FDA0544EFFC2D002CBC40000003004000000C03C60CA80000000168EF32C8',
+                        'channels': 2,
+                        'bits_per_sample': 16,
+                        'nal_unit_length_field': 4
                     },
-                    "video_ext": "ismv",
-                    "audio_ext": "none",
-                    "vbr": 100,
-                }, {
-                    "format_id": "video-326",
-                    "url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/Manifest",
-                    "manifest_url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/Manifest",
-                    "ext": "ismv",
-                    "width": 562,
-                    "height": 240,
-                    "tbr": 326,
-                    "vcodec": "AVC1",
-                    "acodec": "none",
-                    "protocol": "ism",
-                    "_download_params": {
-                        "stream_type": "video",
-                        "duration": 8880746666,
-                        "timescale": 10000000,
-                        "width": 562,
-                        "height": 240,
-                        "fourcc": "AVC1",
-                        "codec_private_data": "00000001674D401FDA0241FE23FFC3BC83BA44000003000400000300C03C60CA800000000168EF32C8",
-                        "channels": 2,
-                        "bits_per_sample": 16,
-                        "nal_unit_length_field": 4
+                    'video_ext': 'ismv',
+                    'audio_ext': 'none',
+                    'vbr': 100,
+                }, {
+                    'format_id': 'video-326',
+                    'url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/Manifest',
+                    'manifest_url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/Manifest',
+                    'ext': 'ismv',
+                    'width': 562,
+                    'height': 240,
+                    'tbr': 326,
+                    'vcodec': 'AVC1',
+                    'acodec': 'none',
+                    'protocol': 'ism',
+                    '_download_params': {
+                        'stream_type': 'video',
+                        'duration': 8880746666,
+                        'timescale': 10000000,
+                        'width': 562,
+                        'height': 240,
+                        'fourcc': 'AVC1',
+                        'codec_private_data': '00000001674D401FDA0241FE23FFC3BC83BA44000003000400000300C03C60CA800000000168EF32C8',
+                        'channels': 2,
+                        'bits_per_sample': 16,
+                        'nal_unit_length_field': 4
                     },
-                    "video_ext": "ismv",
-                    "audio_ext": "none",
-                    "vbr": 326,
-                }, {
-                    "format_id": "video-698",
-                    "url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/Manifest",
-                    "manifest_url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/Manifest",
-                    "ext": "ismv",
-                    "width": 844,
-                    "height": 360,
-                    "tbr": 698,
-                    "vcodec": "AVC1",
-                    "acodec": "none",
-                    "protocol": "ism",
-                    "_download_params": {
-                        "stream_type": "video",
-                        "duration": 8880746666,
-                        "timescale": 10000000,
-                        "width": 844,
-                        "height": 360,
-                        "fourcc": "AVC1",
-                        "codec_private_data": "00000001674D401FDA0350BFB97FF06AF06AD1000003000100000300300F1832A00000000168EF32C8",
-                        "channels": 2,
-                        "bits_per_sample": 16,
-                        "nal_unit_length_field": 4
+                    'video_ext': 'ismv',
+                    'audio_ext': 'none',
+                    'vbr': 326,
+                }, {
+                    'format_id': 'video-698',
+                    'url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/Manifest',
+                    'manifest_url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/Manifest',
+                    'ext': 'ismv',
+                    'width': 844,
+                    'height': 360,
+                    'tbr': 698,
+                    'vcodec': 'AVC1',
+                    'acodec': 'none',
+                    'protocol': 'ism',
+                    '_download_params': {
+                        'stream_type': 'video',
+                        'duration': 8880746666,
+                        'timescale': 10000000,
+                        'width': 844,
+                        'height': 360,
+                        'fourcc': 'AVC1',
+                        'codec_private_data': '00000001674D401FDA0350BFB97FF06AF06AD1000003000100000300300F1832A00000000168EF32C8',
+                        'channels': 2,
+                        'bits_per_sample': 16,
+                        'nal_unit_length_field': 4
                     },
-                    "video_ext": "ismv",
-                    "audio_ext": "none",
-                    "vbr": 698,
-                }, {
-                    "format_id": "video-1493",
-                    "url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/Manifest",
-                    "manifest_url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/Manifest",
-                    "ext": "ismv",
-                    "width": 1126,
-                    "height": 480,
-                    "tbr": 1493,
-                    "vcodec": "AVC1",
-                    "acodec": "none",
-                    "protocol": "ism",
-                    "_download_params": {
-                        "stream_type": "video",
-                        "duration": 8880746666,
-                        "timescale": 10000000,
-                        "width": 1126,
-                        "height": 480,
-                        "fourcc": "AVC1",
-                        "codec_private_data": "00000001674D401FDA011C3DE6FFF0D890D871000003000100000300300F1832A00000000168EF32C8",
-                        "channels": 2,
-                        "bits_per_sample": 16,
-                        "nal_unit_length_field": 4
+                    'video_ext': 'ismv',
+                    'audio_ext': 'none',
+                    'vbr': 698,
+                }, {
+                    'format_id': 'video-1493',
+                    'url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/Manifest',
+                    'manifest_url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/Manifest',
+                    'ext': 'ismv',
+                    'width': 1126,
+                    'height': 480,
+                    'tbr': 1493,
+                    'vcodec': 'AVC1',
+                    'acodec': 'none',
+                    'protocol': 'ism',
+                    '_download_params': {
+                        'stream_type': 'video',
+                        'duration': 8880746666,
+                        'timescale': 10000000,
+                        'width': 1126,
+                        'height': 480,
+                        'fourcc': 'AVC1',
+                        'codec_private_data': '00000001674D401FDA011C3DE6FFF0D890D871000003000100000300300F1832A00000000168EF32C8',
+                        'channels': 2,
+                        'bits_per_sample': 16,
+                        'nal_unit_length_field': 4
                     },
-                    "video_ext": "ismv",
-                    "audio_ext": "none",
-                    "vbr": 1493,
-                }, {
-                    "format_id": "video-4482",
-                    "url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/Manifest",
-                    "manifest_url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/Manifest",
-                    "ext": "ismv",
-                    "width": 1688,
-                    "height": 720,
-                    "tbr": 4482,
-                    "vcodec": "AVC1",
-                    "acodec": "none",
-                    "protocol": "ism",
-                    "_download_params": {
-                        "stream_type": "video",
-                        "duration": 8880746666,
-                        "timescale": 10000000,
-                        "width": 1688,
-                        "height": 720,
-                        "fourcc": "AVC1",
-                        "codec_private_data": "00000001674D401FDA01A816F97FFC1ABC1AB440000003004000000C03C60CA80000000168EF32C8",
-                        "channels": 2,
-                        "bits_per_sample": 16,
-                        "nal_unit_length_field": 4
+                    'video_ext': 'ismv',
+                    'audio_ext': 'none',
+                    'vbr': 1493,
+                }, {
+                    'format_id': 'video-4482',
+                    'url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/Manifest',
+                    'manifest_url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/Manifest',
+                    'ext': 'ismv',
+                    'width': 1688,
+                    'height': 720,
+                    'tbr': 4482,
+                    'vcodec': 'AVC1',
+                    'acodec': 'none',
+                    'protocol': 'ism',
+                    '_download_params': {
+                        'stream_type': 'video',
+                        'duration': 8880746666,
+                        'timescale': 10000000,
+                        'width': 1688,
+                        'height': 720,
+                        'fourcc': 'AVC1',
+                        'codec_private_data': '00000001674D401FDA01A816F97FFC1ABC1AB440000003004000000C03C60CA80000000168EF32C8',
+                        'channels': 2,
+                        'bits_per_sample': 16,
+                        'nal_unit_length_field': 4
                     },
-                    "video_ext": "ismv",
-                    "audio_ext": "none",
-                    "vbr": 4482,
+                    'video_ext': 'ismv',
+                    'audio_ext': 'none',
+                    'vbr': 4482,
                 }],
                 {
-                    "eng": [
+                    'eng': [
                         {
-                            "ext": "ismt",
-                            "protocol": "ism",
-                            "url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/Manifest",
-                            "manifest_url": "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/Manifest",
-                            "_download_params": {
-                                "stream_type": "text",
-                                "duration": 8880746666,
-                                "timescale": 10000000,
-                                "fourcc": "TTML",
-                                "codec_private_data": ""
+                            'ext': 'ismt',
+                            'protocol': 'ism',
+                            'url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/Manifest',
+                            'manifest_url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/Manifest',
+                            '_download_params': {
+                                'stream_type': 'text',
+                                'duration': 8880746666,
+                                'timescale': 10000000,
+                                'fourcc': 'TTML',
+                                'codec_private_data': ''
                             }
                         }
                     ]
index 888cc8efa785fe1d24ef9e747c31f6cda13accfa..dacd9b3d1e799559b80deee5796c13bd1126a41d 100644 (file)
@@ -1902,7 +1902,7 @@ def _extract_m3u8_formats(self, *args, **kwargs):
         return fmts
 
     def _extract_m3u8_formats_and_subtitles(
-            self, m3u8_url, video_id, ext=None, entry_protocol='m3u8',
+            self, m3u8_url, video_id, ext=None, entry_protocol='m3u8_native',
             preference=None, quality=None, m3u8_id=None, note=None,
             errnote=None, fatal=True, live=False, data=None, headers={},
             query={}):
@@ -1926,7 +1926,7 @@ def _extract_m3u8_formats_and_subtitles(
             headers=headers, query=query, video_id=video_id)
 
     def _parse_m3u8_formats_and_subtitles(
-            self, m3u8_doc, m3u8_url, ext=None, entry_protocol='m3u8',
+            self, m3u8_doc, m3u8_url, ext=None, entry_protocol='m3u8_native',
             preference=None, quality=None, m3u8_id=None, live=False, note=None,
             errnote=None, fatal=True, data=None, headers={}, query={},
             video_id=None):
index aff9b88c0c91e1f1630a673c583dd880dc7adbd5..22123e5d44660ffe2865da0fe1a8822b3dd666cc 100644 (file)
@@ -107,8 +107,7 @@ def _real_extract(self, url):
             ext = determine_ext(format_url)
             if ext == 'm3u8':
                 formats.extend(self._extract_m3u8_formats(
-                    format_url, lesson_id, 'mp4', entry_protocol='m3u8',
-                    m3u8_id='hls', fatal=False))
+                    format_url, lesson_id, 'mp4', m3u8_id='hls', fatal=False))
             elif ext == 'mpd':
                 formats.extend(self._extract_mpd_formats(
                     format_url, lesson_id, mpd_id='dash', fatal=False))
index 0ce2e37762c103c86544ea52c130ea19907ece75..9cacd381587984242ef02b1d92e523a827925b9d 100644 (file)
@@ -247,8 +247,7 @@ def _real_extract(self, url):
         m3u8_url = metadata.get('hlsMasterPlaylistUrl')
         if m3u8_url:
             formats.extend(self._extract_m3u8_formats(
-                m3u8_url, video_id, 'mp4', entry_protocol='m3u8',
-                m3u8_id='hls', fatal=False))
+                m3u8_url, video_id, 'mp4', m3u8_id='hls', fatal=False))
         rtmp_url = metadata.get('rtmpUrl')
         if rtmp_url:
             formats.append({
index 8080f289aa9c1d6ca259e8b74ea3254eb7ed4dfe..f8bc2e73a6c06ada73cea1ae3dbc2650310b9c27 100644 (file)
@@ -47,8 +47,7 @@ def _real_extract(self, url):
 
             if hls_url:
                 hls_fmts = self._extract_m3u8_formats(
-                    hls_url, video_id, ext='mp4', entry_protocol='m3u8',
-                    m3u8_id='hls-%s' % name, quality=quality)
+                    hls_url, video_id, ext='mp4', m3u8_id='hls-%s' % name, quality=quality)
                 formats.extend(hls_fmts)
             else:
                 hls_fmts = []
@@ -71,8 +70,7 @@ def _real_extract(self, url):
 
         # This contains the same formats as the above manifests and is used only as a fallback
         formats.extend(self._extract_m3u8_formats(
-            hls_url, video_id, ext='mp4', entry_protocol='m3u8',
-            m3u8_id='hls'))
+            hls_url, video_id, ext='mp4', m3u8_id='hls'))
         self._remove_duplicate_formats(formats)
         self._sort_formats(formats)