If the referer sent with the stream did not match the one they were expecting, they would not respond with the playlist file. IssuesĪll of the new streams would now have additional headers, with the most common one being the “Referer” header. The streamers had started using HTTP headers for verification. The URL and parameters would be exactly right, but VLC or any other player would not work. However, after trying a few streams like this, they stopped working. This works perfectly well for unobfuscated and simple streams. At that point you can just copy and paste the URL into any program that plays m3u8 and watch the stream (VLC and QuickTime both work). I experimented with it for a bit, and found the fastest way to do so would be to go to the Network tab and just filter by m3u8. m3u8 (the live stream playlist format) from a livestream and just plug it into a site that’s nothing more than a wrapper for a element. This means that it should be fairly trivial to extract the. The client looks for new media files and encryption keys in the updated index and adds these URLs to its queue. During ongoing broadcasts, the client loads a new version of the index file periodically. If no EXT-X-ENDLIST tag is present, the index file is part of an ongoing broadcast. This process continues until the client encounters the EXT-X-ENDLIST tag in the index file. The client is responsible for fetching any decryption keys, authenticating or presenting a user interface to allow authentication, and decrypting media files as needed. #EXT-X-KEY:METHOD=AES-128,URI="",IV=0xcbbc4b1952b18ab386984ab67d2df816,KEYFORMAT="identity",KEYFORMATVERSIONS="1"Įach of these ts files is the actual media chunk file, which use the file format MPEG2-TS. A playlist, example below, is just a collection of these ts links. Once it has a sufficient amount of data downloaded, the client begins presenting the reassembled stream to the user. Each file contains a consecutive segment of the stream. For the selected stream, the client downloads each available media file in sequence. The index file, in turn, specifies the location of the available media files, decryption keys, and any alternate streams available. The client software begins by fetching the index file, using a URL that identifies the stream. These files are then categorized into a playlist file, usually with a file extension. For live events, the server requires a media encoder, which can be off-the-shelf hardware, and a way to break the encoded media into segments and save them as files.
Live streams start at the input, which is usually either a live event or a static file that is being streamed. It’s a fairly complicated spec, but the core of it is as follows. HLS is designed for reliability and dynamically adapts to network conditions by optimizing playback for the available speed of wired and wireless connections. There’s a healthy open source community around building tools and infrastructure for HLS, most notably hls.js. HTTP Live Streaming, or HLS, is one of the most common live streaming standards. I wanted to do some research and figure out if there was a way to quickly export the stream and watch it elsewhere.
I wholeheartedly support ads for free content but unfortunately the sorts of ads that show up on these streams are terrible at best and malicious at worst. Most have some sort of crypto miner running in the background, as well as dozens of ads covering the stream. The experience on these streams is, to say the least, extremely poor. Having not lived in the US for the majority of my life, I often needed to rely on illegal streams to watch America sports games.