Thursday, June 22, 2006

MythTV Pitfalls & Help: 2

This is my second post on MythTV. The first post went through some of the very basics like MythTV can do and some basics about choosing hardware. If you have any questions about that stuff check out the first post or the MythTV docs.

Step 1

The first step to getting a MythTV box setup is picking and install your favorite Linux distribution. There is no "best distro", but some of the most popular are Ubuntu/Kubuntu, Suse, Mandrake, and Fedora. I used Ubuntu for my choice because I had never used it and wanted to see what it was like. Choose your favorite in the end it doesn't really matter.

Additional Distro Comments
If you have little Linux experience I would highly recommend using Ubuntu or Kubuntu. (The difference is that Ubuntu will install Gnome as the default desktop and Kubuntu will install KDE. Once you install one you can install the other as well.) Both are very easy to use, have very good installation programs, package management tools (Add / Remove Software for windows people), and are very easy to get help with. The Ubuntu installer picked up all of my hardware basic (not my encoder card) including my wireless card (madwifi). I was then through the package management software able to install the Nvidia drivers for my video card.

Step 2
At this point I had all of my hardware basic hardware setup and configured. It was no time to get the Video Encoder Card to work. As I mentioned before I purchased the PVR-350 from Hauppauge. This card has great support under Linux with the ivtv drivers. The ivtv site has a good Howto for installing on "Breezy Badger". I did not see this till after I installed so I didn't use it plus I use "Dapper Drake". Anyway the install is not that difficult. Here are the key points.

1.) Download the 0.4.X version, it's probably the one you will need. When in doubt run 'uname -r' to get your current kernel version. If your kernel is less than or equal to version 2.6.15 then you want version 0.4.x. If it is above that use the 0.6.x version. (This may change with time, consult the documentation if in doubt)

2.) Make sure you install the development tools for Ubuntu and make sure you install the kernel headers package. If you don't install this stuff you may get errors. Missing libraries, gcc, libtool, etc... Also if you have errors compiling the kernel modules you probably didn't install the kernel headers package.

3.) Next compile with 'make', and install with 'sudo make install'.

4.) Next download and install the firmware for the device. This is a critical step and the card will not work without the firmware. You can extract the firmware from your windows cd or download it from the website. Here is where you can find more about this. On "dapper drake" the firmware files go in /lib/firmware/.

5.) Make sure none of the modules are currently running by executing this command. 'sudo rmmod ivtv cx25840 tuner tveeprom msp3400 wm8775 tda9887 saa7115 saa7127' The execute this command to load the new drivers. 'sudo modprobe ivtv'.

6.) You can use dmesg and / or look at /var/log/messages to make sure the correct modules are loaded.

7.) You can test the input of your newly installed card by running the command 'cat /dev/video0 > test.mpg'. Then open 'test.mpg' with MPlayer or some other media player. You can test the output by running the command 'ivtvfbctl /dev/fb0 -noglobalalpha -localalpha; dd if=/dev/video0 of=/dev/video16 bs=64k'.

This install was not very difficult as long as you installed the development tool required and the kernel headers. Please do realize that if you install ANY kernel updates you will need to recompile and reinstall these drivers! To be safe I would recommend updating your kernel headers, running 'make clean', 'make', and 'sudo make install'.

At this point you should have a working encoder and decoder card. If you do not visit the ivtv website and figure out the problems and fix it. Do not proceed until you get this working.

Here is a good link that I used to get my system setup. http://www.willmer.com/kb/mythtv/. Also this link even though it is mostly for Fedora is great also. http://wilsonet.com/mythtv/fcmyth.php.

I'll be continue with building and install mythtv next. Leave your comments / questions.

Sunday, June 18, 2006

MythTV Pitfalls & Help

If you've been thinking about getting a personal video recorder to improve your TV viewing experience, but are not sure where to begin, perhaps I can help you out. I have recently gone through the process and I think you can benefit from it.

The first thing you should know is that you have options, depending on your technical expertise and requirements.

Option One
When you think PVR, chances are you think TiVo. After all they the "big cheese". They build very easy to use and powerful devices. If you don't want any hassles buy one of these devices. The up front cost is low, just realize that you are going to be paying a monthly fee (currently $12.95) for the rest of the time you own the device. Replay-TV is another maker of similar devices, I don't really know much more about them though.

Option Two
If you don't want a TiVo you can try Microsoft's Media Center. I don't have a lot of details about them, but you can buy a PC from the usual vendors (Dell, HP, Compaq, or Sony) that runs the Media Center version of Windows XP. This is a decent option if you don't want any hassles. It works out of the box and phone support is available if you need it. It is more expensive initially and I don't know if there is are any recurring charges.

Option Three
The last option and the option I chose is to use Linux. There are two main software choices available that will give you a menu driven, "TiVo" style PVR, MythTV and Freevo. I opted for MythTV as it had more of the features I was looking for in a PVR.

Other Considerations

If you are going to go the Linux route here are some things you may want to consider when determining which software package is right for you.

1.) First go to both websites MythTV and Freevo and compare the features offered by each system. I'm not going to list them here because both project are under development and making improvements regularly.
2.) Realize that MythTV is written in C++ so it will be faster, but slightly more complicated to work with and build. Freevo is written in Python which doesn't need to be compiled but can be slightly slower than MythTV.
3.) Look for available binary distributions available with your favorite Linux distro. They are available with some distro's and can save you a ton of time.
4.) Look for support for your TV Tuner Card. (See more below)

There is no right or wrong choice, it just depends on what suites your needs better.

Notes on Tuner Cards
There are a number of Tuner cards that will work under Linux. They can be classified by their abilities: input/tuner, encoding, decoding, output. Minimally you will need a tuner / video input card. Some video cards have these built in, if yours doesn't then you will need to buy an additional PCI or USB card to do this. Better cards offer more types of inputs (Composite, S-Video, Coaxial), better analog to digital converters, and higher data rates. In addition these card may contain an encoder chip. This chip will be used to encode the video into a specific format (MPEG2/4 commonly) in hardware, rather than requiring your CPU to do it.

If your video card does not have a TV output, then you will need to get a tuner card that also has TV out on it. Optionally the output card may decode compressed video (MPEG2/4) in hardware relieving your CPU from the task.

The more of these features you require the more expensive your tuner card will be. For more on tuners see the Wikipedia.

I went with the PVR-350 from Hauppauge. It has a input and output, plus a MPEG2 encoder / decoder in hardware.

My system consisted of an Pentium 4 2.4GHz processor, 512 MB of RAM, a 250GB hard disk, and a wifi card. This is probably overkill since the tuner card has a built in MPEG encoder / decoder, but I'm being cautious since this is the first one I'm building.

That's it for now. I'm going to post a few more articles later this week. Check back for more info.