Home theater

A home theater next to your TV that can do different things. To not end up with too many boxes, have something always up to date and universal multimedia equipment, you can use an old small (silent) PC running Linux. If you want to record video you probably need a higher power PC.

Figure 12.12. Home theater

Home theater

Typical applications support Video (watching/recording, electronic program guide), listening to digital music (MP3, analog/digital radio), watching pictures, some games and more... . The user interface is kept simple so you can use a low resolution TV screen from the distance and operate the application via a single infrared remote controller (get rid of the fleet of IR controllers). Applications for that are:


It requires the old qt version 3.

It is very complex, difficult to setup and successfully update. It has a lot of dependencies.

There is also a mythknopp version a knoppix to help you with the setup. So instead of installing it on the hard disk and if it fails or doesn't satisfy a painful removal is ahead a try with mythkopp is recommended. I had no success setting up my TV card, so I'm happy that I used mythknopp.

Additional to emerge mythtv, there are many different packages available to emerge to expand its functionality.


The VDR (Video Disk Recorder) http://www.vdr-wiki.de/wiki/index.php/Hauptseite and https://linuxtv.org/vdrwiki/index.php/Main_Page can not just be used to watch TV and record them, there are many plugins available

Figure 12.13. Vdr


and https://linuxtv.org/vdrwiki/index.php/Plugins. There is also an emerge vdr-analogtv to give support to analog cards.

The linux video recorder can easily be emerged, set the vdr useflag and emerge vdr. You need to configure a remote controller. If you have a ir remote controller with your dvb-t device then emerge vdr-remote and eselect vdr-plugin enable remote, if not then you need to use LIRC. The remote controller should have the cursor keys (Left/Right/Up/Down), Menu/Exit/Ok, Colors (Red/Green/Yellow/Blue) and Number keys (0-9)

You need to tell vdr, if your dvb-t card has a hardware or a software decoder inside. For a budget card emerge vdr-softdevice and eselect vdr-plugin enable softdevice

Verify /etc/conf.d/vdr.softdevice

Then /etc/init.d/vdr start

then ShmClient


Let vdr play everything mplayer can and emerge vdr-mplayer. To enable the plugin

eselect vdr-plugin enable mplayer

look to /etc/conf.d/vdr.mplayer

and to configure where the files are /etc/vdr/plugins/mplayer/mplayersources.conf


emerge media-plugins/vdr-mp3ng

eselect vdr-plugin enable mp3ng

/etc/conf.d/vdr.mp3ng to set the paths to the music

To start vdr every time it powers up

rc-update add vdr default


Oxine is a simple program

Disadvantage: It does not have all the functionalities that freevo has

Advantage: It is simpler to configure.



Geebox is a multimedia viewer application that runs from CD or any other media as USB-stick. TV, DVD, Pictures, Sound, Radio, .... . Since it uses just about 8 M byte, it fits everywhere.

Figure 12.14. Geebox


Download the Geebox ISO image (geebox-1.0-en.i386.iso) from: http://www.geexbox.org/

Using K3b burn yourself a Live cd and you already can enjoy. To install it to a media press F1 during boot of the geebox live CD. This brings you into a setup dialog. Now you can install it everywhere (but do not overwrite your Linux distribution!). Checkout the homepage http://www.geexbox.org/ for further configuration issues.

An other media system that uses geebox libraries, but has a more modern user interface is enna http://enna.geexbox.org/index.html




The company Dream-Multimedia TV sells dreamboxes http://dreambox.de. Dreamboxes are PC based Linux systems see http://dream.reichholf.net/wiki/Hauptseite . They run the software package enigma2 that is written in python and can be downloaded. It is an evolution of http://wiki.tuxbox.org/

Connection to the TV

Basically two ways are to go:

Modern TV

Probably the TV has something different from regular VGA resolution and supports just a small number or just one resolution. How to configure the X server? Maybe you are lucky and the TV supports plug and play and has sent everything to the PC like magic. You find all to know to configure the X server in /var/log/Xorg.0.log. There might be different ways how the data got sent to the PC, one way is via pin number 12 of the VGA cable, where the TV sends periodically all the data. An other way allowing bidirectional data is using pin 12 for the data and pin 15 for the clock.

To produce a non standard video timing does not seem to be a problem for the X server. Almost any resolution and timing can be specified in the monitor section of /etc/X11/xorg.conf using the ModeLine keyword. It might be a good thing to set also the TV screen dimension using the keyword DisplaySize. Just add there width and height of the screen in millimeters. The fonts might have to be set larger since the distance nose to screen will probably bigger. The sample uses the data read from the /var/log/Xorg.0.log having attached an Acer TV AT3201W (Screen size 700mm * 400mm).

Section "Monitor"
ModeLine "mytvresolution" 85.5 1360 1424 1536 1792 768 771 777 795
DisplaySize         700 400

Now some mathematics and electronics to understand the numbers:

  1. The number 85.5 stands for 85.5 million pixels per second it is the pixel frequency in Mhz.

  2. There are 1360 visible pixels are per horizontal lines. The following three numbers are a bit more difficult to explain, since they came from the days where CRT's got used that required time to bring back the e-beam to the left most position. A high voltage in the composite video signal has put a lot of electrons on the screen producing a "white (green, or what ever color). A low voltage in the composite video signal has put no electrons on the screen and has left it black. From pixel 1361 to pixel 1424 the line will be black, then from pixel 1425 to pixel 1536 the line will have a lower voltage than the one producing black on the screen, this is detected as the horizontal synchronization pulse. Then pixel 1537 to pixel 1792 will be again a time where the line is kept black, and finally the next line will be started by resetting the pixel counter.

  3. The next four numbers are analogous but for the lines and not the pixels. 768 are the visible lines, line 769 to 771 are lines that are kept black, line 772 to 777 having a lower voltage in the composite video signal than the one producing black on the screen and create the vertical synchronization pulse, then again line 778 to 795 are kept black and the line counter is reset and a new picture begins.

Knowing all those numbers and the pixel clock the horizontal and vertical frequencies can be calculated.

Horizontal frequency = 85.5MHz/1792 = 47.7 kHz

Vertical frequency = 47.7 kHz/795 = 60 Hz

Please don't put those two numbers in /etc/X11/xorg.conf, since the ModeLine defines already everything and you might just create ambiguity. I have put the calculation just for cross checking there and as help when the TV does not support plug and play, then read the manuals, calculate and try out is the way to go.


The traditional VGA resolution is 640*480. Have you ever asked yourself why they had chosen such strange numbers? The VGA resolution would create the following ModeLine:

ModeLine "640x480" 25.175 640 664 760 800 480 491 493 525

So there are in total 525 lines that looks exactly as the TV! 800 pixels per line is also a nicer number than 640, considering a monochrome terminal where a pixel can be considered as a single bit gives 800 bits = 100 Bytes! 60 Hz picture frequency is what comes from the mains in some countries. So the only thing missing is a 25.175MHz quartz oscillator.

How to create a TV signal

For this the way to go is taking a modern Nvidia card, since the support for TV out seems to be ready.

For real hackers create a timing using ModeLine as described in the previous paragraph. Then hopefully your video card has a composite output or a S-Video plug otherwise you have to be a master hacker (better go and buy a new TV).

The composite signal can then directly connected to the TV. The S-Video can be connected to a S-Video connector of the TV. S-Video has two signals one is for the intensity (luminance) the other for the color ( chrominance). If you take a S-Video adapter to connect to a composite input of the TV and you get just a black and white picture, then nothing is wrong just the intensity signal has been connected to the TV and the color signal is missing, thats how those adapters work. There descriptions around in the Internet how to make yourself an adapter that mixes the intensity and color signal to have a real composite signal that produces a color picture ion the TV. The S-Video plug is a 4 pin mini DIN connector, graphic card manufacturers have connectors with more pins. The pin out and the connectors used are not standardized. So be warned if you do some experiments, you might damage something. If you are not able to buy exactly the connector that fits to your graphic card, buy one with more pins and heat up the pins causing a collision with the soldering iron and pull them out of the plastic.

Linurs Servernest startpage