My Linux PVR Debian Lenny


This page will be dedicated to my Linux PVR progress. It will be built under Debian Lenny (testing).


The initial requirements are as follows:

  • To be run on a networked (wifi) PXE booted diskless box.
  • To be able to stream movies, music, pictures from the file server samba & nfs.
  • To be able to play DVD’s via its own DVD drive.
  • To be able to rip DVD’s from its drive.
  • To be able to view TV via the TV/Capture card.
  • To be able to record TV from the TV card and store on the server.
  • Thats enough for now but more requirements may follow!

    PXE Booting
    This little box supports PXE booting so I thought it might be nice to ditch the hard disk and use the file server for its disk over the network. Hopefully this should work ok.
    This page assumes you have already a tftp server in place and the box can successfully boot your desired OS/image.

    Freevo
    I started off attempting to use Freevo but ran into numerous problems with DVD support. Movies were streaming really well from the file server and also the music. I decided to drop the Freevo route and pursue MythTV with the hope that it will have more developers working on it. However the one thing that I really wanted to try was the BBC Iplayer plug in ;)

    MythTV
    Installing MythTV on Debian Etch (Mythtv site Etch notes)

    Note for systems booting over NFS created with debootstrap:

  • Make sure you have a working /etc/network/interfaces file
  • Make sure you have a /etc/hosts file with an entry for ‘localhost’
  • Make sure the hostname is set to what you want it to be!
  • Make sure you have a good /etc/fstab!
  • MythTV uses MySQL for its database, so thats setup that first:

    apt-get update
    apt-get install mysql-server
    apt-get install phpmyadmin

    By default, mysql is installed with no root password, lets set one:

    mysqladmin -u root password yourpasswordhere

    Install ALSA:

    apt-get install alsa-base alsa-utils libesd-alsa0

    Setup your sound card:

    alsaconf

    Add support for mounting network drives via NFS

    apt-get install nfs-common

    Add your mount points to your fstab and create the mountpoints that you need. For instance, i mount /games, /music & /movies which are all on remote servers.

    It might be worth checking that you have Read/Write access to all these mounts too, MythTV is fussy like that. ;)

    Test some music playing too by using mpg123 . You can set some mixer volume levels at this point too. Use alsamixer. Store them afterwards by typing alsactl store.

    We’re now ready to start with the specific MythTV stuff:

    Add the following to your /etc/apt/sources.list:

    deb http://www.debian-multimedia.org/ stable main
    deb-src http://www.debian-multimedia.org/ etch stable

    Add key so you can use these sources:

    wget http://debian-multimedia.org/gpgkey.pub -O - | apt-key add - && apt-get install debian-multimedia-keyring

    At this point in the proceedings let me explain a bit about MythTV.
    First of all it is split into 2 main roles: frontend & backend.
    The backend holds all you database and your TV cards, does all the recording and should be fairly decent, preferably with some nice big disks for all that TV that you will soon be recording! :D
    The frontend is just the box that drives your tv.

    In this example we’re putting it all on 1 box. In the future we may have to add further backends and frontends as the system develops!

    apt-get update
    apt-get install mythtv

    At this point you have just a shade under 100mb to download. Go and grab a coffee and a smoke if you have slow internet like mine ;)

    Press ‘OK’ when it says about completing mythtv-setup – we’ll do that in a minute.

    First we’re going to configure a user to run mythtv. This is important as it needs to be a member of the ‘mythtv’ user group also.

    Im using a user called ‘tv’ lets add it to the system:

    adduser tv

    and add it to the mythtv group:

    adduser tv mythtv

    Now lets add a basic X server and the fluxbox window manager:

    apt-get install xserver-xorg-video-intel fluxbox xinit x11-xserver-utils

    Note: if you are not using the intel chipset (i810 in this case) you can simply download the full xserver packages: apt-get install xserver-xorg xinit x11-xserver-utils

    Test that X can be started now:

    startx

    Make any changes to your /etc/X11/xorg.conf file as you see fit. As this is going to be connected to a tv or only displaying movies/music we can probably leave it as the nasty default resolution of 1024×768. :P You cna check this in X by opening up a teminal and typing xrandr.

    For simplicity, we’re now going to continue the configuration as this user, log out as root and log in as your ‘tv’ account and log in to X.

    Open up a teminal window and type:

    mythtv-setup

    The setup application will load. Spend some time going through and configuring to your needs!
    You will now be configuring you TV cards (if any) so make sure they are all inserted and connected to ariels!

    ** Update **

    I have now been playing with MythTV for a little over a week. Its all working nicely. Games are working for Amiga, Megadrive and MAME roms, Live TV is working and all files are stored on the NFS server (Homer) Multiple frontends are setup.

    Things still to do:

  • Let Homer do the Transcode & commflag jobs from all systems.
  • Setup Skype with working webcam.
  • Leave a Reply