Computers 'n Stuff: Installing MythTV on OpenSuse Linux 10.2 64 Bit w/ USB 2.0

I here share the resolutions for my Linux problems so they might safe somebody some time.

Tuesday, May 15, 2007 parmanent link to this post

Installing MythTV on OpenSuse Linux 10.2 64 Bit w/ USB 2.0

Myth TV is a Media Center for Linux software. It fetches an electronic programm Guide for you, schedules recordings, seraches your favorite soaps in the electronic programm guide (EPG) and records them for you so you nerver miss a thing. In addition you can load a lot of modules for DVD CD Phosto Mp3 playback and stuff. Pretty neat.

I use MythTV 0.2 and kernel 2.6.18.8-0.3-default SMP with openSUSE patches. The em28xx driver needs to be updated though. Don't try MythTV 0.19 that won't work with the PCTV usb2. probably none of the em28xx devices will work with versions prior to 0.2.

Mythbackend is the server application of MythTV. it controles the TV grabber starts stop the recording and stores media data and stores and the Electronic Program Guide (EPG). All this data is stored in the MySQL database. The forntend is the client application. Its a remotecontrol for the backend. The backend will start stop recordings, swich channels on request of the frontend and stream the movie data to the frontend which will display it to you. The frontend also queries the MySQL datbase for EPG data, I guess. Here I write how I installed MythTV for OpenSuse 10.2

A precompiled *.rpm is provided by Packman

The Packman MythTV rpm v0.2 won't work with SuseLinux 10.2 with PCTV analog USB2 out of the box since the em28xx (driver for the 150e/55e) of OpenSuse 10.2 is outdated. You have to compile you own em28xx V4l2 from sources

follow the MythTV installation instructions for OpenSuse outlined here:

OpenSuse MythTV wiki

or here:

Installing MythTV


Some additional Notes:

Enter as root
# rcmysql start
(issue # chkconfig --level 35 mysql on
when mysql wount start at boot though enabled in the runleveleditor of Yast2 )
then initialize the database:
(Without mysql running mythtv-setup says it cant connect to the mysql server)

# mysql -u root < /usr/share/doc/packages/mythtv/database/mc.sql
List of packqges and dependencys is not complete in the Howto. You have to install xml-grabbers package!!!! this package contains the XML grabbers you need for the EPG channel list!!!! without you get tv_grab_de_tvtoday no such file or directory (or whichever the name of you grabber is)
you'll need to Alt + tab to the console and answer the questions of the grabber. It will ask you which Channels it should fetch for you. only check those channels you'll really need e.g which are available in your Cable netl.
You have to create directory where you want to save your digitally recorded tv programmes and make it world readable/writable before you start the mythtv-setup. you need to specifiy that directory during mythtv-setup. e.g.
# mkdir /home/video
# chmod a+rwx /home/video


start the setup from a console so you can see error messages on the console output!!!!
# mythtv-setup


The grabber is a pice of software which rips the Programm Guide from some website and outputs it in XML (extendable markup language, a flexible file format that mythtv can read)
during setup Mythtv will invoke the grabber
tv_grab_de_tvtoday --configure


This will only configure the grabber. Here you select wich Channels you want to grab from the electronic programm guide from the internet. Configuration will be saved to file
~/.xmltv/tv_grab_de_tvtoday.conf
here you can edit the file in case you made mistakes,
use as root
# rcmythtvbackend start

to start the mythtv backend
After the end of mythtv-setup you can do a
# mythfilldatabase --manual

to enter the frequency channel information for the respective station.
The
--manual
directive triggers an interactive mode where you can provide some information. MythTV needs to know to which channel it has to set the tuner of you tv Grabber (ur PCTV analog USB) if you want to watch a certen Broadcasting station. I will ask you on which channel it can find a Broadcasting station. The unique identifieer of the EPG data is the XMLTV.ID Thus MythTV needs to which XMLTV.ID is found on which channel. In additiont you can enter a lot of other informative stuff like long name and short name of the broadcasting station.
do the mythfilldatabase only for one day with the
--manual
directive else you have to go through all channel by for each day and grabbing takes forever (may be hours +).

use
# mythfilldatabase --update
to grab the following days instead. Once the channels are defined thy will be imported by mythfilldatabase automatically.

Mythfilldatabase takes forever. For me if was faster to run the grabber first for 1 dayThen improt EPG from *.xml file using:
# tv_grab_de_tvtoday --list-channels --output channels.xml
# mythfilldatabase --manual --preset --file 1 -1 channels.xml

have a channels list ready to assaign each station a channel from the channel freequncy list.
you can find this out by using mplayer
start mplayer from the console
mplayer -tv driver=v4l2:device=/dev/video0:amode=1:input=0:norm=PAL:adevice=/dev/dsp1:immediatemode=0:audiorate=48000:fps=30   tv://

and swich channels with h and k. this will require theat the PCTV USB is /dev/video0 and the audio device of the PCTV usb is /dev/dsp1. In the console (STD OUT) mplayer will print the current channel and you can see at the same time what si goin on.
Kdetv can also do a channal scan and you have to add the names manually. the em2820 of the PCTV USB2 150e/55e does not support Teletext/vbi. So dont bother.
then grab the rest
# tv_grab_de_tvtoday  --slow --output EPG.xml
and import
# mythfilldatabase -file 1 -1 EPG.xml --update
the 1 denotes the input source. If its not the first input source you want to grab then adjust this number accordingly -1 is ths offset which imports everything up to 7 day in advance from now on.
When lucky you can now start frontend to watch tv and do recordings and stuff.
to debug start frontend and backend from a console. 
the em28xx and V4l2 drivers which come with OpenSUSE 10.2 are outdated. They don't work for PCTV USB 2 PCTV analog USB2 150e/55e and MythTV
if you start the backend and start live TV you'll get a black screen and get a :

StartRecorder() -- timed out waiting for recorder to start


on the console you started the backend from.

Compile the recent stable version of em28xx

see here: em2880 wiki about mythtv

and here

repository ot the em28xx

you dont need to add any fimware to the source for analog devices like the 150e/55e. Firmware is only needed for digital devices.

To download the sources of the em28xx you will need a special programm which mnages sources. This is called mercurial (check if package is installed). It manages so called mercurial sources.

This is a package wich manages sources of large decentralized projects. It will download the sources you'll need and und update your sources automatically
enter:
You need to install kernel sources and kernel headlins before you can compile the em28xx driver
# hg clone http://mcentral.de/hg/~mrec/v4l-dvb-kernel
# cd v4l-dvb-kernel
# make
# make ./install

now reboot

after reboot MythTV should work.

Note. Kdetv also works only after driver update;)
link that download from v4linux domain is outdated ... can show up on old wiki or forum entries

some useful links:

forum
troubleshooting

Technorati Tags: , , , , ,

Labels: , , , , ,

0 Comments:

Post a Comment

<< Home