DVB Configuration

Freevo can be configured to use MPlayer, Xine or VLC to watch DVB streams. If you are using MPlayer some useful information can be found in their documentation. Freevo also supports multiple DVB tuners (you can watch and record DVB streams at the same time for example) - to configure it to use a dual tuner or the like check out the DVBConfig-Dual article. If you still need to set up a card, have a look at the DVB Cards article. There is also a description of how to configure Digital TV with softcam.

Video Group Configuration

Switch the group_type to 'dvb' in your VideoGroup:

TV_VIDEO_GROUPS = [
    VideoGroup(vdev='/dev/dvb/adapter0', #We don't need to point this at the actual frontend
               adev=None,
               input_type='tuner',
               input_num=1,
               group_type = 'dvb',
               record_group=None,
               desc='DVB Viewer'),
]

TV_CHANNELS

Create a 'channels.conf', make sure no '/' are in the names (mplayer doesn't like that). Detailed instructions on how to do this are over at the linuxtv.org DVB wiki. Put your channels.conf into the .mplayer (and .xine) directory in your home, then add your TV_CHANNELS configuration to the 'local_conf.py':

TV_CHANNELS = [
#   ( 'XMLTV NAME', 'FREEVO DISPLAY NAME', 'CHANNELS.CONF NAME' ),
    ( 'ard.de', 'ARD', 'Das Erste RB' ), 
    ( 'zdf.de', 'ZDF', 'ZDF' ),
    ( 'ndr.de', 'NDR', 'NDR RB' ), 
    ( 'rtl.de', 'RTL', 'RTL Television' ), 
    ( 'sat1.de', 'SAT.1', 'SAT.1' ), 
    ( 'rtl2.de', 'RTL 2', 'RTL2' ), 
    ( 'prosieben.de', 'PRO 7', 'ProSieben' ), 
    ( 'kabel1.de', 'KABEL 1', 'KABEL1' ), 
    ( 'vox.de', 'VOX', 'VOX' ), 
    ( 'n24.de', 'N24', 'N24' ), 
    ( 'arte-tv.com', 'ARTE', 'arte' ), 
    ( 'C3sat.de', '3SAT', 'Info 3sat' ), 
    ( 'superrtl.de', 'Super RTL', 'Super RTL' ), 
    ( 'kika.de', 'Kika', 'Doku KiKa' ) ]

The first line is the XMLTV name or number (the first column of your XMLTV conf file), the second the Freevo display name and the last the 'channels.conf' name. To get a template for your configuration (after setting up XMLTV) you can run:

freevo tv_grab
freevo tv_grab --query

Examples

MPlayer Configuration

Make sure the 'dvb' key is defined in your MPLAYER_ARGS:

MPLAYER_ARGS = { 'dvd'    : '-cache 8192',
                 'vcd'    : '-cache 4096',
                 'cd'     : '-cache 1024 -cdda speed=2',
                 'tv'     : '-nocache',
                 'ivtv'   : '-cache 8192',
                 'dvb'    : '-vf pp=de/fd -cache 4096',
                 'avi'    : '-cache 5000 -idx',
                 'rm'     : '-cache 5000 -forceidx',
                 'rmvb'   : '-cache 5000 -forceidx',
                 'default': '-cache 5000'
                 }

Recording and Re-encoding

A few options are available for recording and/or re-encoding DVB streams - a straight-out stream dump using mplayer, using mencoder to re-encode on the fly, automatic re-encoding once the recording is complete and manual re-encoding via the reencode plugin.

MPlayer Stream Dump

For a straight dump of the stream change your VCR_CMD to:

VCR_CMD = CONF.mplayer + ' -dumpstream -dumpfile %(filename)s "dvb://%(channel)s"'
TV_RECORDFILE_SUFFIX = '.ts'

This will dump the stream to your disk, just as it is, without any further compression. A usual movie with a length of 90 min, will result in a file of around 3-4GB. This is okay if you have a lot of free space or want to watch it once then delete it but if you want to keep the recording you probably want to transform it to a smaller format.

MEncoder

To re-encode your DVB stream before it hits the disk set VCR_CMD to something like:

VCR_CMD = CONF.mencoder + ' -o %(filename)s.avi -ovc xvid -xvidencopts bitrate=800 -oac mp3lame -lameopts cbr:br=128 -pp=ci "dvb://%(channel)s"'

TV_REENCODE

(Available in 1.8.1) Re-encoding using this method will use more space as the entire stream is dumped to disk first and then re-encoded. The advantages are it's distributed as it uses the EncodingServer and you get to keep the original source stream if needed (although this can be removed setting TV_REENCODE_REMOVE_SOURCE = True). In the future it might allow time-slice re-encoding (e.g. trim commercials from the beginning/end of a recording, removing commercials altogether etc.) but this hasn't been implemented. The TV_REENCODE sets up an EncodingServer job using the default settings for the reencode plugin (this means you will need a running EncodingServer).

To configure TV_REENCODE, set the following (obviously tune the REENCODE_* variables to your needs):

TV_REENCODE = True
TV_REENCODE_REMOVE_SOURCE = False

REENCODE_CONTAINER = 'avi'
REENCODE_RESOLUTION = 'Optimal'
REENCODE_VIDEOCODEC = 'XviD'
REENCODE_ALTPROFILE = None
REENCODE_VIDEOBITRATE = 1200 #This is an integer value, not a string (i.e. don't put "'1200'", it won't work)
REENCODE_AUDIOCODEC = 'MPEG 1 Layer 3 (mp3)'
REENCODE_AUDIOBITRATE = 192
REENCODE_NUMPASSES = 2
REENCODE_VIDEOFILTER = None
REENCODE_NUMTHREADS = 2

reencode Plugin

The reencode plugin allows you to create EncodingServer jobs from inside the Freevo GUI. The TvPlugins page has documentation for configuring the reencode plugin.

DVBConfig (last edited 2008-10-26 21:08:08 by Tanja)