Audio/video stream recording forums

Attention Visitor:
You may have to register or log in before you can post:
  • Click the register link to sign up.
  • Registered members please fill in the form below and click the "Log in" button.
To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Audio/video stream recording forums > Streaming media recording forum > Video stream recording
Register FAQ Members List Calendar Mark Forums Read

Reply Post New Thread
 
Thread Tools Display Modes
  #11  
Old 03-13-2017, 12:57 PM
troller12 troller12 is offline
Senior Member
 
Join Date: Sep 2013
Posts: 433
troller12 is on a distinguished road
Default

Re: Download key protected m3u8


Hi again,

yes I see that FF does show wrong ASCII chars so that the problem.Also there is no hex view in FF or Chrome where you could see the right hex bytes you could copy and convert to ASCII.Anyway.

So I checked the site again to see how you get access to the keyfile site and there are only 2 sites called.The first site to prepair the access / allowing to the keyfile site.The first site you can call always successfully and from there you only need to grab the PHPSESSID=* value and the SERVERID=* which you now can use with the keyfile site to make a new request.So this you have to do very quick (just have 3 seconds time) to get successfully access and response = keyfile bytes instead to get status 403 forbidden. Thats all.
Code:
http://drmapi.protv.ro/hlsengine/prepare/
http://drmapi.protv.ro/keys/get/protvplus.ro/61307737
So I am not very common with ffmpeg tool but somehow it should be maybe possible to tell ffmpeg or set paramaters what to do and how to access and prepair the keylink from the playlist.Something like this....
Code:
ffmpeg -i "playlist_link.m3u8" -prelink "http://drmapi.protv.ro/hlsengine/prepare/" (PHPSESSID=*),(SERVERID=*)
...just a idea you know so I dont know whether ffmpeg has such features or not to build something like this.But if so then ffmpeg could read the prepair link first to grab the set cookie paramters from response and to use it if it does access the keyfile link from playlist to get a successfully access to this link to prevent a forbidden access.

greetz
Reply With Quote
  #12  
Old 04-09-2017, 10:06 AM
manutd manutd is offline
Junior Member
 
Join Date: Apr 2017
Posts: 6
manutd is on a distinguished road
Default

Re: Download key protected m3u8


Hi there,

So I have almost the same link with the m3u8.
This is the link:

http://cdn.drm.protv.ro/voyo/2017/04...o=1494000.m3u8

But I am stuck because it's a different path to the "key":

URI="http://voyo.ro/lbin/mplay/eshop/ws/getAesKey.php?id=156749

The key is 156749. I replaced the whole link with 156749.key, but of corse it does not work. I missed something or I am doing something wrong.

Also there are severeal links:

...
http://cdn.drm.protv.ro/voyo/2017/04...o=6000000-8.ts
http://cdn.drm.protv.ro/voyo/2017/04...o=6000000-9.ts
http://cdn.drm.protv.ro/voyo/2017/04...=6000000-10.ts
...ETC

They are from 1.ts to 2706.ts

So 2706 .TS files which together and merged will result in the whole video. 2 hors and 10 GB maybe.
Tried to get all of them with JDownloader and merged them, but off course the video is not playable...

I am stuck, please help!
Reply With Quote
  #13  
Old 04-09-2017, 02:56 PM
troller12 troller12 is offline
Senior Member
 
Join Date: Sep 2013
Posts: 433
troller12 is on a distinguished road
Default

Re: Download key protected m3u8


Hi,

you have to post the browser page where you do watch the stream.If you check this key link alone without right request header (origin / referer / cookies etc) paramters...
Code:
http://voyo.ro/lbin/mplay/eshop/ws/getAesKey.php?id=156749
....then it dosent work and you get status 403 forbidden.Just follow that key link in browser console if you see the stream and check the response = key you need and this you have to download like before was already explain.

greetz
Reply With Quote
  #14  
Old 04-10-2017, 02:14 PM
manutd manutd is offline
Junior Member
 
Join Date: Apr 2017
Posts: 6
manutd is on a distinguished road
Default

Re: Download key protected m3u8


Okay, so I spent all day trying to make this work, I have some progress but not the final result, because again I get stuck.

The main BIG difference is that I don't have only one .m3u8 like the one in example (http://cdn.drm.protv.ro/protvplus.ro...=1994000.m3u80)

instead I have the following .m3u8's links:

1) http://cdn.drm.protv.ro/voyo/2017/04...o=1494000.m3u8
2) http://cdn.drm.protv.ro/voyo/2017/04...o=2000000.m3u8
3) http://cdn.drm.protv.ro/voyo/2017/04...o=6000000.m3u8
4) http://cdn.drm.protv.ro/voyo/2017/04...eo=995000.m3u8
5) http://cdn.drm.protv.ro/voyo/2017/04...deo=64000.m3u8
And it does not STOP, the further the video plays the more liks appear.

So here are 5 links for the 10 minutes of the video
-1494000.m3u8
-2000000.m3u8
-6000000.m3u8
-995000.m3u8
-64000.m3u8

I'm not 100% sure that new links apprear, I am 20 min in the video so far, and no new links.
I don't really know how this works I move the video until the end and there were no new links generated.
So I think 6 links with . m3u8

Another issue I think is my "key". The link is this:
URI="http://voyo.ro/lbin/mplay/eshop/ws/getAesKey.php?id=159764" and the key is: 159764, CORRECT?
So replaced the link: "http://voyo.ro/lbin/mplay/eshop/ws/getAesKey.php?id=159764" with "159764.key"

Another thing is the key in hex in not BLUE is just BLACK.

I made 3 links and I attached the results from batch:





I do not understand what is wrong, I'm I doing something rong or I miss something? Or it is impossible to get the video from this type of link.

Thank you in advance!

LE: There were no ne links generated after 1 hour of video.

Also here are my modified .m3u8 files. They all have the same key: 159764 (if that is the right key anyway)
https://ufile.io/43403
https://sharefa.st/download/cPp90ZsYO4F2/rar
Reply With Quote
  #15  
Old 04-10-2017, 04:31 PM
troller12 troller12 is offline
Senior Member
 
Join Date: Sep 2013
Posts: 433
troller12 is on a distinguished road
Default

Re: Download key protected m3u8


Hi,

again: Post the browser pagelink where you do watch the stream.

If the key link is protected (need to use specific static or also dynamic request paramters) then ffmpeg & Co will fail to get successfully access to this link.

So the 5 playlist links you have are a part of the master playlist you can normaly use with hlsvariant scheme to choose any link with qualitiy X.So in your case you can choose from 5 diffrent streams.If you look inside of these single playlist then you can see another infos like all ts links from 1 - 2706 = your entire stream you want to download.At the top you can see the key method info and link...
Code:
EXT-X-KEY:METHOD=AES-128,URI="http://voyo.ro/lbin/mplay/eshop/ws/getAesKey.php?id=159764"
...this is the link to request the key.So if you now call this key link alone without any specific parameters then it dosent work and I get status 403 forbidden as response back.So you can try this simple by yourself if you enter the link in your browser and check the browser console.So it means you need specific request paramters to call this key link successfully and to get response status 200 for example and then you can also see some key datas into response content.Also this you can check / follow in your browser if you enter the stream address where you can watch the stream.Thats why I did ask you post the URL of the stream to grab all datas by myself.

The id 159764 isnt the key so its just a part of the key URL to read the key bytes from.What you have to do is to download the key bytes into a file which you can then name to 159764.key or whatever and then mod the playlist (as you can see some posts before) and then use ffmpeg to play or download your video.

If you got the right key bytes into your key file then it will also work but if they wrong then you get the message like on the picture you did postet of ffmpeg (failed to open segment).

Just try again and check the example above another time which is same to your link.

PS: Post the page URL of the stream next time.

greetz
Reply With Quote
  #16  
Old 04-10-2017, 05:09 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


Sorry for my late reply. Please post original link of the video where you watch it in the browser. When I'll have that link, I'm going to test and rewrite the guide for your personal case. I also hope we don't need an account for that, but as far as I know voyo cannot be accessed without a paid account.

You must use my previous guide to find the key in Fiddler, then save it as the keyfile. This is the only thing that's left for you to do and this is the reason you get the error in ffmpeg command line response.

And yes, "troller12" is right, each m3u8 is for a different video quality and that number is actually the bitrate of the video in bps I think.

LE: Never mind, I tested with your link above and it's working. You got the key file correctly, but you edited the m3u8 the wrong way. After you download the above m3u8, you have to edit it and use the replace function in notepad to replace "159764-d415cfea8fa04e84b60543d1ffaab521" with "http://cdn.drm.protv.ro/voyo/2017/04/10/159764-d415cfea8fa04e84b60543d1ffaab521.ism/159764-d415cfea8fa04e84b60543d1ffaab521". Please take into account that you have to actually use the same path as the m3u8, but you have to pay attention to the fact that notepad replace with cannot be very long, so you have to replace only a part of the link, but you have to make sure it matches perfectly. Also, do not forget to replace the keyfile link with the local *.key file. It should work now with no issues with your key file provided, I tested it a minute ago and it works.

So you must pay attention to the m3u8 renaming of all ts parts according to the original location of the m3u8.*

P.S. Too bad they didn't update the database for Apropo TV and Romania Te Iubesc, but luckily for us, we have IceTorrent and SceneFZ trackers to download MOO/iREAL releases...
Reply With Quote
  #17  
Old 04-11-2017, 02:11 AM
manutd manutd is offline
Junior Member
 
Join Date: Apr 2017
Posts: 6
manutd is on a distinguished road
Default

Re: Download key protected m3u8


i'm at work right now, loging from my mobile via chrome remote but i will read what you guys wrote and replay as soon as possible
Reply With Quote
  #18  
Old 04-11-2017, 11:36 AM
manutd manutd is offline
Junior Member
 
Join Date: Apr 2017
Posts: 6
manutd is on a distinguished road
Default

Re: Download key protected m3u8


@troller12

This is the main link for the video:
http://voyo.ro/product/emisiuni/1584...lent-2017-ed-8

But I forgot to mention because I think it matters, it does not autoplay like the link-video from apropo.ro, also you need an account, otherwise the video won't start.

I am a bit lost about "hlsvariant scheme"...

I uploaded the 159764.key for you to check.

First thing that I did was to make the apropo.ro video link, It worked but at one point when the filesize was 32 Mb or 320Mb it got stuck because of a segment error, I can't remember exactly because it was 2 days ago.

Sorry about not posting the original video URL, it's this one I think: http://voyo.ro/product/emisiuni/1584...lent-2017-ed-8

But like I said it won't worked for you.
All the video links are in the attachments:
http://cdn.drm.protv.ro/voyo/2017/04...o=2000000.m3u8
http://cdn.drm.protv.ro/voyo/2017/04...o=6000000.m3u8
http://cdn.drm.protv.ro/voyo/2017/04...deo=64000.m3u8

Also this one which is different, it's something with resolution:
http://cdn.drm.protv.ro/voyo/2017/04...1ffaab521.m3u8

thank you!


@bloodhand

The link-video is different than apropo.ro because it does not starts automatically and you need an account to watch, here it is:
http://voyo.ro/product/emisiuni/1584...lent-2017-ed-8

Okay so each of these:
-1494000.m3u8
-2000000.m3u8
-6000000.m3u8
-995000.m3u8
-64000.m3u8
represents the QUALITY, because I have 6 options in my browser lol:
LQ
MQ1
MQ2
MQ3
HQ1
HQ2
now I think I understand what these means.

So from this m3u8 I replaced:

"d415cfea8fa04e84b60543d1ffaab521-audio=159985-video=6000000-1.ts
#EXTINF:3, no desc
159764"

"d415cfea8fa04e84b60543d1ffaab521" with "http://voyo.ro/lbin/mplay/eshop/ws/getAesKey.php?id=159764"

and all the links look like:

http://voyo.ro/lbin/mplay/eshop/ws/g...o=6000000-1.ts
#EXTINF:3, no desc
159764

Don't remember exactly but I think this is what I did yesterday

And only ONE link at the begining for the key:
"http://voyo.ro/lbin/mplay/eshop/ws/getAesKey.php?id=159764" with "159764.key" this I think I got it wright.

I will try again NOW after I write this to you.

This is why I want to do this because the last episode from Romanii au talent is messed up and I want a quality video from that episode. SceneFZ is closed and IceTorrent uploader missed the last episode and was uploaded from somwhere else, that's why it's so messed up.

So thank you very very much for this!

I will begin now and will come back with results!!!!
Reply With Quote
  #19  
Old 04-11-2017, 12:26 PM
troller12 troller12 is offline
Senior Member
 
Join Date: Sep 2013
Posts: 433
troller12 is on a distinguished road
Default

Re: Download key protected m3u8


Hi,

so why dont say it that you need a account?Ok without account I cant check the process and I dont register there just to check this.

So you dont need to enter the key link URL into the playlist for the ts parts so there you need to enter the playlist link without the last path part + ts path = Entire URL to ts parts.
Code:
159764-d415cfea8fa04e84b60543d1ffaab521-audio=63985-video=64000-1.ts

to

http://cdn.drm.protv.ro/voyo/2017/04/10/159764-d415cfea8fa04e84b60543d1ffaab521.ism/159764-d415cfea8fa04e84b60543d1ffaab521-audio=63985-video=64000-1.ts
Do this with all ts paths inside.Later you do call the modded playlist from your computer with ffmpeg and not from the internet.Thats the reason why you have to edit it.If you also got downloaded your key bytes already into a file then enter the file path at the key URI location in your modedd playlist and now start ffmpeg with the right paramters.

greetz
Reply With Quote
  #20  
Old 04-11-2017, 01:09 PM
manutd manutd is offline
Junior Member
 
Join Date: Apr 2017
Posts: 6
manutd is on a distinguished road
Default

Re: Download key protected m3u8


Sorry troller12 I forgot to mention that, but I can provide all the necessary links from this video and the key.

GOD... now I get error "empty playlist"...

Also I am so stupid that I don't know how to to what you said...

will try again...
come back later with results

thank you


LE: here are my m3u8 files which I am so limited and can't modify correctly:
https://ufile.io/68e21
https://sharefa.st/download/kbcmnip1UAF2/rar

I still get empty playlist in ffmpeg...

LE2: all the modified links from the m3u8 file look like this:
no deschttp://cdn.drm.protv.ro/voyo/2017/04/10/159764-d415cfea8fa04e84b60543d1ffaab521.ism/159764-d415cfea8fa04e84b60543d1ffaab521-audio=159985-video=6000000-1.ts
#EXTINF:3

correct?

LE3: So I intentionally NOT modified the URL for the key just to see what is different:




LE4:

So I changed in batch the extension from .mp4 to .ts and now this is happening:


Also I don't really know who ffmpeg works, I would like to extract the original file from the link which I think is .ts?
Also would like to know if I can convert the original .ts file to an .mkv or .mp4 file with the bitrate that I CHOOSE! but this is not a priority, the priority is to modify the m3u8 file correctly.

Ok so the video is 2 hours and 15 minutes and 4 minutes passed and the process is this:

00:00:03.84 meaning 3 minutes from the whole 2 hours and 15 minutes? is there a way to speed this up?


FINAL EDIT:?


Does this means that this is ok? no error message whatsoever. I got it right the first time I edit, what was wrong was the command inside the batch.
I just replaced .mp4 with .ts.

It runs a bit faster now 2 mintes and the progress is at 14 min from 2 hours.
Also will let the other one to finish.

Will come back with results!

Last edited by manutd : 04-11-2017 at 02:45 PM.
Reply With Quote
Reply Post New Thread
Tags: , , , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 10:23 AM.


Powered by All-streaming-media.com; 2006-2011
vB forum hacked with Zoints add-ons