View Single Post
  #5  
Old 02-09-2017, 06:32 PM
bloodhand bloodhand is offline
Junior Member
 
Join Date: Sep 2016
Posts: 11
bloodhand is on a distinguished road
Default

Re: Download key protected m3u8


I made the guide as requested in PM, hoping it would help others too:

How to:
1) Install Firefox and AdBlock Plus plugin. Then, open the page with the video: http://protvplus.ro/produs/apropo-tv...decembrie-2016 and click ABP icon in upper-right corner and choose Open blockable items.
2) A menu will appear on the bottom and search there for "m3u8". You are interested in this link http://cdn.drm.protv.ro/protvplus.ro...o=1994000.m3u8. Right click on it and choose open in new tab. A download prompt will appear with the m3u8, save it, rename it to "1994000.m3u8" and start editing it with notepad (make sure to have format -> word wrap activated).
3) Click edit -> replace and replace "43c7a0a664d7d0fa805d26a047feda05" with "http://cdn.drm.protv.ro/protvplus.ro/2017/01/12/43c7a0a664d7d0fa805d26a047feda05.ism/43c7a0a664d7d0fa805d26a047feda05" and make sure to replace all.
4) Then, look for "URI="http://drmapi.protv.ro/keys/get/protvplus.ro/61307737"" and replace "http://drmapi.protv.ro/keys/get/protvplus.ro/61307737" with "61307737.key". After this, save the modified m3u8 file.
5) Now, to have the correct key, you need to install Fiddler 2 Portable from here: https://downloads.sourceforge.net/pr...e_mirror=netix. Install it and run it.
6) Now, go to Mozilla and refresh the page with the video: http://protvplus.ro/produs/apropo-tv...decembrie-2016. Keep it running until the video starts playing, then close the tab.
7) Go to Fiddler and look in the list for the key url: "http://drmapi.protv.ro/keys/get/protvplus.ro/61307737". Right click on it and choose decode selected session. Then, right click again and choose inspect in new window. Select Response from top, then go to HexView tab, and select all blue bytes (from F9 to 10), right-click on the selction and choose save selected bytes and save as "61307737.key".
8) Now make a folder an place "61307737.key" and "1994000.m3u8", but also a copy of ffmpeg.exe. Then, create a new batch file with this command without the quote marks: "ffmpeg -protocol_whitelist "file,http,https,tcp,tls,crypto" -i "1994000.m3u8" -c copy 1994000.mp4" and run it and you should see the video downloading successfully.

P.S. When I said select all blue bytes I meant to select the bytes written in blue (dark-blue) font at the end. Select them directly in the hex (don't bother to select the text from the right part) as it's easier.

Also, be careful that the video we talk about is broken (missing segments somewhere in the middle of the video), so it will eventually stop downloading and the video will be unplayable. You have to look and note the last present segment and reedit the m3u8 to stop downloading at that segment. Then, you have to find the first working segment after the missing ones by trial and error, make a new m3u8 and download the second part separately. After that, I had to merge them with ffmpeg concatenate option, because they didn't fix the stream yet and I wanted to keep the working part of the video.
Reply With Quote