- First of all you will need to download the ebuild file that will allow you to build Myth TV 0.20 under Xorg 6.9. These guides are not based
on Xorg 7 and instead assume that you will eventually be using the tried and tested Unichrome XvMC based drivers available for Xorg 6.9. The
ebuild file can be found
- Put the ebuild in
- You need to have allowed masked packages in your
/etc/packages.unmask for media-tv/mythtv and media-tv/linuxtv-dvb.
- Check that you have the following USE flags in
/etc/make.conf (you will need them later):
transcode aac libdvdread fftw.
emerge mythtv, followed by:
emerge mysql. Stright after, run:
- To make mysql and mythbackend start on boot, run:
rc-update add mysql default, and
rc-update add mythbackend default.
- Change the mysql root password using:
mysqladmin -u root
password <newpass>, and
mysqladmin -u root -h <hostname> password <newpass>.
- To start mysql now, do:
- Download the channel icons from here and extract them into
- Now to setup mythtv, first execute
mysql -u root -p < /usr/share/mythtv/database/mc.sql.
mythtv-setup and set up your card and input connections. Most of this is self-explanatory
but more information can be found at
and of course at www.mythtv.org. Use the channel editor menu to automatically
search for channels (you will need to enter the details for BBC ONE from your
Use the channel editor to add the icon path for each channel.
- Reboot, then check that you have a working myth backend by doing a
netstat -a. Look in the list and
ensure that port 6543 is open. If not, check out the troubleshooting below.
- Create a mythtv user, and create a symbolic link to your dvd drive. Also,
emerge ntp to keep your clock up-to-date. Info can be found at
- Ensure that the /mnt/store directory is readable and writable by the
myth user as well as root. Then login as the mythtv user, and type
- If you selected to keep the mythbackend open all the time (not just on demand) then the programme guide should
get propagated with data whenever you don't tune in or record a channel. :)
- I've installed mysql and mythtv but when I do netstat -a, I don't see port 6543 in
This is most probably a problem with your mysql connection. This confused me for weeks.
Dropping the mythconverg database and re-emerging mysql and following the setup procedure
again for mysql. You will have to put your channel info in again. Ensure that after you
inport the myth database, that the mythtv user is in there. After rebooting, or restarting
the backend, you should find that the port appears.
The remote control
- The first step to getting your remote control working is to emerge lirc with the event
LIRC_DEVICES="devinput" emerge lirc.
- Now the guide assumes that you have lirc in your USE flag in your
/etc/make.conf. If you don't (and didn't when you compiled MythTV) then you
should recompile with it in by using
- Ensure that your kernel has the modules listed below compiled in:
Device drivers -->
Input device support -->
Event interface -->
Loadable module support -->
- Rebuild your kernel and reboot so that you are running your new kernel.
cat /proc/bus/input/devices and note down what event number the TV
card is on. This should be listed as one of the handlers for the device, for example
H: Handlers=kbd event2.
- Now check that you can get output from your remote by doing
eventX is replaced with your event number. Press some buttons on your remote
and you should see some garbage on you screen.
- Now edit
/etc/conf.d/lircd so that it takes on the form
- Now you need a lirc configuration file for it to operate. Copy this file to
- Next you need a
lircrc file to specify what buttons myth and xine map to what operations.
Get this one, and copy it to
link it for xine using:
ln -s /home/mythtv/.mythtv/lircrc /home/mythtv/.lircrc.
- Now start lirc using
/etc/init.d/lircd start. Ensure that lirc starts on
boot by doing the following command:
rc-update add lircd default.
- When I
cat /proc/bus/input/devices, no event number is listed!
You haven't loaded the event interface module, haven't compiled it into the kernel,
or aren't running the kernel that has the module compiled in.
- When I
cat /dev/input/eventX, I see nothing on the screen!
First things first, check the batteries and that the cable is attached properly.
I had the same thing for one and a half years, and it turned out my IR sensor was
dead. Borrow another sensor and try that.
- I get strange log messages and no response from the remote control!
Do you use a USB mouse and find it stops working, with an error message like
"uhci: PCI host halted: very bad" in the logs? If so, it could be this causing
the remote to stop working. I had the same problem, and the solution was to
change my BIOS setting to increase the PCI timing delays (whatever they do).
Improving picture quality
- Two of the best ways of improving the picture quality is by ensuring that
the picture is being deinterlaced (to remove nasty lines), and that motion
compensation is being performed (to give a smoother picture overall).
- To make MythTV perform deinterlacing, run
mythfrontend and go into Setup
and Playback. Check the box for Deinterlaced playback.
- I would also check the boxes for Jitter reduction and Extra Audio Buffering,
and if you don't mind suffering unsynch'ed A/V for the first few seconds, select
Experimental A/V Sync to keep the A/V sychronised throughout playback or viewing.
- To enable motion compensation you must first
emerge nvidia drivers in the
case of GeForce style cards. Do an
emerge search nvidia for details.
- Ensure that
opengl is in your USE flags.
/etc/X11/XF86Config and the device section change the driver to
nvidia. Also in the modules section, ensure that you are loading the
glx module, and have commented out the
- New switch to the NVidia® drivers using
nvidia to your USE flags.
- Now re-emerge mythtv and it will pick up on the installed nvidia drivers and
install support for XvMC (Xvideo motion compensation).
- Appropriate drivers for the EPIA boards are given later.
MythArchive and Myth TV Burn
As of Myth TV 0.20, the MythArchive plugin was added to allow you to burn your recordings to DVD.
Unfortunately it is still in its infancy, and as such MythWeb doesn't support it, and commercial cutting
is based solely on the cut list and does not accept any aspect ratio parameters. Therefore, I suggest
that the MythArchive plugin be used with caution until it becomes more established. The modified mythburn package is available on this site if you want a tried and tested way to burn to DVD albeit slightly less user-friendly. This is also your only option if you wish to cut out video of a specific aspect ratio, e.g. where it is known that the programme has an aspect ratio of 4:3 but the commercials have an
aspect ratio of 16:9.
The MythArchive plugin will require patching in order that it will work correctly. Several issues are
currently present, the first being that audio streams are ordered by PID. This in itself is not an issue. However, because mythtranscode reorders these PIDs and the first audio PID is
almost always ordered as the hard of hearing audio track transmitted in the UK, it often results in a DVD with
silent or unwanted audio tracks. The second issue is with a libavformat library function used
to find a stream's audio and video tracks. In an effort to reduce the channel changing time, analysis
of the stream will stop once an audio track has been found, which may or may not be the one you require.
By making MythArchive use a modified version of this function, all tracks are found 100% of the time.
The patch to be applied to the mythtv-0.20 tarball can be found here,
and the patch for the mythplugins-0.20 tarball can be found here.
Respective bug reports and Trac tickets on the mythtv.org website can be found
An issue that is currently unpatched however, is the A/V synchronisation problems that occur when mythtranscode is given a stream containing errors.
The modified mythburn package allows the creation of DVDs that contain animated image based menus,
chapter menus, background music, and programme descriptions extracted from the myth database. This
modified version has an added option to enable you to cut out commercials based on aspect ratio.
This makes commercial cutting of older programmes effortless. :)
Here's what you need to do:
- At this point, I will assume that you have already setup mythweb (this is relatively
straightforward and well documented).
- Download the mythburn tarball, found here, into
- Go into
/usr/share/mythtv and do
tar -xzvf mythburn.tar.gz.
- Check that are the necessary packages are installed using
emerge -p sun-jdk mjpegtools dvdauthor imagemagick transcode perl avidemux lve.
If any aren't present, emerge them.
- Refer to gentoo's java guide on how to setup
your java environment so that your java works properly.
- Go into the
projectx subdirectory and build the java packages using
- Go back into
/usr/share/mythtv/mythburn and run the
install.sh script. You
should enter the relevant directories as prompted by the script. The command needed to run ProjectX
/opt/sun-jdk-<your_java_version>/bin/java -jar /usr/share/mythtv/mythburn/projectx/ProjectX.jar.
- Now from the mythburn folder, you are able to run a command of the following format:
nice ./mythtvburn.sh <tv_format> <background_image>
<background_music> <make_iso_image> <burn_to_dvdr>
<delete_video_ts> <highlight_image> <animated_menus>
<sub_menus> <recode_ntsc> <auto_cut> <burn_file_1>
<nocut|cut> <burn_file_2> <nocut|cut> > temp/mythburn.log
where burn_file_X is a recording's filename.
- The recording's filenames can be determined by using MythWeb. Find the recording
you want, view the source URL of the assoicated image, and use the filename
there (minus the image extension).
- To get you started, here's a simple example to remove all video that doesn't have an aspect
ratio of 4:3:
nice ./mythtvburn.sh pal plasma-tomato.png silence.mp2 yes no no barbwire.png
yes no no 4to3 <burn_file_1> nocut <burn_file_2> nocut > temp/mythburn.log
And here is an example where the marked cutpoints are used to identify video segments to remove:
nice ./mythtvburn.sh pal plasma-tomato.png silence.mp2 yes no no barbwire.png
yes no no none <burn_file_1> cut <burn_file_2> cut > temp/mythburn.log
- The DVD will have been created in
/usr/share/mythtv/mythburn/DVD/ along with the DVD ISO image
- DVDAuthor complains about chapter points and then quits.
Don't use chapter points if you have these problems. I have the same issue,
but if you don't enable chapter points, the recording will work just fine.
- I get an error saying xxxx.mpg does not exist!
Ensure that you only include the filename and not the full path in place of
burn_file entry - the full path will get added after.