This script downloads video and audio from a nrk.no url.
Usage: nrk-recorder commands_and_options [duration] url [output_filename]
nrk-recorder commands_and_options batchfile [output_tag]
nrk-recorder commands_and_options
nrk-recorder url
URL
For NRK TV this should be a tv.nrk.no URL for a single program or episode.
Usually starting with http://tv.nrk.no/program/ or
http://tv.nrk.no/serie/.
For NRK Radio this should be a radio.nrk.no URL for a single program.
Usually starting with http://radio.nrk.no/serie/.
For NRK Skole this should be a klippdetalj URL:
http://www.nrk.no/skole/klippdetalj ...
Files
Filnames are generated from the video title and can be overridden by
providing an output_filename. In batch mode an output_tag can be prepended
to the filenames.
Videos are always downloaded from NRK as an flv file (even if you have
asked for mp4 or mkv). The flv file is deleted after being packaged to
mp4 or mkv unless you have explicitly asked to keep it (by providing an f
option).
Subtitles are downloaded as an srt file. Chapters are downloaded as simple
chapter files and will get a .chp file extension.
If you are making an mp4 or mkv file with subtitles the srt file is stored
to disk during the process and deleted afterwards unless you have asked to
keep it (by providing an s option). The same goes for chapters.
In interactive mode (default) you will be prompted before any files are
overwritten. You can also opt to have a counter appended to the filename
if the file already exists.
At most the program will generate eight files:
flv flash video (f) srt subtitles (s)
mp4 mpeg4 video (m) chp chapters (c)
mkv matroska video (k) txt metadata (I)
html program review (x)
jpg thumbnail (x)
A number of temporary files will be created during the download. These
will be stored in a local 'tmp' or 'temp' subdirectory if one of these
exists.
Batch mode
Batch mode allows you to download multiple videos in one command.
The batch file is a simple text file with a list of URLs (one on each
line). Blank lines are allowed as is comments starting with a hash sign
(#).
Live streams
When recording live streams you should always use the 'l' option. It's
also a good idea to specify a duration (in minutes or minutes:seconds).
Commands
m download video, subtitles and chapters as mp4 (mpeg4)
k download video, subtitles and chapters as mkv (matroska)
M download video only as mp4 (mpeg4)
K download video only as mkv (matroska)
f download video as flv (flash video)
s download subtitles as srt file
c download chapters to file (.chp)
i display metadata
I save metadata to file (.txt)
t test (harmless)
Y clean-up (remove old temporary files)
Options
1 quality high (default)
2 quality medium
3 quality low
l live recording (use this if the source is a live stream)
x get all supporting files and put it all in a sub directory
(requires m, k or f)
n interactive (will ask before overwriting files; default)
a append a counter to filename if it already exists
y force overwrite
q quiet (less verbose, qq is more quiet, qqq is silent)
v verbose
d debug
Examples
Download video as flv: nrk-recorder f http://tv.nrk.no/...
Video (flv) and subtitles: nrk-recorder fs http://tv.nrk.no/...
Video and subtitles in mp4 file: nrk-recorder m http://tv.nrk.no/...
Overwrite any existing files: nrk-recorder my http://tv.nrk.no/...
Download just subtitles: nrk-recorder s http://tv.nrk.no/...
Low quality mkv file: nrk-recorder k3 http://tv.nrk.no/...
Batch download (mkv): nrk-recorder k mylist.txt
Record live for 30 minutes: nrk-recorder ml 30 http://tv.nrk.no/...
This script uses the following programs and libraries:
AdobeHDS.php (by KSV), FFmpeg, Libav/avconv, GPAC and MKV ToolNix.
Project Admins: