Audio/video stream recording forums
|
Attention Visitor: |
You may have to register or log in before you can post:
|
|
|
Thread Tools | Display Modes |
#51
|
|||
|
|||
Re: I downloaded Netflix videos in HD, I can play off line,need a little help W/.keyQuote:
|
#52
|
|||
|
|||
Re: I downloaded Netflix videos in HD, I can play off line,need a little help W/.keyI'm sure I did decryot it, and here are all the files. I didn't include the video/audio because of file size. But here are the m3u8s https://www.dropbox.com/sh/ynohnax12...sREoOHZF2jvxsa
|
#53
|
|||
|
|||
Re: I downloaded Netflix videos in HD, I can play off line,need a little help W/.keyCode:
$key = file_get_contents($argv[3]); if ($key === false) die("Failed to open key file."); $iv = $key; LogDebug("Key: " . hexlify($key)); LogDebug("IV : " . hexlify($iv)); 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. |
#54
|
|||
|
|||
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 for each segment: read segment from video read segment from audio decrypt video write video segment to temporary.ts file write audio segment to temporary.aac file ffmpeg -i temporary.ts -i temporary.aac -acodec copy -vcodec copy muxed_temporary.ts append muxed_temporary.ts to output.ts // then convert to mp4 ffmpeg -i output.ts -acodec copy -vcodec copy -bsf:a aac_adtstoasc output.mp4 You are getting close... |
#55
|
|||
|
|||
Re: I downloaded Netflix videos in HD, I can play off line,need a little help W/.keyQuote:
|
#56
|
|||
|
|||
Re: I downloaded Netflix videos in HD, I can play off line,need a little help W/.keyI know you don't wanna post the entire file due to the file size but is it possible for you to post a sample of it? I'll try this out
|
#57
|
|||
|
|||
Re: I downloaded Netflix videos in HD, I can play off line,need a little help W/.keyYea I'll post the entire thing. The file is untouchable basically until after its been decrypted so I wouldn't be able to split it. I have pretty bad upload speed. So give me a few. Lol
|
#58
|
|||
|
|||
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? |
#59
|
|||
|
|||
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? |
#60
|
|||
|
|||
Re: I downloaded Netflix videos in HD, I can play off line,need a little help W/.keyQuote:
|
Tags: decrypt, download, drm, encrypted, netflix, stream |
Thread Tools | |
Display Modes | |
|
|