[MPlayer-dvb] Record dvb-t on Ubuntu linux

Santiago Muelas smuelas at telefonica.net
Tue Mar 27 13:20:03 CEST 2007


Hi Moises,

What you are looking for is simply:  "mencoder -endpos 00:30:00 
........"  (this will record during 30 min.)

I have made a Java application that launches different scripts to do 
what you want. It is possible to select the channel to see TV or record 
immediately what you are seeing or program "cron" to record some channel 
at some time some day. If you want I can send it to you or put it in a 
place for you to download (don't remember the size).

To see TV I use a script with name "mt":
mplayer -vf crop=688:540:16:16 dvb://$1 > /dev/null

I have my channels with names that I've changed. So to see TVE1, I 
write:  "mt tv1" and after a few seconds it begins.
If there is a film with ratio 16:9 on TV I have "mt1":
mplayer -vf crop=672:400:24:88 dvb://$1 > /dev/null

and so on.   To record, I have for normal size, "gb":
mencoder -endpos $3 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=1200 
-vf crop=688:544:16:16,scale=512:384 -oac copy -o $2 dvb://$1 > /dev/null

(The croping and/or scaling is done as usually the signal includes some 
ugly black lines at borders and depending on your computer speed/ram).

To record TVE1 during 1h-20min with the name "myrecord.avi", I write:  
"gb tv1 myrecord.avi 01:20:00"  and it is done. (I have all my scripts 
in /usr/local/bin)

The same can be changed according to your computer if you prefer bigger 
size. Also it is convenient to do a deinterlace using "pp=lb" as many 
signal are interlaced (live ones almost always).

Now, if I want to make a recording at a certain day/time I prepare a 
file "set.cron":
0 20 31 12 *  /home/myhome/grabar

and run crontab on it. Then I write file "grabar" as:
/usr/local/bin/gb2 tv1 /home/myhome/grabacionesTV/record_1.avi 02:00:00

and I know that the 31th. of 12 (December) at 20h-0min, the file grabar 
will be launched and the program on TVE1 (hopefully) recorded during 2 
hours with a ratio of 2.33:1 (I use gb2 for this ratio).

(As you can imagine, you can use your preferred instructions for mencoder.)

The Java program runs all that without need to write anything.


Hope to have been useful.

Santiago


Moisés Pérez wrote:
> Hello!!
> I'm using a Ubuntu linux and running Mplayer with a dvb-T USB CARD
> The USB CArd works correctly and I can use the tools scan, dvbstream,
> etc....
>
> I want to record my favorite dvb-t channels and I found in docs the 
> way to
> do it:
>
> mplayer -dumpfile r1.ts -dumpstream dvb://CHANNEL
>
> Or in avi file:
>
> mencoder -o r1.avi -ovc xvid -xvidencopts bitrate=800 -oac mp3lame
> -lameopts cbr:br=128 -pp=ci dvb://CHANNEL
>
> The second doesn't work, but it isn't the problem, the problem is that I
> want to do this record at night, programing it with cron or at
>
> My question is that I can't found a way to do a  record with mplayer of a
> determined duration, as 50 minutes.
>
> I've being searching and I found and way to do this for recording 
> audio with
> mims, which supports this option:
>
> and if this option isn't available; I've thougth doing a script and 
> launch
> it with cron, but how can i stop it after a determined duration??
>
> Thanks in advance.
>
> NOTE: I'm not very experienced in Linux and, at least, sorry for not very
> correct english....I hope you understand it!!
>
>
> Bye!!
> _______________________________________________
> MPlayer-dvb mailing list
> MPlayer-dvb at mplayerhq.hu
> http://lists.mplayerhq.hu/mailman/listinfo/mplayer-dvb
>




More information about the MPlayer-dvb mailing list