Quote:
Originally Posted by enrud
Each line in the video (and audio) m3u8 that does not begin with a # character is a url for a segment of audio or video (a sequence). If you download the whole thing as a single download, you need to extract out the byte ranges as specified in the M3U8. There is junk before the actual video (well not junk, but that's a different discussion...) and audio begins in the file. You'll notice that the first byterange does not begin at zero. Those byte ranges aren't just where decryption begins and ends, it also is the locations where the video and audio are stored in the whole file. If you leave the other stuff (pretty much all at the beginning of the file, iirc) on then nothing will play the video.
What you are doing is well enough correct. Just don't write the decrypted stuff back to the original file. Each byte range is what I'm referring to as a chunk. In my code, I simply read each byterange (whether directly from the download or from and already downloaded file doesn't really matter) decrypt the video, mux the audio and video and then append all of those muxed segments together. Once that's all done, I do a final conversion to convert from the ts container to mp4.
Clear as mud? 
|
okay, so in order to get this HD file decrypted and playable, i must remove the "junk" which is the first line in the M3u8, which in this case is "EXT-X-BYTERANGE:6772528@7520
-_2" And THEN go ahead and decrypt the file? Because from what i understood the first line of byterange is what is causing the video to not decrypt. By the way, by any chance did you successfully get an HD video to decrypt?