Downloading HD content from

Update: I’ve made some helper scripts, including a script to download subtitles. See

NRK (Norwegian Broadcasting Corporation) recently deployed their new net TV broadcasting solution,, with, among other nice features, HD content. For Linux users, regretfully, the player is implemented in Flash.

Generally, Linux users would like more control. Here’s how to download video content from (and probably other sites using the same technology), and play it offline on Linux.

The flash player uses AdobeHDS for streaming fragments via Akamai’s CDN. The magic consists of three steps: Getting the manifest describing the fragments. Downloading the fragments. Merging the fragments into a playable file.

First for downloading and merging. This is all done by one single magic script, AdobeHDS.php, that can be downloaded from All praise to KSV who made the script. By some strange reason, the script is written in PHP, so you need to have that installed as well.

Put the script somewhere where it’s easy to find it, like in ~/bin, and you’re good to go. Now you just need to get the manifest url.

To get the manifest, use a recent version of Mozilla Firefox. Surf to, and hit Ctrl+Shift+K to enable Firefox’ built-in website debugger. In the filter box, enter manifest and press enter. Find your video in the web browser panel, and start it. Let it play for a second or five, and the URL to the manifest should appear in the debugger window. Click on the match and copy the url.

Now just call the merge script with the manifest url. Add the delete option to get rid of the fragments after merging. Use quotes to avoid problems with special characters like ‘?’ and ‘&’.

php ~/bin/AdobeHDS.php --quality high --delete --manifest ''

                            KSV Adobe HDS Downloader

Downloading fragment 1116/1116
Found 1116 fragments
Joined 1116 fragments in 205.07 seconds

The result will be a video file that you can play with any recent media player, like totem or mplayer (given you have the right codecs installed, of course). NRK seems to favour h264 video with aac audio in the flv (“flash video”) container.

Now for subtitles. I made a small perl script that builds .srt files from NRK’s html subtitle format. Download the script and place it somewhere handy, like in ~/bin, and run chmod +x on it to make it executable. You will need the following cpan modules: DateTime::Precise, Text::Iconv, and HTML::TokeParser::Simple.

Go back to your browser window, and in the debug filter, search for “subtitles” (without quotes). Reload the page if necessary. Click on the match, and copy the url. Then run the script with the subtitles url in the same directory as where you downloaded the film. The result should work for example with mplayer or totem. Example:

perl ~/bin/nrk-subtitles >
mplayer -sub film.flv


Tags: ,

112 Responses to “Downloading HD content from”

  1. Chris says:

    Great work godztian!

    I really appreciate the work you have put into this. I hope you will publish the script so that others can make use of your work an expertise.

    Thank you, thank you!

  2. Benjamin Smith says:

    Don’t know why PHP gets no respect as a CLI script language on par with python or perl.

  3. Mads says:

    You should make a version for this with libquvi:

    By doing this, we could play NRK files directly from mpv/mplayer by URL only. Would be awesome!

  4. cirrus says:

    Why not just write a plugin for livestreamer to stream content from that site ? still great work, thanks brethren

  5. ingvar says:


    Seems like a livstreamer plugin for already exists. Enjoy! :-)


  6. ingvar says:

    Mads, if all you want is streaming, try livestreamer. It does exactly this, and has a plugin for

  7. ingvar says:

    Sorry, mocking PHP is just unavoidable.

  8. Hi everyone, i have developed a little GUI in java (run on all OS) for AdobeHDS.php

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

  9. Peter says:

    Method still working? Because I cant find any manifest in debuger :/
    To download the file i must have norwegian ip?

    Thx for answer :)

  10. ingvar says:

    Hi, Peter. This method does still work, as do the scripts linked to in the post. But you need a Norwegian IP, yes.

  11. Peter says:

    Ok thx for answer :) but how i get this link from debuger exatly?

  12. ingvar says:

    Peter, in Firefox, press Ctrl+Shift+K, select “Console” and “Net”. In the search box, enter “manifest”. Reload the page and start the in-browser player. If you don’t get any result, your browser probably selects a non-flash player. Try with curl instead: In a terminal shell, enter something like this: curl | grep manifest


Leave a Reply