Linux Freevo howto
Updated on 27/Feb/2005

In this howto we explain, with examples, how to configure freevo to view Italian and Hotbird channels mixed up and how to configure for right using with a lirc remote control.
This how to will not use Freevo with frequency, channel synth is done by mplayer.

Contents


Requirements

First stage:

Second stage:

  • channel list with device and frequency
  • mplayer fully configured

Third stage:

  • xmltv working to fetch a TV.xml
  • mencoder working and configured

Well, let's start!


Stage 1

Download, compile and install Freevo, check if it will start and play some mp3 or videos, if not, check on internet for an entry level how to.
Compile mplayer with DVB support and V4l support, if you need either.

Stage 2

  • DVB
  • Analog TV

DVB

You need a standard channels.conf, you can make it by dvb-apps with scan tool, search on internet for this...
channels.conf rows are:

cat ~/.mplayer/channels.conf |grep "Canale 5"
Canale 5:11919:v:0:27500:513:660:2
Name Transponder frequency Vertical-Horizontal ? Simbol Rate ? ? Program ID

for example to stream channel "Canale 5" with vlc:
vlc -vvv --program 2 --dvb-frequency 11919000 --dvb-srate 27500000 dvb: --sout udp:192.168.0.255 --ttl 1
What I can do with channels.conf?
  • you need it because let's you run mplater with "dvb://Canale 5" to simply start viewing the channel
  • work with xine
  • let's you find frequency for VLC and mythtv
  • give you the list of Channel names to fill the freevo static channel configuration

Analog TV

You need to know the channelid, frequency, where a Channel trasmits. You can scan it with kdetv or xawtv or other software.
You will have a couple of:

channelID channel Name
What I can do with these informations?
  • you need it because let's you run mplater with "tv://Canale 5" to simply start viewing the channel
  • give you the list of Channel names to fill the freevo static channel configuration
How I can tell to mplayer my analog, v4l, channel list?
you can put into ~/.mplayer/config these lines or try to append it your shell command
tv="driver=v4l2:device=/dev/video0:norm=PAL:chanlist=italy:channels=D-RAI 1,22-Italia 7,26-Rete A,27-RAI 2,43-RAI 3,46-Italia 7Gold,47-1G,52-Canale 5,55-SI,58-Italia 1,59-MTV,62-Rete 4"

and now?

at this time you can do this:

  • mplayer "dvb://Canale 5"
  • mplayer "tv://Canale 5"
to view channel named "Canale 5" with DVB or analog TV.
Now we can start configuring Freevo and using it!

Freevo

Freevo is written in python, very powerful.....
main configuration files are stored in /etc/freevo
Edit local_conf.py general setup may be done by searching on internet or reading internal configuration comments.
The hard if how we configure TV input cards:

VIDEO_GROUPS = [
     VideoGroup(vdev='/dev/video0',
                 adev='/dev/dsp',
                 input_type='tuner',
                 input_num=4,
                 tuner_norm='PAL',
                 tuner_chanlist='italy',
                 tuner_type='internal',
                 desc='TV kaart',
                 group_type='tvpippoplutoanything',
                 recordable=True),
     VideoGroup(vdev='/dev/null',
                 adev='/dev/dsp',
                 input_type='tuner',
                 input_num=4,
                 tuner_type='internal',
                 desc='DVB',
                 group_type='dvb',
                 recordable=True),
     VideoGroup(vdev='/dev/video1',
                 adev=None,
                 input_type='webcam',
                 desc='Logitech Quickcam',
                 group_type='webcam',
                 recordable=True),]

I own 3 Video input:
  • Analog video. V4l [KWorld with remote control configured with lirc]
  • DVB sat [SkyStar 2 PCI see www.brainsfactory.org for how to install]
  • Webcam [Logitech Quickcam search on internet, it's not very stable]
If you own more than 1 input card, I think you would like merge-mix channels and let's freevo doing best choice :)
Than to do that you have to manually configure your channels and tell Freevo which card own the channel:
XMLTV Channel Id Channel Name, human Channel Id entry for mplayer ? may the time rules Index of VideoGroup
TV_CHANNELS = [	('Italia 1','Italia 1','Italia 1',0,1),
		('Canale 5','Canale 5','Canale 5',0,1),
		('Canale 5','Canale 5','Canale 5'),
		('Italia 1','Italia 1','Italia 1'),
		('Webcam','Webcam','Webcam',0,2)
	]

by default group is 0
I can receive these channels from Analog TV and from DVB, Freevo run 2 kind of cmd depend of VideoGroup selected:
  • ('Italia 1','Italia 1','Italia 1',0,1) will use entry 1 like DVB [mplater "dvb://Italia 1"]
  • ('Italia 1','Italia 1','Italia 1') entry 0, default, [mplater "tv://Italia 1"]
The difference is done by: group_type='dvb'
if Freevo work only with DVB I think you have to patch Freevo 1.5.3 /usr/lib/python2.3/site-packages/freevo/tv/plugins/mplayer.py

Stage 3

when i will have spare time, i will fill this section, get these good commands for mencoder:
freevo.conf
mencoder = /video/registra_freevo.sh

registra_freevo.sh
#!/bin/bash
CANALE="tv://$1"
cat /home/stefano/.mplayer/channels.conf |grep $1 && CANALE="dvb://$1"
echo "$1 $2 $CANALE" >> /tmp/registra.log

exec mencoder "$CANALE" -vf scale=768:576:1 -o "$2"  -ovc lavc -lavcopts vcodec=mpeg4:vhq -oac mp3lame -lameopts vbr=0 -tv driver=v4l2:device=/dev/video0:norm=PAL:chanlist=italy:channels="D-Rai 1,22-Italia 7,26-Rete A,27-RAI 2,43-RAI 3,46-Italia 7Gold,47-1G,52-Canale 5,55-SI,58-Italia 1,59-MTV,62-Rete 4,58-Italia 2":alsa

Configuration

download my /etc/freevo/local_conf.py working on dvb and analog tv with italian channels
Look at these parameters:

# download weather plugin :)
plugin.activate('weather', level=45)
# the id is standard weather id
PLUGIN_WEATHER_LOCATIONS = [ ("ITXX0059", 1, "Pisa")]
plugin.activate('joy')
plugin.activate('idlebar')
plugin.activate('idlebar.volume')
plugin.activate('idlebar.system.procstats')
plugin.activate('idlebar.MultiMail.MultiMail')
plugin.activate('idlebar.clock')
plugin.activate('idlebar.cdstatus')
plugin.activate('idlebar.holidays')
plugin.activate('audio.playlist')
plugin.remove('audio.xine')
plugin.remove('video.xine')
SKIN_XML_FILE = 'noia'
# I'm using freevo with remote X clients, I need to scale to 320px
# try putting a big value like your display size, the image will be smooth!
MPLAYER_ARGS = {  'dvd'    : '-cache 8192 -vf scale=320::1 ',
                  'vcd'    : '-cache 4096 -vf scale=320::1 ',
                  'cd'     : '-cache 1024 -cdda speed=2',
                  'tv'     : '-cache 1024 -vf scale=320::1 -vf pp=md/de/hb/vb/dr/al/lb,phase=U',
                  'ivtv'   : '-cache 8192',
                  'avi'    : '-cache 5000 -idx -vf scale=320::1 -vf pp=md/de/hb/vb/dr/al/lb,phase=U',
                  'rm'     : '-cache 5000 -forceidx -vf scale=320::1 ',
                  'rmvb'   : '-cache 5000 -forceidx -vf scale=320::1 ',
                  'webcam' : 'tv:// -tv driver=v4l:width=352:height=288:outfmt=yuy2:device=/dev/video1',
                  'default': '-cache 5000 -vf scale=320::1 -vf pp=md/de/hb/vb/dr/al/lb,phase=U',
                  'dvb'    : '-cache 1024 -vf scale=320::1 -vf pp=md/de/hb/vb/dr/al/lb,phase=U'
               }
# using my bash script for recording
VCR_CMD = (CONF.mencoder + ' ' +
            '%(channel)s ' +
            '%(filename)s')         # Filled in by Freevo

XMLTV EPG

look at our XML TV EPG projects: tv_grab_it or skxmltv

Download

local_conf.zip Updated on 27/November/2007 13:01 2065 hits

mplayer.zip Updated on 27/November/2007 13:01 2011 hits

Contents