Now we have a child growing up, children ... / 2011-11-21

2011-11-21 Now we have a child growing up, children ... 7 years ago
Now we have a child growing up, children's television is also something to look at. The program for young children in the Netherlands is Sesamstraat, the Dutch version of sesame street. But it's scheduled at times that we are still on our way home. The solution: connect the dvb-t stick to the server and record there, to be played on the netgear mediaplayer. I first looked at the linux video disc recorder and MythTv but both are a bit too much everything and the kitchen sink for just regularly recording a tv program to be played somewhere else. There are options for Headless VDR mode but as stated the software is optimized for tunerdevices and playing in one box, like a settop box with harddisk recorder.

I asked a bit around and got a good tip from Matt McLeod: a simple script around dvbstream to fetch the video and audio pid from the dvb stream and save the result. Originally dvbstream is designed to take dvbstreams and put them on a (multicast) network, but it can also save to file. I changed the script to use the right settings for the Dutch programs, and it works and the result plays nicely on the netgear eva mediaplayer. My version:
#!/usr/bin/perl

%nets = (
                'NL1', '-qam 64 -cr 1_2 -gi 4 -bw 8 -tm 8 -f 706000',
                'NL2', '-qam 64 -cr 1_2 -gi 4 -bw 8 -tm 8 -f 706000',
                'NL3', '-qam 64 -cr 1_2 -gi 4 -bw 8 -tm 8 -f 706000',
                );

%pids = (
                'NL1-sd', '7011 7012',
                'NL2-sd', '7021 7022' ,
                'NL3-sd', '7031 7032',
                );

$net = shift @ARGV;
$time = shift @ARGV;
$filename = shift @ARGV;
$type = "sd";

#print "$time, $net, $type\n";

$cmd = "dvbstream " . $nets{"$net"} . " -n $time -ps -o " . $pids{"$net-$type"};

system qq($cmd > "$filename");

A 2 minute testrun gave me a 42 megabyte file. If I have it correct, this is a program stream with the video and audio in mpeg-2 format. Which explains why it's quite big for the quality and amount of time recorded. If I want to keep stuff for longer, conversion to better formats will have to be done.

Update: It works as a VCR with a unix commandline interface:
koos@greenblatt:~$ at 17:25
warning: commands will be executed using /bin/sh
at> cd /scratch/sesamstraat
at> ~/webvcr/wvcrrec-nl.pl NL1 900 NL1-2011-11-22-sesamstraat.mpg
at> 
job 73 at Tue Nov 22 17:25:00 2011

Tags: , , ,

, reachable as koos+website@idefix.net. PGP encrypted e-mail preferred.

PGP key 5BA9 368B E6F3 34E4 local copy PGP key 5BA9 368B E6F3 34E4 via keyservers pgp key statistics for 0x5BA9368BE6F334E4 Koos van den Hout
RSS
Other webprojects: Camp Wireless, wireless Internet access at campsites, The Virtual Bookcase, book reviews
This page generated in 0.003930 seconds.