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

Greg 'groggy' Lehey grog at lemis.com
Wed Mar 28 01:30:18 CEST 2007


On Tuesday, 27 March 2007 at  0:24:50 +0100, Moiss Prez 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 have a little program which does exactly this.  Take a look at
http://www.lemis.com/grog/programs/record/record.tar.gz .  Run it
without parameters for instructions.  You'll have to modify the
structure dvbchannels to adapt to your local stations.  Here's the
beginning:

struct channel
{
  char *name;                                               /* our name for the channel */
  char *handle;                                             /* the name that TZAP expects */
  char *description;                                        /* comments about the channel */
  int bps;						    /* bits per second */
}
dvbchannels [] = {
/* first some easy abbreviations */
  {"ABCH", "ABC HDTV", "ABC TV, high definition, no sound", 3750},
  {"ABC2", "ABC2", "ABC TV 2, normal definition", 0},
  {"ABC", "ABC TV", "ABC TV, normal definition", 0},
  {"7", "7 Digital", "7, normal definition", 0},

As you can see, the bps field is wrong; it's not used, so you don't
need to change it.

Run without parameters to get the usage message:

   record [options] programme filnename [-s date [-e date | -t duration]]

   -s date Start recording at  date
   -e date Stop recording at  date
   -t<time>        Record for time specified
   -n:     Pretend mode: stop after checking parameters
   -a:     Use an analogue tuner (otherwise DVB)
   -q:     Be quiet: don't show what I'm doing

   <time> is of the form hh:mm[:ss]
    date can be [day month-name [year]] hh:mm[:ss]
           or [year-month-day] hh:mm[:ss]
   Specify either end time or duration, not both

Read the README file for more details, and let me know if you have any
problems.

I also have a script that I play around with to display these saved
streams.  If anybody's interested, I'll tidy it up and put it on the
web too.  In principle it generates the output

  mplayer -cache 16384 -osdlevel 3 -vf screenshot -monitoraspect 16:9 -framedrop -fs -really-quiet filename

Greg
--
Finger grog at lemis.com for PGP public key.
See complete headers for address and phone numbers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dvb/attachments/20070328/d457745d/attachment.pgp>


More information about the MPlayer-dvb mailing list