Search:  
Gentoo Wiki

Freevo

This article is still a Stub. You can help Gentoo-Wiki by expanding it.

This article is part of the HOWTO series.
Installation Kernel & Hardware Networks Portage Software System X Server Gaming Non-x86 Emulators Misc

Contents

About

Freevo is a PVR program that you can use to record TV shows, watch DVDs, and listen to music. It is similar to MythTV but not as complex. It is very flexible because it relies on existing external programs to do various tasks. This guide assumes you want to setup Freevo to run on X (X11) not DirectFB or SDL or the hardware framebuffer.

Freevo also uses MEncoder (part of MPlayer) for its backend to record and watch media.

Documentation

Freevo maintains its own Wiki which covers everything you need to do to setup a Freevo system.

Dedicated gentoo freevo box

Although I've tried to be quite verbose, this mini guide assumes you have a resonable basic knowledge of linux. If you've managed to install gentoo you should be alright!

I run freevo on an old Pentium III 600Mhz with 128MB ram, it runs almost perfectly, so if you're thinking about setting up, try and get hold of something around 800Mhz or better. Of course, it's all relative, the more power you can muster, the better. If you're thinking about doing realtime divx encoding, think in Ghz. Basically, I didn't want to spend any money and it was still well worth it.

Watching a standard divx file is almost perfect on my 600Mhz box, although lots of action on the screen sometimes causes slight 'jumping'...I'm not too sure if this is just the lame old hard disk though!

Freevo makes an excellent choice as a PVR/media centre. First, you'll want to get your box set up nicely by following the Gentoo handbook. You'll want to make sure your installation includes xorg, although you won't need any advanced window managers like gnome or kde.

Although freevo can work with either mplayer or xine for its playback backend, I'd recommend mplayer. It's all down to personal choice really. I feel mplayer is very tweakable and well suited to the job. This guide will assume you're using mplayer as your video backend.

Emerge

Before doing anything, let's make sure portage is up to date:

 emerge --sync

Next, get mplayer. mplayer is quite a complex beast and can take quite a while to compile on an older machine. Probably about an hour or so at 600Mhz. It's important you make sure you have the right use flags:

 emerge -pv mplayer

Edit your /etc/make.conf and update your USE flags if needed. Then emerge it:

 emerge mplayer

Before we get too involved in anything, it's worth making sure mplayer works properly and can play your music and video files. If you're setting your freevo box up remotely (via ssh or whatever), you'll need to tell mplayer what display to use:

 DISPLAY=:0 mplayer /home/you/somefile.avi

Be sure to have media-libs/svgalib installed with the current kernel running:

file /lib/modules/`uname -r`/misc/svgalib_helper.ko

if not reinstall its:

 emerge -av media-libs/svgalib

and do:

 modprobe svgalib_helper

When you have it working, you'll want to move on to setting up freevo:

 emerge -pv freevo

Have a look through the use flags carefuly.

 [ebuild N    ] media-tv/freevo-1.5.2 +X +dvd +encode +lirc -matrox +nl

If you're happy with the suggested use flags:

 emerge freevo

Configuration Files

Next, edit your config files

/etc/conf.d/freevo

 vi /etc/conf.d/freevo
 freevo="yes"
 webserver="yes" # optional
 recordserver="yes" #optional

/etc/freevo/freevo.conf

 vi /etc/freevo/freevo.conf
   * Refer to the Freevo Wiki

/etc/freevo/local_conf.py

 vi /etc/freevo/local_conf.py
   * Refer to the Freevo Wiki

Start at Boot

Next, make freevo start on boot:

 rc-update add freevo default

After 1.7.2:

(from the ebuild)

* The way of starting Freevo for freevo-only-systems has changed
* and does not require Freevo to run as root anymore.
* Please use freevoboot, a wrapper to be run as a user.
* Configuration is still in /etc/conf.d/freevo
* and you can always start freevo directly.

* If you're using a Freevo-only system with X, you'll need
* to setup the autologin (as user) and choose freevo as
* default session. If you need to run recordserver/webserver
* at boot, please use /etc/conf.d/freevo

* Should you decide to personalize your freevo.desktop
* session, keep the definition for '/usr/bin/freevoboot starx'

Tweaking performance

Controlling Freevo from Laptop Using synergy

Please read Synergy for more detailed information.

You will need to install synergy on the dedicated freevo box and the controlling laptop.

The installation on the Controlling laptop side :

  emerge synergy

edit /etc/synergy.conf as your needs.


 # sample synergy configuration file
 #
 # comments begin with the # character and continue to the end of
 # line.  comments may appear anywhere the syntax permits.
 # Reminder hostname are case sensitive
 section: screens
       # three hosts named:  moe, larry, and curly
       localhost: # your freevo box hostname       
       Toshiba:  # your controlling box hostname
 #       curly: # extra box
 end
 section: links
       # larry is to the right of moe and curly is above moe
       Toshiba: # your controlling box hostname
                                           
 #               right = larry
                 up    = localhost # your freevo box hostname
 #                       
       # moe is to the left of larry and curly is above larry.
       # note that curly is above both moe and larry and moe  
       # and larry have a symmetric connection (they're in  
       # opposite directions of each other).              
       localhost: # your freevo box hostname                           
               down  = Toshiba # your controlling box hostname 
 #               up    = curly                         
       # larry is below curly.  if you move up from moe and then
       # down, you'll end up on larry.                          
 #       curly:
 #               down  = larry
 end
 section: aliases
       # curly is also known as shemp
       localhost:                    
               freevobox
 end


You can use init.d script to load synergy or bash script. You can find the init.d script in the synergy gentoo wiki.

Otherwise you can use this bash script for loading the synergy.

/usr/local/bin/synergy-checker.sh

 #!/bin/bash
 SERVICE="synergys"
 SERVICERUN="synergys"
 PATHSERV="/usr/bin"
 sleep 1
 if ps ax | grep -v grep | grep $SERVICE &> /dev/null
 then
   echo "$SERVICE service running, killing it"
   echo "Killing $SERVICE"                    
   killall $SERVICE       
   killall sleep   
 $PATHSERV/$SERVICERUN                                
   else                             
   echo "$SERVICE is not running"
   echo "Running new $SERViCE"   
 $PATHSERV/$SERVICERUN"
 fi
 exit 0

save the bash script to /usr/local/bin/synergy-checker.sh and create an icon in your desktop pointing to the bash script (different windows manager handles new icon differently). Dont forget to make the bash script executable.

 chmod +x /usr/local/bin/synergy-checker.sh

Note : You can add the bash script to cron or /etc/conf.d/local.start for automatic loading on boot.


Installation on the Freevo box

 emerge synergy

You can use the init.d script from the gentoo synergy wiki or use the bash script loader below :

/usr/local/bin/synergy-checker.sh

 #!/bin/bash
 SERVICE="synergyc"
 SERVICERUN="synergyc PUT-YOUR-CONTROLLING_LAPTOP-IP-NUMBER-HERE"
 PATHSERV="/usr/bin"
 sleep 1
 if ps ax | grep -v grep | grep $SERVICE &> /dev/null
 then
 echo "$SERVICE service running, killing it"
 echo "Killing $SERVICE"
 killall $SERVICE
 killall sleep
 $PATHSERV/$SERVICERUN"
 else
 echo "$SERVICE is not running"
 echo "Running new $SERVICE"
 $PATHSERV/$SERVICERUN"
 fi
 exit 0

save the bash script to /usr/local/bin/synergy-checker.sh, then issue this command.

 chmod +x /usr/local/bin/synergy-checker.sh
 echo /usr/local/bin/synergy-checker.sh >> /etc/conf.d/rc.local

Paranoid user should also use this bash script for crontab to check if synergy still working on the freevo box or not in every hour.

/usr/local/bin/synergy-cron-checker.sh

 #!/bin/bash
 SERVICE="synergyc"
 SERVICERUN="synergyc YOUR-CONTROLLING-BOX-IP-NUMBER"
 PATHSERV="/usr/bin"
 sleep 1
 if ps ax | grep -v grep | grep $SERVICE &> /dev/null
 then
 echo "$SERVICE service running, Good... leaving it alone"
 exit 0
 else
 echo "$SERVICE is not running"
 echo "Running new $SERVICE"
 $PATHSERV/$SERVICERUN"
 fi
 exit 0

save the bash script to /etc/cron.hourly/synergy-cron-checker.cron

 chmod +x /usr/local/bin/synergy-cron-checker.cron
 emerge vixie-cron
 cron /etc/crontab

for more information about crontab as user, please check TIP Simple crontab.

Now after finishing both setup, run the synergy-checker.sh on the controlling computer, reboot the freevo box and then point your mouse on the controlling computer up to the upper edge to switch to the freevo box.

To return to the controlling box from the freevo box you can point the mouse down to the lower edge of the screen.

Retrieved from "http://www.gentoo-wiki.info/Freevo"

Last modified: Thu, 04 Sep 2008 01:26:00 +0000 Hits: 15,718