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
  #1  
Old 03-26-2014, 02:29 AM
sebastian sebastian is offline
Member
 
Join Date: Jun 2007
Posts: 81
sebastian is on a distinguished road
Default

Download encrypted YouTube livestreams


Hi guys,

this weekend I'd like to download a livestream from YouTube which won't get archived. Now I would like to learn, what I can do, if the stream would be encrypted. With my google search, I found the following info by the user "recover" on http://stefansundin.com/blog/452

Quote:

@sawl I’ve figured it out. It’s an encrypted “stream”, but thankfully, it’s not that difficult to decrypt. It’s obviously not live, that’s why there are no index.m3u8 requests. It only needs one, in the beginning, so it’s easy to miss.

A trick you can do to get a new index.m3u8 request is to change the quality. Download that index.m3u8 and open it with a text editor. One of the first lines will have: “#EXT-X-KEY:METHOD=AES-128″, then an URL which contain the key, and then an IV value which contains the initialization vector for the key. Download the key, it’s in binary so I recommend that you use wget, or your browser may insert HTML and crap into the file when you save it. Save the key as hlskey.txt.

Now that you have the keys, you must get the encrypted ts files. Instead of using mplayer in the post above, you should simply do a few regular expressions on the playlist entries so you get a nice wget script (use -O to specify the output filename). Then when you have everything, it’s time to decrypt the files. I use Linux commands below, but you can probably find openssl for Windows as well (or run in a VM).

Create a bash script:

Code:
hexKey=$(cat hlskey.txt | hexdump -e '16/1 "%02x"')
hexIV=990C276E28BC6B83E21A6D6F75483732
openssl aes-128-cbc -d -p -nosalt -iv ${hexIV} -K ${hexKey} -in encrypted.ts -out decrypted.ts
As you can see you must remove 0x from the IV. And obviously make a loop or something to go through all your ts files.

Then you can continue as normally and merge the ts files. Good luck!
So how could that work on a windows machine? For the encrypted stream itself, would it be a good method to get it via

Code:
ffmpeg -i “http://streamlocation.m3u8″ -c copy c:\FileName.ts
and the find a way to decrypt it? Or would ffmpeg mess the encrypted stream up?

It would be great if you could help me! :-)
Reply With Quote
  #2  
Old 03-26-2014, 02:47 AM
peterpan peterpan is offline
Senior Member
 
Join Date: Jun 2013
Posts: 553
peterpan is on a distinguished road
Default

Re: Download encrypted YouTube livestreams


Give specific examples. If you have the encrypted stream in question and you're trying to download it, post it.
Reply With Quote
  #3  
Old 03-26-2014, 05:33 AM
sebastian sebastian is offline
Member
 
Join Date: Jun 2007
Posts: 81
sebastian is on a distinguished road
Default

Re: Download encrypted YouTube livestreams


Thanks blimey. I will see if that will work! :-)
But what's the advantage on Flash Stream Hunter over ffmpeg here?

Quote:
Originally Posted by peterpan View Post
Give specific examples. If you have the encrypted stream in question and you're trying to download it, post it.
It's a livestream, so the example doesn't exist yet. ;-) It's the livestream of Ultra Music Festival in Miami. They are streaming on Friday to Sunday via http://www.youtube.com/umftv
Reply With Quote
  #4  
Old 03-28-2014, 02:48 PM
sebastian sebastian is offline
Member
 
Join Date: Jun 2007
Posts: 81
sebastian is on a distinguished road
Default

Re: Download encrypted YouTube livestreams


Here it is. But I have absolutely no idea, how to record it.

https://www.youtube.com/watch?v=MF0UNmHzu5Y

Anyone with a hint?
Reply With Quote
  #5  
Old 03-28-2014, 03:40 PM
blimey blimey is offline
Former Member
 
Join Date: Jul 2006
Posts: 286
blimey is on a distinguished road
Default

Re: Download encrypted YouTube livestreams


It has m3u8, link is encoded with your IP. Use firefox...

Last edited by blimey : 03-29-2014 at 12:28 PM.
Reply With Quote
  #6  
Old 03-28-2014, 04:28 PM
lesor lesor is offline
Member
 
Join Date: Feb 2011
Posts: 65
lesor is on a distinguished road
Default

Re: Download encrypted YouTube livestreams


Quote:
Originally Posted by blimey View Post
It has m3u8, link is encoded with your IP. Use firefox...




Last edited by lesor : 03-28-2014 at 06:11 PM.
Reply With Quote
  #7  
Old 03-26-2014, 03:49 AM
blimey blimey is offline
Former Member
 
Join Date: Jul 2006
Posts: 286
blimey is on a distinguished road
Default

Re: Download encrypted YouTube livestreams


UVDConvert.php will probably work on that sort of encryption, either as-is, or with minor modifications. See usage.

Last edited by blimey : 03-26-2014 at 09:56 AM.
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 01:17 PM.


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