Re: I downloaded Netflix videos in HD, I can play off line,need a little help W/.keyQuote:
|
Re: I downloaded Netflix videos in HD, I can play off line,need a little help W/.keyQuote:
|
Re: I downloaded Netflix videos in HD, I can play off line,need a little help W/.keyCode:
$key = file_get_contents($argv[3]); According the HLS spec, if the IV isn't specified in the #EXT-X-KEY, which it isn't, then the IV is the sequence number. The #EXT-X-MEDIA-SEQUENCE tag specifies the starting sequence number for the playlist, in this case, 0. Each url in the playlist is a sequence. So the first url in this case is sequence #0, the second is sequence #1, etc. The IV for each url is then encoded as a 128 bit big endian representation of the sequence number for that url. So the first URL (sequence #0) the IV is \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x 00\x00\x00\x00 For the second URL (sequence #1) the IV is \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x 00\x00\x00\x01 and so forth. I believe that's the reason why you can't decrypt. |
Re: I downloaded Netflix videos in HD, I can play off line,need a little help W/.keyTo help you further along, I found that if I muxed the audio and video as whole files I occasionally had audio sync problems. To resolve that, I would mix them as chunks. So my decryption process was something like (pseudocode):
Code:
create output.ts file You are getting close... :) |
Re: I downloaded Netflix videos in HD, I can play off line,need a little help W/.keyQuote:
|
Re: I downloaded Netflix videos in HD, I can play off line,need a little help W/.keyQuote:
|
Re: I downloaded Netflix videos in HD, I can play off line,need a little help W/.keyQuote:
|
Re: I downloaded Netflix videos in HD, I can play off line,need a little help W/.keyEach 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? :) |
Re: I downloaded Netflix videos in HD, I can play off line,need a little help W/.keyQuote:
-_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? |
Re: I downloaded Netflix videos in HD, I can play off line,need a little help W/.keyQuote:
|
All times are GMT -6. The time now is 03:12 AM. |