Content Cleanup Required
This article should be cleaned-up to follow the content standards in the Wiki Guide. More info...


Style Cleanup Required
This article does not follow the style standards in the Wiki Guide. More info...

Page Description

  • (edit: this guide requires clean up and needs to be brought up to date)

  • (edit: move Hauppauge capture card section to its own page)

This page will describe how to install MythTV onto your Ubuntu linux computer. MythTV is a 'Tivo' like system; it allows you to watch, pause, and record televsion; also known as a PVR (Personal Video Recorder). These instructions were created using Ubuntu 5.10 (Breezy Badger), but will also work for more recent releases. This is written for you the average Linux user; however a knowledge of Linux commands will be helpful when installing mythTV. In addition to just installing mythTV, this tutorial will also tell you how to install

  • (the driver and firmware required for the Hauppauge capture cards pvr-150, 250, 350, and 500). And, it will show you how to install LIRC, the software driver required to use remote controls.

During this tutorial, you will be required to enter commands into the computer (if you don't know how to enter commands, it will be described). The commands will be presented in the following box-style.

Command goes here.

Upgrade Ubuntu for Installing MythTV

"Note:Access a terminal by selecting Applications->Accessories->Terminal. (Applications is presented at the top of the computer window). You will be presented by a terminal window. To issue a command in the terminal window, type in the command and press enter."

You will now enable the upgrade to include upgrades in the 'Universe' and 'Multiverse'. Do this by selecting System->Administration->Software Sources on the window you are presented with after entering your administrative password make sure that the 'Community-Maintained open source software (Universe)' checkbox is checked. Also mke sure the 'software restricted bye copyright or legal issues (Multiverse)' checkbox. Don't worry, to my knowledge doing this will not break a law at any time. Select the 'Close' and press reload on the prompt that appers. allow it to update the package information

You will need the build-essential and gcc-3.4 packages to install Myth. these may be already installed but if not run

sudo apt-get install build essential


sudo apt-get install gcc-3.4

in a terminal window(Applications->Accessories->Terminal)

Your Ubuntu computer is now ready to begin the process of installing and setting up Myth.

MythTV Prerequisites

Myth requires Apache and Mysql; we will install these now. The following information was derived from the following website: http://www.slash32.com/ubuntu-myth.html. Download and install the apache2 and {mysql-server.

The mysql-server will ask for further information. Choose 'setup internet site'. Use the default values from then on. If you're smarter than me, change them as needed. Then install the phpmyadmin package.

Now you will setup what you just installed. Open the Firefox web-browser; enter 'localhost' into the website address. Click on phpmyadmin. Enter 'root' into the user name field box, leave the password field empty and press ok. Click on change password. Enter in the new root password you created earlier in both field boxes and press ok. Press 'logout'. Now, enter root as the username and nothing in the password box. If what you did worked, you just got denied. Now enter 'root' as the username and the password you chose in the password field box. Press enter. If you get logged in, then everything worked well. Logout again.

Download and Install Myth

We will now download and install MythTV. To do this we will use synaptic manager. Select System->Administration->Synaptic Package Manager. Right click anything with Myth in front of it and mark for installation. Mythgame and Mythphone have problems. We'll get to this later. Click 'Apply'; click 'Apply' again. Watch the packages download. In addition to MythTV, use synaptic package manager to download lynx and ncftp. Follow the procedure you just followed for these new packages. Be sure to download the necessary dependant packages as well.

Installing IVTV

IVTV is the driver necessary for the Hauppauge Hauppauge pvr-150, 250, 350, and 500 cards. If you have other capture cards, this may not apply to your card. This section has been tested for ivtv versions 0.4.0 and 0.4.1.

If you are using Edgy, you could try these alternate instructions: Install_IVTV_Edgy

Visit http://ivtvdriver.org and download the latest stable release of the driver. I downloaded ivtv_0.4.0.tar.gz. You now need to unzip the file. Do this by double clicking on it, and using the Ubuntu unzip utility to extract it to the desktop (press the extract button). You no longer need the *.tar.gz file. Feel free to delete it.

Open up a terminal (Applications->Accessories->Terminal). In your home directory, create a directory called Software.

mkdir Software

Navigate into that directory

cd Software

Make a directory for all of your television software

mkdir tv

Navigate into that directory

cd tv

Move the Driver directory into the current directory

mv ../../Desktop/ivtv-0.4.0 ./

Move into the driver directory

cd ivtv-0.4.0

Download something that makes 'make' work. This information was attained from the following website: http://ubuntuforums.org/archive/index.php/t-2878.html.

sudo apt-get install linux-headers-$(uname -r)

Now make the driver


Now install the driver

sudo make install

The output of make install lists some conflicting files. It suggests several move commands to 'HIDE' these files. Follow these commands by copying and pasting them into the command line and pressing enter. (Press enter for each command individually). Then make the install again.

sudo make install

Hopefully the install went well for you. On my machine, it installs into the wrong directory. So we need to copy it. We first need to find where it went. Type in the following to accomplish this.

find / -name ivtv

This command should reveal the location of the ivtv driver. The output is most likely something like /lib/modules/<kernel_number/ivtv. Now we need to copy it to where it should go.

sudo cp -r <result_of_find_command> /lib/modules/<your_kernel_number>/kernel/drivers/media/video

If you don't know your kernel number for the above command, enter the following command.

uname -r

Copy it to another location as well (this really shows you how little I know about what I'm doing. I got it working, so that part's good.)

sudo cp -r <result_of_find_command> /lib/modules/<your_kernel_number>/

Now we need to generate the modules.dep and map files. Do this by typing the following.

sudo depmod

And now we need to add those modules to the linux kernel. Do this by entering the following command.

sudo modprobe ivtv

You now need to edit a driver file. The following command suggests using gedit; feel free to used any other text editor.

gksudo gedit /etc/init.d/ivtv

Add the following line to the file (it might be the only line in the file). Note: do not include the quotes (') in the line. Just add what's inside the quotes.

'modprobe ivtv'

Now change the ivtv permissions so that it is executable.

sudo chmod +x /etc/init.d/ivtv

Update the modules that start on boot up

sudo update-rc.d ivtv defaults 50

How are you feeling so far? Feeling good? Things are going well. Only a bit further.

Let's look at the output of the modprobe command. dmesg | less

  • Note: if you don't know how to use less, type 'man less' before issuing the above command. (In general, the 'man' function is used to get explanations about the command being 'manned'.) If you scroll to the bottom of the ivtv section, you can see that several errors occurred. This is because we have yet to install the firmware for our capture card (I used the Hauppauge pvr-350). We will do that now. Open up Firefox web browser. Again visit http://ivtvdriver.org. Click on the 'firmware' link.

Here you get some really cryptic messages for what you want to do with the Hauppauge pvr-350. I'll tell you what I did. If you find a better way, please edit this page accordingly.

The first thing we see is that the hotplug mechanism will be used starting with driver ivtv-0.4.1. That means if you use a release later than 0.4.0, this document is out of date. I welcome you to figure it out and let everyone else know how to do it by improving this document. If you're still using ivtv-0.4.0, then download the following files: pvr_2.0.24.*.zip and pvr_1.18.21.22254_inf.zip and save them to your desktop.

In your tv directory (within your Software directory) make a pvr_firmware directory

mkdir /home/<your_user_name>/Software/tv/pvr_firmware

If you don't know your username, enter the following command.


Move into the newly created directory.

cd /home/<your_user_name>/Software/tv/pvr_firmware

Move the zip files into the current directory.

mv /home/<your_user_name>/Desktop/*.zip ./

Now run a perl utitilty that came with the ivtv driver

../ivtv-0.4.0/utils/ivtvfwextract.pl pvr_1.18.21.*_inf.zip.

Note: we have not yet used the pvr_2.*.zip file. This will be used later for the hardware decoder.

Now we have to get some additional modules. At this point, let me say my two cents. Thank you to all the developers who have created Myth, ivtv, and linux in general. Open source is an amazing solution to software development. Ubuntu, in general, rocks. This would all be so much harder if it were not for this new, beautiful, distribution of linux. Thank you so much to all the people that have created help files describing their experiences with Myth installations. I would not have been able to do it without you all. Ok, back to the additional modules.

(edit: pleas put this thank-you somewhere else)

Open a firefox browser and visit http://www.pcxperience.org/james/ivtv. Download the Video::Frequencies and Video::ivtv modules by clicking on the links. For each module, do the following: Unzip the file and extract the internal directory to the desktop (as done before). Move the directories into your pvr_firmware directory.

mv /home/<your_user_name>/Desktop/Video* /home/<your_user_name>/Software/tv/pvr_firmware

Navigate to the firmware directory.

cd /home/<your_user_name>/Software/tv/pvr_firmware

Navigate into the Video Directory.

cd Video-Freq*

Use perl utility to create a makefile

perl Makefile.PL

Now make the makefile you just made (get it?).

make install

Repeat for the Video::ivtv module

Use CPAN to install IniFiles. It takes a while to go through all the options. I selected default for most of them. You'll be fine.

cpan -i Config::IniFiles

Navigate back to the ivtv driver directory

cd /home/<your_user_name>/Software/tv/ivtv-0.4.0

Make and make install

sudo make install

Restart your computer by selecting System->Logout->Restart.

sudo depmod
sudo modprobe ivtv

Now check the output of modprobe.

dmesg | less

The ivtv portion should have no errors. Restart your computer. If it didn't work, you might be using an ivtv version higher than 0.4.0. If that is the case, perform the following. (Dapper users should use "/lib/firmware/" instead of "/usr/lib/hotplug/firmware/" in the following.)

sudo mv /lib/modules/ivtv-fw-enc.bin /usr/lib/hotplug/firmware/
sudo mv /lib/modules/ivtv-fw-dec.bin /usr/lib/hotplug/firmware/
sudo ln -s /usr/lib/hotplug/firmware/ivtv-fw-dec.bin /usr/lib/hotplug/firmware/v4l-cx2341x-dec.fw
sudo cd /home/<user_name>/Software/tv/pvr_firmware/pvr_2*
sudo cp HcwMakoA.ROM /usr/lib/hotplug/firmware/v4l-cx25840.fw
sudo cp HcwFalcn.rom /usr/lib/hotplug/firmware/v4l-cx2341x-enc.fw
sudo cd /home/<your_user_name>/Software/tv/ivtv-0.4.1
sudo cp v4l-cx2341x-init-mpeg.bin /usr/lib/hotplug/firmware

Restart the computer.

sudo depmod
sudo modprobe ivtv

Check again to see if there were any errors in the ivtv section.

cd /home/<your_user_name>/Software/tv/ivtv-0.4.0

Navigate to the directory with ptune in it.

cd ./utils/perl

Test the capture card with ptune.pl. Type 'perl ptune.pl' to see how to use it.

perl ptune.pl -c 8

The above command assumes you have channel 8. I suggest testing several channels; do this by replacing the '8' in the above command with the appropriate output. If the output is something like: 'Ch.8: 181250 2900' then the card is working. If it worked, edit an aliases file. Perform the following.

cp /etc/modprobe.d/aliases /etc/modprobe.d/aliases.orig
gedit /etc/modprobe.d/aliases

Now find the following line:

  • 'alias char-major-81 videodev'

After that line, add the following line

  • 'alias char-major-81-0 ivtv'

An additional card could be added as 81-1

Check to see if the driver is working. As root, issue the following command.

dd if=/dev/video0 of=/dev/video16

After a few seconds, push 'Control-C'. You should get an output that looks like this:

30696+49 records in
30720+0 records out

If you got this, then the drivers are working well. Note: /dev/video16 is the hardware decoder that comes with the Hauppauge pvr-350. If you don't have the 350, then you may not get any records out.

You've completed installation of the firmware.

Upgrade the Firmware to the Latest Verison

Upgrade the firmware to version Visit the ivtv website and download the driver of the above version www.ivtvdriver.org/index.php/Firmware. Unzip the file. Copy the HcwMakoA.ROM file to /lib/modules/ Copy the HcwFalcn.rom file to /lib/modules/ivtv-fw-enc.bin

sudo modprobe ivtv

Then restart your computer.

MythTV Configuration

Create a username and password for a mythtv user in the sql database. if you're not the root user, switch to it. Then enter the following set of commands

sudo mysql -u root -p mysql
mysql> UPDATE user SET password=PASSWORD('mythtv')
WHERE user="mythtv";
mysql> quit

Enter a password other than mythtvif you would like. Just remember the one you enter.

Finally, on to MythTV! Navigate to your home directory.

cd /home/<your_user_uname>

Make a password for the mythtv user

passwd mythtv

Enter in a password (I suggest making it the same password used for the sql database). Now you need to disable a security feature; remember to enable it again later.

xhost +

You can enable it later by typing xhost -. Change to the mythtv user.

su mythtv

Enter Myth Setup


For instructions on how to install MythTV, you can visit www.mythtv.org. I found great information on how to configure MythTV by visiting www.systm.com. They used KnoppMyth, but the Myth configuration issues they suggest are relevant. Note: It's important to run the myth tv setup as the mythtv user. Fill the listings of myth; I used information from the following website to figure out the following set of commands http://mythtv.org/pipermail/mythtv-users/2005-February/076574.html.


This takes a long time. Don't worry if you get some errors - some errors are ok. Myth will be the test of whether or not it worked out.

We will now start our first Myth session. As the mythtv user, start the myth backend.

mythbackend -d

I also used the following website for informatoin on these commands, http://www.mythtv.org/docs/mythtv-HOWTO-singlehtml.html. The above command will start the myth daemon. Restart the computer System->Logout->Restart. Now start up myth!


Myth will tell you that it couldn't connect to the database and give you some options. Tell Myth the username and password of your mysql database you entered earlier in this tutorial.

You should be able to watch TV at this point. If you can't it's likely that you didn't setup myth properly. Please revisit mythtv-setup.

Setting up the Hauppauge Remote Control with LIRC

For this section, I referred to the following websites: http://ubuntuforums.org/showthread.php?t=30612&highlight=lirc, and http://www.abarbaccia.com/content/view/18/31/.

This section will explain how to install LIRC and get the Hauppauge remote control working. We need to install the Linux Kernel source code. First, we find the kernel version.

uname -r

This yields something like 2.6.12-10-386. We will use the first three numbers.

sudo apt-get install linux-source-<kver>

where <kver> are the first three numbers. Now we need to extract the source we just downloaded and link it to the right directory.

tar xvjf /usr/src/linux-source-*.tar.bz2 -c /usr/src/
ln -s /usr/src/linux-source-<kver> /usr/src/linux
ln /usr/src/linux /lib/modules/$(uname -r)/build
cp /boot/config-$(uname -r) /usr/src/linux/.config
cd /usr/src/linux
make oldconfig
make /include/linux/version.h
make modules

The last command takes a LONG time. Relax, and get something to eat. You've been working hard.

Visit the LIRC homepage and download the latest LIRC software to your desktop http://www.lirc.org. Unzip the firmware using the Ubuntu unzip utility as discussed before and extract it to your desktop. Feel free to delete the zip file now. In your Software/tv/pvr_firmware directory, make a directory called remote_control

cd ~/Software/tv/pvr_firmware
mkdir remote_control

Move the lirc* directory to the remote control directory

cd remote_control
mv ~/Desktop/lirc* ./

Install Dialog

apt-get install dialog

Move into the lirc directory

cd lirc*

Run setup


Select Driver Configuration. Select TV Card. Select 'Hauppauge TV Card'. Choose 'Save Configuration and Run Configure'. Then, make and install.

sudo make install

Note: If there are errors during the make or make install, then might try performing the following command.

sudo touch /usr/src/linux/Rules.make

I did not need that command, but others on the internet claim it was the key to their success. Now re-run make and make install. Then, install the lirc module.

sudo modprobe lirc_i2c
sudo chmod 664 /dev/lircd

We will now test the remote control using irw.


Point your control at your ir receiver and push a button (you did plug in the ir receiver that came with your card right? If not, shutdown your computer, plug it in, and start the computer again). The name of the button you just pushed should be displayed on the text screen. If it doesn't work, then there's something wrong.

We will now setup the remote control so that it will start whenever we turn on the computer. First, open up the modules file to be edited.

sudo nano /etc/modprobe.d/aliases

Add the following line above the 'ivtv' line that we added before.

'alias char-major-61 lirc_i2c'

Now we need to change permissions of lircd. First find out where lircd is.

which lircd

This command will reveal a path. Enter that path into the following command

sudo chmod 555 /usr/local/sbin/lircd

Replace '/usr/local/sbin/lircd' with the path revealed by the 'which' command

Save your changes and exit the editor. Open up another important file.

sudo nano /etc/udev/udev.rules

For the following information, I viewed the following website http://ubuntuforums.org/showthread.php?t=30612&page=2&highlight=lirc. Add the following line at the end of the file.

KERNEL=="lirc0", SYMLINK="lirc"

Need to download a script in order to get lirc to startup at boot time

cd /home/mythtv/
wget http://www.abarbaccia.com/mythtv/lirc

I did not create this script, and I don't know who did. If it was you, thank you VERY much.

sudo mv lirc /etc/init.d/lirc
sudo chmod 755 /etc/init.d/lirc
sudo update-rc.d lirc defaults 99

Restart the computer and login

cd ~/Software/tv/pvr_firmware/remote_control/lirc*

Enter the irw command


Press some buttons on your remote control. If you get the right output, then it works. If not, something is wrong. Did you remember to plug in the ir receiver? Is your remote control supported?

Getting the remote control to work during Myth

wget http://wilsonet.com/mythtv/lircrc-haupgrey-g3.txt
mv lircrc-haupgrey-g3.txt /home/mythtv/.lircrc
ln -s /home/mythtv/.lircrc /home/mythtv/.mythtv/lircrc

Restart the computer. Make sure to run the myth front end as the mythtv user or the remote control won't work. You may need to edit the .lircrc file. Do so by using gedit.

cd /home/mythtv
gedit .lircrc

Use the irw program in a separate terminal to know what the output from the remote control is called. For example, if the output of irw is the following: 0000000017b4 01 Forward Hauppauge_350 then that button of the remote control is called 'Forward'. This string goes in the 'button' field of the relevant section of the .lircrc file. Identify the proper button to be used by Mythtv by viewing the myth documentation at www.mythtv.org. For example, if you want the 'Forward' button of the remote control to be used to advance 1 second, then you would use the '>' button. '>' would go in the 'config' field of the relevant section of the .lircrc file. Continue editing the file to suit your own needs.

MythTV finishing touches

For much of the following information, I visited the following website https://wiki.ubuntu.com/MythTV?highlight=28mythtv29. Set up the backend so that it starts upon boot up

Do this by adding a line to the /etc/init.d/mythtv-backend file

sudo nano /etc/init.d/mythtv-backend

Add the following line in the file


Note: Do not add the quotes

Set it up so that the mythtv user doesn't use screen savers. System->Preferences->Sessions Click the Startup Programs Tab Click the 'Add' Button Enter in 'xterm s off' Set its order as 199

Set it up so that the front end starts up automatically when you login as mythtv. Click the 'Add' Button Enter in 'mythfrontend' Set its order as 200.

You now have a myth system installed on your computer. To start myth, restart the computer. Login with the 'mythtv' username. Enter in the password you created at the beginning of this tutorial; you're watching Myth!

Adding MythTV Icons

You may want station icons next to the channel numbers in your program guide. This is by no means necessary to use MythTV, but it's a neat addition. You may need to install xmltv in order to perform the following. Do so by using Synaptic Package Manager as described before. Now, we need to download a new perl script, execute it, and add the icons to MythTV.

sudo cd /home/mythtv
wget http://cvs.mythtv.org/cgi-bin/viewcvs.cgi/*checkout*/mythtv/contrib/mkiconmap.pl
perl mkiconmap.pl
sudo mythfilldatabase --import-icon-map iconmap.xml --update-icon-m

Feel free to delete the perl script when you've completed the above.

rm /home/mythtv/mkiconmap.pl

Now, in your program guide, you should have station icon next to the channel numbers. Have fun!

Myth Plugins

Myth DVD

Myth DVD allows you to watch DVD movies using myth, or import the DVD video into myth and watch it at a later time directory from your computer. There are several prerequisites to using Myth DVD. Very relevant information for displaying multimedia in Ubuntu can be found at RestrictedFormats. Please review the legal aspects of viewing multimedia described on that page. I take no responsibility for your actions. Perform the following.

sudo apt-get install libdvdread3
sudo /usr/share/doc/libdvdread3/examples/install-css.sh

Now restart your computer. After this, try inputting a DVD into your computer. Totem should come up automatically (Ubuntu 5.10 has Totem as the movie player that automatically starts when a DVD is input into your system). If Totem doesn't start up, and you would like it to automatically, then follow System->Preferences->Removeable Media and select the multimedia tab. The command for viewing DVDs when disks are inserted is totem d.

As long as I was installing the above, I found some other multimedia software that I wanted to install. sudo apt-get install the following packages: flashplayer-mozilla, gftp, gstreamer0.8-plugins, gstreamer0.8-lame, gstreamer0.8-ffmpeg, mozilla-mplayer, and gnomebaker. In order to use Myth DVD, you must have first installed the plugin onto your computer. This is done using Synaptic Package Manager (described earlier in this document). If you haven't done it yet, first download Myth DVD (search in the myth* section of possible packages to download). Once you have it downloaded onto your computer, you need to give the mythTV user permission to use the CD and DVD devices. You can do this by executing the following set of instructions as root user.

Open the 'System' menu of Ubuntu. Follow this Path:

System->Administration->Users and Groups

Make sure the checkbox at the bottom of the window next to the words 'Show all users and groups' is checked. Now scroll down through the users until you find the mythtv user. Click once (select) the mythtv user; this should sensitize a properties button on the right side of the window. Click the properties button. Select the 'User Privelges' tab of the properties window. Here you are presented with options to allow the mythtv user to perform. I allow the mythtv user to use audio devices, the cdrom, the floppy drive, the video acceleration, and the modem. (I allow mythtv to use the modem in preparation of an additional feature. I'm told that mythtv can act as a caller ID, displaying the phone number calling in directly onto the television. I'm not positive this feature exists, but I hope it does, and I look forward to realizing that feature. I will update this HowTo with more information as I discover it.)

It is also important to disable automount for the mythtv user, or else you will not be able to eject the DVD after you are done using it with Myth. To disable automount, as the mythtv user, visit the System->Preferences->Removeable Drives and Media portion of Ubuntu (note, for this portion you must login as the mythtv user). Uncheck the checkbox next to the 'Mount removeable media when inserted' option. Automount has now been disabled and you should be able to eject the DVD with myth running by pressing the eject button on your drive.

We want to download some additional codecs. Again, refer to the laws of your region to make sure that this is legal. Using firefox, or your favorite browser, visit

It is important to exit these windows by pressing the 'Ok' buttons. This will save the changes that you've made. You should be good to go. Start watching DVDs with your newly upgraded Myth Tv system! If it doesn't work, restart your system and try it again. If it still doesn't work, are you sure you have a DVD ROM and not a CD ROM?

So now you can watch a DVD. But what about ripping a DVD (copying the film from the optical disk to the computer). We will figure out how to do that now. Unfortunately, the mythDVD we downloaded doesn't come with the myth transcoding daemon compiled in. A very generous developer created an alternate mythdvd. As the root user, perform the following:

wget http://www.abarbaccia.com/mythdvd_0.18.1-4_i386.deb
sudo dpkg -i mythdvd*

Now we will need several pieces of software in order to transcode the DVD. In order to identify the latest package available, perform the following.

apt-cache search <package_of_interest>

Once you've identified the package of interest, use apt-get to download and install the package. According to the mythDVD README file, the following packages must be installed: libdvdread, nasm, mjpegtools, xvid, liba52, libfame, transcode, libdvdcss, w32codecs, and (if you later want to be able to view the DVD menu instead of just having the video play automatically) xine. An example install instruction is listed below.

sudo apt-get install transcode

Make a directory to hold movie posters

sudo mkdir /usr/share/mythtv/mythvideo/posters

Make sure to change the directory to hold the movie posters to this directory in the myth video settings. Now make a directory to hold the videos.

sudo mkdir /usr/share/mythtv/mythvideo/dvds

Change the settings in MythTV to this directory to hold the videos Change the permissions of the directories so that the mythtv user can access them.

sudo chmod 677 /usr/share/mythtv/mythvideo/dvds /usr/share/mythtv/mythvideo/posters

Restart your computer. Start the myth transcoding daemon.

mtd -d

Try ripping a dvd, it should work out for you. If you have problems, check the mtd.log file in the following directory /var/lib/mythdvd/temp/. To set it up so that the myth transcoding daemon starts automatically, perform the following.


Add the following command to the list of startup programs; give it a priority of 198.

mtd -d

The myth transcoding daemon should start automatically when you reboot the computer.

Note: VCD playback is a much more difficult task, and will not be covered in this HowTo (basically because I have no idea what vcd is or how to use it). I suggest reading the README file included with the mythdvd plugin (you will need to download the plugin directly from www.mythtv.org in order to view this readme file). Also note that, in some countries (The U.S. I believe) it may be illegal for software to de-encrypt DVDs without paying licensing fees; so by using the software above, you may be breaking the law. I take no responsibility for your actions, and I do not offer legal advice; please speak with your attorney if you have further questions.

To watch a ripped DVD with Myth, after the DVD has been ripped, visit the Utilities/Setup->Video Manager section of Myth. Push up and down until the DVD you just ripped is highlighted, and press 'i' for info. Select the 'Search IMDB' function. If the databasase is searched properly, a cover of the DVD you just ripped should be displayed in your 'Videos' section, and you should be able to watch it.

Using Xine

It is advantageous to use Xine to view DVDs because, unlike the default mplayer that MythTV is configured to use, Xine allows you to use the Menu of the DVD. We will now configure Myth to use Xine to view the DVDs and videos.

Similar to before, we will need several pieces of software required by Xine. (Note: Ubuntu comes with a few of these installed, but it's worth it to make sure you have them. Additionally note that Ubuntu comes with Xine installed.) In order to identify the latest package available, perform the following.

apt-cache search <package_of_interest>

Once you've identified the package of interest, use apt-get to download and install the package. According to the Xine homepage http://xinehq.de/index.php/about, the following packages must be installed: ffmpeg, liba52, libmpeg2, libmad, and libfaad, FAAD2, libxinelc2, and libxine-dev. Install these packages (or the closest things you could find to them) and then go on. Note that Ubuntu already comes with xine installed on it. Note: If you have problems with your xine, either see a doctor or run the following command


Both procedures may reveal some information you were unaware of. Try running xine with Ubuntu. Place a DVD in your DVD drive. Select Applications->Sound and Video->Xine. Right click on the Xine window that comes up; select Playlist->Get From->DVD. Watch your DVD. If it doesn't work properly, try a few different DVDs. I had problems with one of mine; it turned out that the DVD was using an obscure audio encoding not yet implemented in linux. At this point, I was watching 'As Good As It Gets' with Xine.

At this point, there was some jerkiness with the video I was watching. By typing the following at the command line, the problem was identified.

 xine -pfhqd --no-splash --no-logo --verbose=1

By viewing the terminal, I saw the following message posted several times throughout the time I was watching the video: video_out: throwing away image ....

By performing the  xine-check command, I found that DMA was not set.

 sudo sync
 sudo hdparm -d1 -X34 /dev/hdd

Note that the above is a capital 'X' character. Again, be sure to replace /dev/hdd in the above command with the path to your dvd device (i.e. it might be /dev/dvd). Run xine again and see if the jerkiness is gone. If it is not, or if you want even better performance, you might want to try using Ultra-DMA instead of just regular DMA. Do this by typing the following command.

sudo hdparm -d1 -X66 /dev/hdd

If the jerkiness is still not gone, you might find a solution to your problem at the following websites: http://xinehq.de/index.php/faq#SPEEDUP, or http://xinehq.de/index.php/faq. If the above command works for you, or if you find another command that works for you, you'll need the above commands to be run at startup as root.

Edit the /etc/init.d/bootmisc.sh file. sudo nano /etc/init.d/bootmisc.sh }}} Add the 'hdparm -d1 -X66 /dev/hdd' line that works for you right above the last exit line of the file. The last line of the file should look something like ': exit 0'.

You can now use xine without without problems! Try running it from the command line (make sure a DVD is in your player).

xine -pfhqd -V xv --no-splash

Did it work? If not, review the past instructions for something has gone wrong.

Setup Myth to use Xine for DVDs

We will setup myth to use xine instead of mplayer to view DVDs. with the mythfrontend running, select Utilities/Setup->Setup->Media Settings->DVD Settings->Play Settings. Currently, there is the following command listed there as the dvd player command; this is the command we will change.

mplayer dvd:// -dvd-device d -fs -zoom -vo xv

Replace the above command with the following command.

xine -pfhqd -V xv --no-splash --no-logo

The -V option above tells xine what driver to use to display your DVD. The xv driver may not work for you. Review the man page of xine and its help page for more details.

man xine
xine --help

You should now be using xine to watch DVDs instead of mplayer.

Setup Myth to use Xine for Videos

We will setup myth to use xine instead of mplayer to view DVDs. with the mythfrontend running, select Utilities/Setup->Setup->Media Settings->Video Settings->Player Settings. Currently, there is the following command listed there as the dvd player command; this is the command we will change.

mplayer -fs -zoom -quiet -vo xv s

Replace the above command with the following command.

xine -pfhq -V xv --no-splash --no-logo

The -V option above tells xine what driver to use to display your DVD. The xv driver may not work for you. Review the man page of xine and its help page for more details.

man xine
xine --help

You can now use xine to watch videos instead of mplayer.

Have Xine Return Focus / Control to Myth

Note that when you quit xine (by pressing the right button with the mouse and scrolling down to quit) control is not given back to the myth front end, and you must Alt-tab to return control to myth front end. We will now remedy this problem so that when you exit out of xine, control is returned to the myth front end. The information presented to accomplish this was attained from the following website: http://www.abarbaccia.com/content/view/22/36/.

Download the xine-ui source from the xine website http://xinehq.de. Unzip the utility and extract it to your desktop. As root user, make the following directory.

 mkdir /home/<main_user_name>/Software/xine/

Move the extracted xine file to the new directory

 cd /home/<main_user_name>/Software/xine/
 mv /home/<user_name>/Desktop/xine* ./

Alter a line from the ./src/xitk/event.c file.

 nano /home/<main_user_name>/Software/xine/src/xitk/event.c

Remove the following line from the file.


Configure the new xine-gui.


Make and install the new xine-gui. Make sure to run these commands as root.

 sudo make install

Now watch a DVD and exit from it. Focus should be restored to the mythtv application. Smile :)

Setup Remote Control (LIRC) to work with Xine

Note that since the keyboard commands are different for xine than they are for myth, your remote control doesn't behave as you'd expect. We will now rememdy this problem. Note that you can download a .lircrc file to be used with MythTV, Mplayer, and Xine by copying the text located at ExampleLircrcFile4MythOnUbuntu. Copy the text located there and place it in a file called '.lircrc' within the user directory of any user that would like to use the remote control.

If you prefer to configure the file yourself, though, please continue with this procedure.

Have xine generate a skeleton lircrc file by typing the following at the command line.

 xine --keymap=lirc > xineSkeletonLirc.txt

This generates a skeleton file to be used as the .lircrc file. Copy the contents of this file into your existing .lircrc file. Remove any portions relevant to xine that exist in your current file other than what you just added. As before, use the irw software, located in /home/<user_name>/Software/tv/ivtv*/utils, to find the proper keys for each action you desire.

 cd /home/<user_name>/Software/tv/ivtv*/utils

An example element of a 'complete' .lircrc file is shown below.

# quit the program
        remote = Hauppauge_350
        button = Back/Exit
        prog   = xine
        repeat = 3
        config = Quit

Websites used to install Myth:


Add Station Icons to Program Guide

Myth Daemon start automatically

Remote Control instructions


Myth DVD

InstallMythOnUbuntu (last edited 2009-07-13 13:28:27 by kmitch87)