aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_InfoExtractor.py
diff options
context:
space:
mode:
authorFelix S <felix.von.s@posteo.de>2021-04-17 15:49:12 +0200
committerFelix S <felix.von.s@posteo.de>2021-04-28 17:20:39 +0530
commit73b9088a1c858673255e69da1ac966e83ae91a30 (patch)
tree8557215203be39bda2cc26724de3547a03ec1047 /test/test_InfoExtractor.py
parentf6a1d69a878070392171d807c03b5954c61cf911 (diff)
downloadhypervideo-pre-73b9088a1c858673255e69da1ac966e83ae91a30.tar.lz
hypervideo-pre-73b9088a1c858673255e69da1ac966e83ae91a30.tar.xz
hypervideo-pre-73b9088a1c858673255e69da1ac966e83ae91a30.zip
[test] Test subtitle extraction from HLS manifests
Diffstat (limited to 'test/test_InfoExtractor.py')
-rw-r--r--test/test_InfoExtractor.py167
1 files changed, 167 insertions, 0 deletions
diff --git a/test/test_InfoExtractor.py b/test/test_InfoExtractor.py
index 9e059723f..b4984b5ed 100644
--- a/test/test_InfoExtractor.py
+++ b/test/test_InfoExtractor.py
@@ -687,6 +687,173 @@ jwplayer("mediaplayer").setup({"abouttext":"Visit Indie DB","aboutlink":"http:\/
}],
{}
),
+ (
+ '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,
+ }],
+ {
+ "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"
+ }],
+ "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"
+ }],
+ "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"
+ }],
+ "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"
+ }],
+ }
+ ),
]
for m3u8_file, m3u8_url, expected_formats, expected_subs in _TEST_CASES: