Thursday, 2 May 2013

Download video content from nrk.no


Flash video download
Currently the videos on nrk.no are played back using Flash. Compared with earlier this complicates the process of downloading streamed video onto your own hard drive, in a format you can easily play back (old example oneold example two).

In this example I'm using PHP, including cURL, for downloading a video on nrk.no. To run this on my Windows machine I used Ubuntu Mint Linux on VirtualBox (alternatively I guess you can install PHP and cURL for Windows).

Mount example:
sudo mount -t vboxsf desktopWin /mnt/desktopWin/
Note: how to mount a windows folder in VirtualBox.



Finding the URL
How to find the URL for the content to be downloaded?
In Google Chrome, open Developer tools (Ctrl+Shift+I), go to "Network" and search for (Ctrl+F) "manifest". Right click the link that shows up and copy the URL.


Example link:
http://nrkclip2c-f.akamaihd.net/z/no/open/af/afbe082ef3f51c0a16ddd30407e5efd62a56e2fd/afbe082ef3f51c0a16ddd30407e5efd62a56e2fd_,141,563,316,1266,2250,.mp4.csmil/manifest.f4m?hdcore=2.11.3&g=OVCXMXUKVERE

Note: you need to click play on the Flash video before the manifest shows up in the network list.


AdobeHDS.php
Luckily a smart guy has made a nice script for downloading flash videos. Download the php script AdobeHDS.php, and execute it, using the URL you found, like:

-bash-3.2$ php AdobeHDS.php --quality high --delete --manifest 'http://nrkclip2c-f.akamaihd.net/z/no/open/af/afbe082ef3f51c0a16ddd30407e5efd62a56e2fd/afbe082ef3f51c0a16ddd30407e5efd62a56e2fd_,141,563,316,1266,2250,.mp4.csmil/manifest.f4m?hdcore=2.11.3&g=OVCXMXUKVERE'

Note:
You might have to install php and curl for php if you're on a clean linux system:

klevstul@linuxMint141 /mnt/desktopWin $ sudo apt-get install php5-cli
klevstul@linuxMint141 /mnt/desktopWin $ apt-get install php5-curl



Outside of Norway
nrk.no's content is only available from inside Norway. If you try to download from outside you might see the following error message:

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


References
http://ingvar.blog.redpill-linpro.com/2012/05/31/downloading-hd-content-from-tv-nrk-no/
https://raw.github.com/K-S-V/Scripts/master/AdobeHDS.php


Hopefully the above method works for you, without running into annoying technical issues.

"NRK, vi beklager teknisk feil".

1 comment:

  1. Hi everyone, i have developed a little GUI in java (run on all OS) for AdobeHDS.php
    Source code included !

    http://grabanymedia.altervista.org/adobehds-php-helper/

    If you want other options please comment on main download page ;)

    ReplyDelete

Allowed HTML tags:
<b>bold</b>
<strong>strong</strong>
<i>italics</i>
<em>emphasis</em>
<a href="">hyperlink</a>


Please, show the courtesy of identifying yourself when adding a comment. Anonymous comments will, most likely, be removed.