How to get m3u8 live files, not real-time mvu8 video files?

I would like to get a live m3u8 file, not a m3u8 DVR, since the latter contains too many segments (4 hours) and is slow and not convenient for downloading and processing.

For example, a sky news feed

www.youtube.com/watch?v=y60wDzZt8yg

What I've done:

Change user agent string on iPad or visit

www.youtube.com/get_video_info?&video_id=y60wDzZt8yg

I could get something like

manifest.googlevideo.com/api/manifest/hls_variant/playlist_type/DVR/signature/11D1EE619ACDCA91661CB6F42597F96F0C86CC1F.742A7B383F4B10A099B1C7AAEF1E15DCD2F160C6/ipbits/0/fexp/9416126%2C9420452%2C9422596%2C9423459%2C9423661%2C9423662/source/yt_live_broadcast/id/y60wDzZt8yg 0,2 / SVER / 3 / key / yt6 / UPN / 0y8ab4RaX_U / expire / 1454380402 / sparams / GCR% 2Cid% 2Cip% 2Cipbits% 2Citag% 2Cmaudio% 2Cplaylist_type% 2Cpmbypass% 2Csource% 2Cexpire / f / 86.172pass.6 /yes/maudio/1/gcr/gb/file/index.m3u8

which contains sub-m3u8 files with multiple permissions.

When opening this file 720p sub-m3u8

manifest.googlevideo.com/api/manifest/hls_playlist/id/y60wDzZt8yg.2/itag/95/source/yt_live_broadcast/requiressl/yes/ratebypass/yes/live/1/cmbypass/yes/gir/yes/dg_shard/eTYwd0R6WnQ4eWcuMg.95/hls_chunk_host/r7---sn-cu-n1qe.googlevideo.com/playlist_type/DVR/pmbypass/yes/gcr/gb/mm/32/mn/sn-cu-n1qe/ms/lv/mv/u/pcm2cms/yes/pl/24/dover/3/fexp/9416126,9420452,9422596,9423459,9423661,9423662/sver/3/upn/0y8ab4RaX_U/mt/1454358580/ip/86.172.63.152/ipbits/0//1454380402/sparams/IP, ipbits, , ITAG, , RequireSSL, ratebypass, , cmbypass, , dg_shard, hls_chunk_host, playlist_type, pmbypass, , , n, , , pcm2cms, /signature/ 86FCD06C0400556C7F94B21019707B2501F98308.659A34C0F8A2DC70CC8DC411CD5D723C55146DD3/key/dg_yt0/playlist/index.m3u8

ts 4 , . ,

? Start_seq = 344610

, m3u8, . , , start_seq.

, , , YouTube m3u8, .

playlist_type/

playlist_type/DVR

, LIVE m3u8 YouTube, ? , , "start_seq = XXX"? API, m3u8? .

+4
1

, , , Charles Proxy Firefox Safari iOS, m3u8 DVR-.

HTTP GET: https://manifest.googlevideo.com/api/manifest/hls_variant/upn/wLKv6OL3J1A/sparams/gcr%2Cid%2Cip%2Cipbits%2Citag%2Cplaylist_type%2Cpmbypass%2Cratebypass%2Csource%2Cexpire/expire/1454656348/signature/D1ADDA66092157D87C5DBAB0ECD81AB1D4467291.646FFD703F6ADA2C2E9769F7F3590274C9555148/id/y60wDzZt8yg.2/key/yt6/ip/209.122.120.50/ratebypass/yes/pmbypass/yes/gcr/us/itag/0/ipbits/0/fexp/9405349%2C9408491%2C9418223%2C9419543%2C9420452%2C9421886%2C9422596%2C9422780%2C9423661%2C9424135%2C9424163%2C9425065%2C9425200%2C9425744%2C9426402%2C9427000%2C9427753/playlist_type/DVR/source/yt_live_broadcast/sver/3/keepalive/yes/file/index.m3u8?cpn=OjahYpsGmZq6lLAS

curl :

curl -H "Host: manifest.googlevideo.com" \
-H "User-Agent: Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16" \
-H "Accept: video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5" \
-H "Accept-Language: en-US,en;q=0.5" \
-H "Range: bytes=0-" \
-H "Referer: https://m.youtube.com/watch?v=y60wDzZt8yg" \
https://manifest.googlevideo.com/api/manifest/hls_variant/upn/wLKv6OL3J1A/sparams/gcr%2Cid%2Cip%2Cipbits%2Citag%2Cplaylist_type%2Cpmbypass%2Cratebypass%2Csource%2Cexpire/expire/1454656348/signature/D1ADDA66092157D87C5DBAB0ECD81AB1D4467291.646FFD703F6ADA2C2E9769F7F3590274C9555148/id/y60wDzZt8yg.2/key/yt6/ip/209.122.120.50/ratebypass/yes/pmbypass/yes/gcr/us/itag/0/ipbits/0/fexp/9405349%2C9408491%2C9418223%2C9419543%2C9420452%2C9421886%2C9422596%2C9422780%2C9423661%2C9424135%2C9424163%2C9425065%2C9425200%2C9425744%2C9426402%2C9427000%2C9427753/playlist_type/DVR/source/yt_live_broadcast/sver/3/keepalive/yes/file/index.m3u8?cpn=OjahYpsGmZq6lLAS

cpn, . , URL-, , , .

0

Source: https://habr.com/ru/post/1626925/


All Articles