px
px
border
px
   
px
div
Information
null.gif Home

null.gif News
 Topics
 Stories Archive
null.gif Content
 Articles
 Tutorials
 Downloads
 Web Links
 Forums
null.gif Other Stuff
interdit Feedback
 Recommend Us
 Statistics
 Search
 RSS
 Your Account

Digital Video
Installing MythTV
MythWeb Hacks
Remote Control
Hardware Kit
Complete System

Digital Surveillance
Installing Zoneminder
Hardware Kit

VIA EPIA
Comparison Chart
Performance
Optimizing

Store Information
Shipping & Returns
Privacy Notice
Conditions of Use
Contact Us

div
  TopMy Account  |  Cart Contents  |  Checkout   
Installing MythTV - Part 5
MythTV

Table of Contents

In this part we will install and configure MythTV. There is an ebuild for versions 0.16, 0.17 and 0.18 that will make the installation pretty easy. The only bump in the road is the ebuild for 0.17 is masked. This is not a problem. Version 0.18 at this time hasn't been tested as much as 0.17. When we're done we will have a working MythTV system.

Install MythTV

Masking means portage will not install an ebuild automatically even if it is available and the latest version. This is done with packages that are not fully tested or otherwise unstable. We know MythTV 0.17 is stable so we need to tell portage to use it even though it is masked.

We can force portage to accept masked ebuilds with the /etc/portage/package.keywords file. Open or create that file and add the following line to it:

#nano -w /etc/portage/package.keywords
media-tv/mythtv ~x86

Press ctrl-X, save and exit.

Now we can use portage to install MythTV for us.

#emerge mythtv-0.17

Optional: Enable Real-Time Scheduling Of Display Thread

Playback performance of MythTV can be improved if you let the kernel do real-time scheduling of the display thread. To enable this feature run the following:

# chmod a+s /usr/bin/mythfrontend

This command causes mythfrontend (the display part of MythTV) to run as root. I know people will argue that this is a serious security risk. That may be true but my MythTV system lives behind a firewall and cannot be directly accessed from the Internet. I'm willing to accept the risk for the extra performance. You choose what is best for your situation.

Configuring Mysql

Before you can run MythTV we will need to create its database and add a user for that database. First make sure MySql is running by executing:

#/etc/init.d/mysql start

Now go into mysql so we can create the MythTV database and user. Start the Mysql console with the following:

#mysql -u root -p

Mysql will prompt you for the password you entered when you installed it. It will then present you with the mysql prompt. Enter the following:

mysql> create database mythconverg;
mysql> grant all privileges on mythconverg.* to 'mythtv'@'localhost'
-> identified by 'mythpasswd';
mysql> exit;

What we've just done is:
1. Created a database called "mythconverg". This is the default database name for MythTV. You can change it if you want but you'll need to change it in the MythTV configuration as well.
2. Created a database user called "mythtv" with password "mythpasswd". You can of course set the password to anything you like. The mythtv user has all privileges to all tables on the mythconverg database (indicated by mythconverg.*).

Register For Program Listings

MythTV will provide a program listing for your area and cable provider. It gets this information from the Data Direct service provided by www.zap2it.com. To use this service you must first register with Zap2it Labs. The service is free but you will have to fill out a survey periodically as part of your registration. When we configure MythTV we will need your user name and password so go ahead and register now. I'll wait.

Create Capture Directory

Here's one other little miscellaneous task we need to do - create the directory for captured video.

#mkdir /mnt/store

Some people use a Linux logical volume for video storage. This would enable you to expand storage by installing a new disk and expanding the logical volume to include the new disk. Since most mini-itx cases only have room for one drive this isn't an immediate need but it is something we'll consider in the future.

Configure and Start mythbackend

MythTV is divided into two parts. The backend process is responsible for recording captured video to the hard drive. The frontend displays the captured video. We're now going to run the setup program for mythbackend.

First, start up an X Session with:

#startx

In one of the consoles switch to the MythTV "setup" directory and start the setup program:

#cd /usr/bin/mythsetup

This will start a graphical setup program that first ask you for a default language. Then it asks a couple questions about clearing database entries (you can answer "no" to these) and finally to the setup menu. You can go through the 1. General menu and accept the defaults.

Under 2. Capture Cards you will need to create an entry for the WinTV PVR card. Here are the entries I made:

Next we define Video Sources. The video source defines the nature of the video signal received by the capture card. Key attributes of a video source are its program listing source and frequency table. This is where you will need your registration information from Zap2it Labs. Here's what mine looks like:

The next item is Input Connections. Here you will associate a Video Source with a physical input on the capture card. What shows on this page depends on the specific capture card you are using. The image below is for a PVR500 and it has more inputs than the x50 series cards.

In any case select the input connection you are using. This will take you to another page where you can associate a video source with the connection. Here's mine:

The last menu item is channel listing. It won't have anything yet because we've not loaded the program listing. If you want to edit channels you will need to perform the database load (next step), then return here to the setup program.

Load Program Listing

Once the setup is complete we can load the program listing into the database. MythTV has a utility for this:

#mythfilldatabase

This will load 12 days of program listings from Zap2it Labs for all channels. It will take a while so be patient. When its done you can go back to the setup program and select channel listing. You should now have all the channels defined for your video source. Here's mine:

Automatically Starting mythbackend

You will most likely want mythbackend to start automatically when you boot your system. That means we need to add it to the init process. To do that we'll need an init script. You can create your own if you want or you can download one from the Download area on the website. Here are the commands you can use to get the init script and associated configuration file.

#cd /etc/init.d
#wget http://www.magicitx.com/pub/MythTV/init.d/mythbackend
#cd /etc/conf.d
#wget http://www.magicitx.com/pub/MythTV/conf.d/mythbackend
#rc-update add mythbackend default

We can go ahead and start mythbacked now as well.

#/etc/init.d/mythbackend start

Starting and Configuring mythfrontend

As mentioned earlier mythfrontend is the display part of MythTV. We'll start it and take a look at the Settings menu.

I'm assuming you still have an X Session running. In one of the shell windows type the following:

#mythfrontend

Press the down arrow button to select the Settings menu and press Enter. You will see three menu items. We'll discuss each in turn.

1. General
You can accept the defaults for most of these items. However do take a look at the last page. Here is the option to have program listings loaded automatically. You only get 12 days at a time so it needs to run periodically to keep your listing up to date. I would suggest having it run every day or two.

2. Appearance
You can accept defaults for now.

3. TV Settings
This menu presents another list of items you can configure. The first, Program Guide, doesn't have anything you need to worry about now. You can accept the defaults.

The Playback has a couple items we need to look at. On the first page you will find an option for Deinterlace Playback. This improves the video image on progressive scan displays like monitors. However, I have experienced extremely high CPU usage with this option enabled. YMMV.

The next item is very important. On page 5 of the Playback menu has an option for Hardware Decoding that must be enabled. Then make sure "Use HW XVMC VLD Decoding (Via only)" is selected. This is needed to enable the hardware MPEG acceleration on the VIA mainboard. It is enabled by default if XvMC_VLD is enabled in the build. Just make sure it is selected.

For Recording Profiles and Recording Priorities you can leave these with their default settings. After you verify everything is working you will probably want to come back to these to experiment with the settings.

That it. Watch some TV!

Troubleshooting

My experience has been that trouble with MythTV is usually related to drivers. Start by looking at the system log. Open a console and execute the following:

#tail -n 100 /var/log/messages

Look for lines related to ivtv, tuner or snd. You should also take a look at the kernel boot messages:

#dmesg | less

If these don't help then make sure the drivers are loaded by listing loaded drivers.

#lsmod

This will list all of the loaded modules. You should see lines for these:

msp3400
saa7115
tuner
ivtv
snd_via82xx
snd_ac97_codec

If any of these are missing then perhaps they didn't load automatically. You can load them now with modprobe xxx where "xxx" is the name shown above. If you are successful loading the drivers then return to mythfrontend and try again.

If the drivers won't load, take a look at the system and kernel logs again. There should be messages telling you why the driver failed. If these don't help then make sure your system recognizes the WinTV PVR card. Type:

#lspci

(If the command is not present on your system you can execute emerge pciutils to load it.) This will list all of the PCI devices on your system. One line should look something like this:

0000:00:14.0 Multimedia video controller: Internext Compression Inc iTVC16 (CX23416) MPEG-2 Encoder (rev01)

If you don't see this then try turning off the system, reseat the card and restart the system.

You should also check the mythbackend configuration. For example, make sure you have the correct input connection selected. Also make sure you really have a video signal on the chosen input. If all else fails, get on the MythTV forum on this website and post a message.

Next: Part 6 – Configuration

History
17 Feb 2005Initial Publication
8 Apr 2005Updated for MythTV 0.17
Use ebuild to install MythTV
16 May 2005Updated ebuild instructions to account for 0.18 (still using 0.17 though).









Tim

Copyright © by MagicITX All Right Reserved.

Published on: 2005-02-17 (8618 reads)

[ Go Back ]
div
Survey
Are you doing a Car-PC project?

Yes, active now
Yes, planning stage
Thinking about it
No, not interested



Results
Polls

Votes: 329
Comments: 0

Login
Login Name

Password

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Who's Online
There are currently, 2 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here

div



MagicITX Logo © 2004.
All other logos and trademarks in this site are property of their respective owner. Comments are the property of their poster.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty for details see the license.
Page Generation: 0.116 Seconds