View Single Post
  #21  
Old 08-08-2016, 05:02 PM
nwtim nwtim is offline
Member
 
Join Date: Aug 2012
Posts: 59
nwtim is on a distinguished road
Default

Re: Trying to Download VoD from CBC Sports / CBC Olympics for Rio 2016


Quote:
Originally Posted by ehurdler View Post
I am in the US, so I am not sure if this will be the same for you or not. I have nbcolympics.com, so if you have access to use that instead this will work 100%. The Canada vs. Australia game is there in full replay.

http://stream.nbcolympics.com/womens-soccer-match-2

To capture the video you will need the HDS Link Detector installed in Firefox. Just search for how to do this, install it, configure if you don’t have it already. I don’t remember the process off the top of my head. Make sure you have the updated AdobeHDS.php, set and configured properly too. Again, search for this if you don’t have it already. I am using a Macintosh, not that it makes a difference but telling you my process.

With everything installed and configured, make sure the HDS Link detector add-on is enabled. Now navigate to the game in question. Once the game starts playing you will see the add-on show the banner showing the video fragment link it captures. With this link you can capture the video fragments for this full video, and also the audio fragments for the full audio. The fragments will have to be merged together as well as the video and the audio into one full video. Those processes are rather quick and seamless.

So once the add-on gives you a link, you can modify the link and download the fragments you need and merge them together.

This is an example of the code you will need for this

Code:
Video:

php AdobeHDS.php --quality 7000 --manifest "" --delete


Audio:

php AdobeHDS.php --quality 56 --manifest "" --delete


Join: 

ffmpeg -i video.flv -i audio.flv -c copy joined.mp4
Example, Given this link from the add-on:
Code:
php AdobeHDS.php --manifest "http://olystreameast.nbcolympics.com/vod/690c26d3-280d-4d17-9d86-4ef9e406480f/nbc-olympics0803094426.ism/manifest(format=f4m-f4f,filtername=vodcut).f4m?token=st=1470317712~exp=1470317832~acl=/vod/690c26d3-280d-4d17-9d86-4ef9e406480f/nbc-olympics0803094426.ism/*~hmac=ee008b15c134623c079477ea82ebbc6bd9ef5a56e3b75d0c134162d2f37f8a30" --delete
With that link, if you take the url between the “”’s and place it within the code strings I posted above it will start capturing the video fragments, then the audio fragments in Terminal (for me since I am using a Macintosh) or a cmd prompt if you are using Windows. The link above will expire in a minute or so. So I always capture the video fragments first. This will download all the video fragments, then it will put them all together with no user interaction into a .flv file. Then I reload the soccer match in the browser to capture a new link in the add-on and paste that within the code string Above. This will as well capture all the audio fragments and put them together. All you will have to do is the last line of code I gave you to Join them with ffmpeg. Will create a video with audio into an .mp4. That will give you the highest video and audio quality possible through the nbcolympics website. You can change the video quality if you would like, but you’ll have to run the -debug script on the add-on link that is captured:

Code:
php AdobeHDS.php --manifest "http://olystreameast.nbcolympics.com/vod/690c26d3-280d-4d17-9d86-4ef9e406480f/nbc-olympics0803094426.ism/manifest(format=f4m-f4f,filtername=vodcut).f4m?token=st=1470317712~exp=1470317832~acl=/vod/690c26d3-280d-4d17-9d86-4ef9e406480f/nbc-olympics0803094426.ism/*~hmac=ee008b15c134623c079477ea82ebbc6bd9ef5a56e3b75d0c134162d2f37f8a30" -debug
That will give you a whole bunch of info that will just keep scrolling. So let it run and you are looking for the info at the top. So after a few seconds stop the debug script. You want to capture Fragments, not Keyframes.

Code:
Bitrate URL
 7001    QualityLevels(7000000)/Keyframes(video,format=f4m-f4f)
 7000    QualityLevels(7000000)/Fragments(video,format=f4m-f4f)
 4001    QualityLevels(4000000)/Keyframes(video,format=f4m-f4f)
 4000    QualityLevels(4000000)/Fragments(video,format=f4m-f4f)
 2201    QualityLevels(2200000)/Keyframes(video,format=f4m-f4f)
 2200    QualityLevels(2200000)/Fragments(video,format=f4m-f4f)
 1401    QualityLevels(1400000)/Keyframes(video,format=f4m-f4f)
 1400    QualityLevels(1400000)/Fragments(video,format=f4m-f4f)
 901     QualityLevels(900000)/Keyframes(video,format=f4m-f4f)
 900     QualityLevels(900000)/Fragments(video,format=f4m-f4f)
 601     QualityLevels(600000)/Keyframes(video,format=f4m-f4f)
 600     QualityLevels(600000)/Fragments(video,format=f4m-f4f)
 301     QualityLevels(300000)/Keyframes(video,format=f4m-f4f)
 300     QualityLevels(300000)/Fragments(video,format=f4m-f4f)
 56      QualityLevels(56000)/Fragments(audio_en_0,format=f4m-f4f)
Sorry if this is long winded, I just wrote this out quickly with what I do, so if it is too much detail that is why. Any questions let me know. Good luck, maybe this will also work for the CBC site.
This is pretty much the method I used for downloading numerous events from the 2014 Winter Olympics (QualityLevels were different), but I'm having trouble this time around. I updated to the latest PHP version (VC14) and when I run the php script to grab the video I'm getting an error saying,

You have to install the following extension(s) to continue: 'curl'

Anyone know what curl extension is needed for this?

When I try the version of PHP I used for 2014, I consistently get,

KSV Adobe HDS Downloader
Processing manifest info....
Access Denied! Unable o download the manifest.

This happens no matter how quickly I do a copy-paste-save-and run of the HDS Link capture.

What version of PHP are you who are getting successful captures using?
Reply With Quote