Garbage File

March 6, 2008

Gentoo MythTV

Filed under: Gentoo / Linux — kevin @ 5:45 pm

I recently setup a HD MythTV (digital video recorder) Gentoo box using my Motorola 6200 set top box over ieee1394 (firewire). The setup was a bit painful and took over a week to get right, largely due to my inexperience with this sort of thing.

The box is excessively powerful as I mean to use it as a personal server in addition, but the important details are that it is using an ‘MSI NX8500GT-MTD256EH GeForce 8500GT’ for graphics (which is far overpowered) and ‘ASUS P5K-E LGA 775 Intel P35 ATX Intel’ motherboard which has an ieee1394 port.

# echo "media-tv/mythtv alsa ieee1394 lirc opengl" >> /etc/portage/package.use
# emerge mythtv

MythTV uses MySQL to keep track of information like system settings and television program details, forcing us to initialize MySQL and then initialize the MythTV database.

# rc-update add mysql default
# /etc/init.d/mysql start
# mysql -u root -p < /usr/share/mythtv/database/mc.sql

For the Motorola 6200, check the status of the firewire by executing ‘plugreport’ before starting mythtv-setup and check the output. Here is a great guide for discovering your firewire status. Keep in mind incorrect firewire port and node settings will crash most programs including mythbackend along with some of the debugging tools, so when executing ‘plugreport’ notice that the port number is the adapter number and the node number is obvious.

Next start X and run ‘mythtv-setup’ as a normal user to change backend settings. I am not entirely sold on this implementation as the security of the system seems to fall apart at this point. Any user on the box can run this program and change the settings of a program that is run at boot. This would be more appropriate as a /etc/conf.d/mythtv instead of some weird gui application coupled with MySQL…

General
- change the recording directory to one with permissions 775 and ownership of mythtv:users
- change TV format to ‘NTSC’
- change channel frequency to ‘us-cable’
Capture Cards
- select firewire
- set port and node to the values found earlier
Video Sources
- select schedules direct
- set username and password
Input Connections
- connect capture card to video source
- get channel lineup from video source

Exit the setup utility and fill the database with channel information.

$ mythfilldatabase

At this point mythbackend should be configured well enough for a basic television watching system.

# rc-update add mythbackend default
# /etc/init.d/mythbackend start
$ mythfrontend

Powered by WordPress