Opensuse 10.2

From MythTV Official Wiki
Revision as of 13:23, 15 January 2007 by Moosylog (talk | contribs) (Prerequisites)

Jump to: navigation, search

openSUSE 10.2

Myth suse.jpg



The openSUSE project is a community program sponsored by Novell. With the launch of the openSUSE project, openSUSE is now developed in an open model—public development builds, releases, and sources will be posted frequently here and you will have access to our Bugzilla database for defect reporting.


When you start writing about mythTV and/or openSUSE, please:

mythTV; lowercase myth; uppercase TV

openSUSE; lowercase open; uppercase SUSE


Introduction

For rich, reliable and secure home computing like mythTV, there's no better choice than openSUSE10.2. It features an easy-to-install Linux operating system that most of the required mythTV components standard in the box. Moosy.gif blog is a platform for openSUSE and SLED releated news that had a mythTV corner. We decided in jan 07 to move our content to the mythTV wiki and created this wikipage.

openSUSE 10.2 in combination with PacMan provide you with an easy installation and the latest packages like, myhthtv rpm's, ivtv, lirc, xmltv, php, mysql, mplayer, xine and many more.


openSUSE 10.2 official documentation

System requirements for openSUSE 10.2

All packages included in openSUSE 10.2

Prerequisites

openSUSE 10.2 x86 or x86-64 (Linux kernel 2.6.18.2) connected to the Internet

It all starts with good hardware. Check this wiki and the mailinglist before you purchase any new hardware.

http://www.silentpcreview.com/ if you build a machine for your living room.


packages you need: (just to name a few)

xmltv, myth*, kernel source, gcc, ivtv, lirc, mysql, php5, phpmyadmin, python, mplayer, xine, Kaffeine, alsa
libdvdread, mjpegtools, xvid, audit-libs, libao, libfame, transcode, flac, libfame, fame, libid3tag, w32codec-all, lame, xmms, dvb 

A good article for you to start is Hacking openSUSE 10.2

YaST Sources, get the packages

To add the External YaST Repositories for mythTV, open YaST, go to "Installation Sources" and press Add. There, first select the protocol and, on the next page, enter the server and the directory as listed below.

add pacman as your installation source:

Protocol - HTTP
Server name - packman.iu-bremen.de
Directories - suse/10.2

opensuse 10.2 installation sources here

To add these sources from the commandline

rug service-add http://packman.iu-bremen.de/suse/10.2 --type=ZYPP "Packman"
rug service-add http://download.opensuse.org/distribution/10.2/repo/non-oss/ --type=ZYPP "openSUSE-10.2-non-oss"
rug service-add http://download.opensuse.org/distribution/10.2/repo/oss/ --type=ZYPP "openSUSE-10.2"

[b]NOTE:[/b] Do yourself a favour and don't bother with YaST, I've always found SMART much better at package management. Useful repos coming soon...

IVTV, the analogue TV card

IVTV is a kernel driver for Linux and a driver for X11 for hardware based on Conexant's CX23415/CX23416 codec chip such as the Hauppauge PVR 150/250/350/500 models.

The primary resource for IVTV support is the IVTV wiki

openSUSE 10.2 ships with IVTV version 0.8.0-9 and everything is auto detected for me on the x86 and x86-64 bit version of the OS.

ivtv 0.8.0 (Driver Implementation for iCompression or Conexant Video Capture Cards)

supported tv cards http://en.opensuse.org/HCL/TV_Cards

check what's installed

rpm -qa | grep ivtv

output

ivtv-kmp-default-0.8.0_2.6.18.2_34-9
ivtv-0.8.0-9


Hauppauge WinTV PVR-150

About the PVR-150 -> http://www.hauppauge.com/pages/products/data_pvr150.html

PVR150.jpg


You can start with a PVR-150, but as soon as you are up to speed you want a PVR-500

The PVR-500 is the same as 2 x 150

http://www.mythtv.org/wiki/index.php/Hauppauge_PVR-150

Hauppauge WinTV PVR-500

about the PVR-500 -> http://www.hauppauge.com/pages/products/data_pvr500mce.html

mythtv-setup

Select "New capture card", to setup a new card. The card type should be "think there is pvr150 or pvr500". The video device should be set to /dev/video0, and the default input should be set to Tuner 0 or in newer versions Tuner. Now, since we are configuring a Hauppage PVR-500 card, we need to configure the second tuner/encoder on the card. PAY ATTENTION HERE.


The PVR-500 has two tuners and two encoders stuffed onto one card, the first card is /dev/video0 and Tuner-0, but the second card is: /dev/video1 and Tuner-0. Note that that is tuner ZERO. So now select "New capture card" again and put /dev/video1 and Tuner-0 in the applicable fields.


lspci can give you more info on your card and tuner:

lspci | grep -i itv

my output with my Hauppauge WinTV PVR-500 MCE

03:08.0 Multimedia video controller: Internext Compression Inc iTVC16 (CX23416) MPEG-2 Encoder (rev 01)
03:09.0 Multimedia video controller: Internext Compression Inc iTVC16 (CX23416) MPEG-2 Encoder (rev 01)

Firmware

THIS IS A MANUAL TASK !! Make sure you use the correct firmware, explained here http://ivtvdriver.org/index.php/Firmware#Firmware_filenames

Save the firmware in: /lib/firmware

Config file

ivtv settings are stored in /etc/modprobe.d/tv

cat /etc/modprobe.d/tv

Do not edit this file, this is all done by YaST

alias char-major-81 videodev
options i2c-algo-bit bit_test=1
# YaST configured TV card
# Uog3.chCB1CyIbw9:WinTV PVR 150
alias char-major-81-0 ivtv
# YaST configured TV card
# ZvjX.sZc4ePByvkF:WinTV PVR 150
alias char-major-81-1 ivtv
alias char-major-81-2 off
alias char-major-81-3 off

See how ivtv started when you restarted your machine and/or kernel modules are loaded.

dmesg | grep "video"

output:

ivtv:  ==================== START INIT IVTV ====================
ivtv:  version 0.8.0 (tagged release) loading
ivtv:  Linux version: 2.6.18.2-34-default SMP mod_unload gcc-4.1
ivtv:  In case of problems please include the debug info between
ivtv:  the START INIT IVTV and END INIT IVTV lines, along with
ivtv:  any module options, when mailing the ivtv-users mailinglist.
ivtv0: Autodetected Hauppauge WinTV PVR-150 card (cx23416 based)
ivtv0: loaded v4l-cx2341x-enc.fw firmware (262144 bytes)
ivtv0: This is the first unit of a PVR500
tuner 1-0043: chip found @ 0x86 (ivtv i2c driver #0)
tuner 1-0060: chip found @ 0xc0 (ivtv i2c driver #0)
tuner 1-0061: chip found @ 0xc2 (ivtv i2c driver #0)
cx25840 1-0044: cx25843-23 found @ 0x88 (ivtv i2c driver #0)
wm8775 1-001b: chip found @ 0x36 (ivtv i2c driver #0)
ivtv0: Encoder revision: 0x02060039
etc..

Devices

ls /dev/vi* -l

output

lrwxrwxrwx 1 root root 6 Dec 29 06:27 /dev/video -> video0
crw-rw----+ 1 root video 81, 0 Dec 29 06:27 /dev/video0
crw-rw----+ 1 root video 81, 1 Dec 29 06:27 /dev/video1
crw-rw----+ 1 root video 81, 24 Dec 29 06:27 /dev/video24
crw-rw----+ 1 root video 81, 25 Dec 29 06:27 /dev/video25
crw-rw----+ 1 root video 81, 32 Dec 29 06:27 /dev/video32
crw-rw----+ 1 root video 81, 33 Dec 29 06:27 /dev/video33

Tuner unit #1: /dev/video0 – The encoding capture device (Read-only) /dev/video24 – The raw audio capture device (Read-only) /dev/video32 – The raw video capture device (Read-only) /dev/radio – The radio tuner device /dev/vbi0 – The "vertical blank interval" (Teletext) capture device Tuner unit #2: /dev/video1 – The encoding capture device (Read-only) /dev/video25 – The raw audio capture device (Read-only) /dev/video33 – The raw video capture device (Read-only) /dev/vbi1 – The "vertical blank interval" (Teletext) capture device

Hauppauge WinTV PVR-250

About the PVR-250 -> http://www.hauppauge.com/pages/products/data_pvr250mce.html

Pvr250 board.jpg


no openSUSE specific info available, I don't have one.


Please add your info here.

Hauppauge WinTV PVR-350

About the PVR-350 -> http://www.hauppauge.com/pages/products/data_pvr350.html

no openSUSE specific info available, I don't have one. Please add your info here.

http://www.mythtv.org/wiki/index.php/Pvr350

DVB, the digital TV card

For DVB devices supported by linux see the following pages on the linuxtv.org wiki.


http://www.mythtv.org/wiki/index.php/DVB

opensuse supported tv cards http://en.opensuse.org/HCL/TV_Cards

Hauppauge Nova-T

This card should be installed automatically under openSUSE 10.2. It should Just Work™, no installs or config needed.

http://www.mythtv.org/wiki/index.php/Hauppauge_WinTV_Nova-T_PCI

http://www.mythtv.org/wiki/index.php/Hauppauge_WinTV_Nova-T_USB2

Hauppauge 1300

This card need Steve Toth's one-year-in-the-making almost-finished V4L drivers installed to get it working. The method is slightly complicated for newbies but the rest of you should find it relatively easy, so long as you do things in the right order.

Start by downloading the contents of the main v4l-dvb repository on linuxtv.org (this link, if you can't find it). I forget exactly what you do then, but it involves making, unloading, loading, installing... something like that. Anyway, the card should work after a restart if it's done properly.

lirc, the remote control

LIRC is a package that allows you to decode and send infra-red signals of many commonly used remote controls. openSUSE 10.2 ships with lirc 0.8.0-41


To use LIRC, you need a working /etc/lircd.conf file for your remote. You can get a lircd.conf for your remote on the http://lirc.org website or create your own file with irxevent and/or mode2, or search the web for a compatible one.

You also need to create a key mapping file in order to use your remote with any programs. With mythTV, this file is /home/user/.mythtv/lircrc and there should be a number of examples on line. Just remember that the key names in lircrc should correspond with the same button names in lircd.conf.

Instead of creating an individual lircrc file for each application, you can create one master file and put symbolic links to this in the appropriate places. The text command for creating a lircrc file in your home .mythtv directory, symbolically linked to .lircrc in your home directory, follows:

ln -s ~/.mythtv/lircrc ~/.lircrc

Finally, [b]ensure that the LIRC demon is enabled from boot[/b] by using YaST's Services manager (just find lirc, select it, hit enable and save).

LCDproc, the lcd display

mythTV ( mythlcdserver ) can control an LCD panel through LCDproc API. LCDproc is not part of openSUSE 10.2. In jan 2007 they are not available on pacman so: You need to download the source and compile. Make sure you also compile the server component of LCDproc and read the INSTALL file.

LCDproc.jpg




test your lcd device

echo Moosy rocks > /dev/lcd0
./configure --enable-drivers=all
make
cd shared
make
cd server
make
make install

check and configure the LCDd.conf file In the LCDd.conf there is a DriverPath pointing to server/drivers. (make this a complete path)

start the lcd server

LCDd

configure mythfrontend to use the lcd [config] [screen]

more http://www.mythtv.org/wiki/index.php/LCDproc

MySQL, the database

create THE database

mythTV uses MySQL to store store it's settings, listings, recording schedules, and other information. So we have to make sure openSUSE starts MySQL when it boots, and we have to initialize the database with some basic information that mythTV can work with.

opensuse 10.2 ships with mysql 5.0.26 (A True Multiuser, Multithreaded SQL Database Server)

As root, start mysql by typing

/etc/init.d/mysql start

Watch for errors. Set up a root password by typing

mysqladmin -u root password <yourpasswordhere>

Once MySQL is setup, install the mythTV Database. This is done by running:

mysql -u root < /usr/share/doc/packages/mythtv/database/mc.sq

You should see no output - this is a good thing!

By default, the database is named mythconverg and contains a set of tables that interact with one-another.

fill THE database

Most essential data in your database is the channel mapping: The mythconverg_channel table in the database links/maps the following information

channel number frequencie name of the channel XMLTV number

Without this information the EPG (Electronic Program Guide) and so mythfilldatabase can not work.


TODO:, this part needs to be re-written, please do so if you feel like it...


The database should be filled with XMLTV data. TV listings stored in the XMLTV format, which is based on XML mythfilldatabase, uses XMLTV and tv_grab_XX tv_grab_XX, where XX is your country specific method. See the XMLTV wiki page for more info. Normally, once a day; mythfilldatabase is executed by crond.


mythfilldatabase, the xmltv grabber is country specific. We use http://graphics.tudelft.nl/~paul/grabber/ for the Netherlands.

check this page: http://www.mythtv.org/wiki/index.php/XMLTV

more info http://www.mythtv.org/wiki/index.php/Mythfilldatabase

manage THE database

Use phpMyAdmin; php5 and phpMyAdmin are both standard part of openSUSE 10.2

openSUSE 10.2 ships with:

php5 5.2.0 (PHP5 Core Files)

phpMyAdmin 2.9.1.1 (Administration of MySQL over the web)


[b]Add commands for entering database, selecting and viewing tables, and simple deletion of channels. Will do once I'm out of Win XP... --Pepsi max2k 20:52, 8 January 2007 (UTC)[/b]

By default, the database is named mythconverg and contains a set of tables that interact with one-another.

fix THE database

In the contrib directory there is a Perl script to run MYSQL utilities Repair and Optimize on each table in your MythTV database. It is recomended to run it daily from a cron job.

First make sure it is executable:

chmod 755 /usr/share/doc/mythtv-0.20/contrib/optimize_mythdb.pl

Execute:

/usr/share/doc/packages/mythtv/contrib/optimize_mythdb.pl

run with your daily cron jobs

backup & restore THE database

backup

$mysqldump -u mythtv -pmythtv mythconverg -c > mythtv_backup.sql

TIP: AutoMySQLBackup is a cool or let's say the ultimate backup script for your mythtv environment.


restore: (assuming that you've dropped the database)

$ mysql -u root
mysql>create database mythconverg;
mysql>exit
$ mysql -u mythtv -pmythtv mythconverg < mythtv_backup.sql

NTP, the time protocol

NTP is a protocol designed to synchronize the clocks of computers over a network. So, to get the correct start and stop times for programming, it's important to setup NTP.

Open YaST, click on network services, then NTP client

Configure ntpd to start at boot

There is more info on NTP at http://www.pool.ntp.org

TV-out, the graphics adapter

There is a section on this wiki dedicated to TV-out. http://www.mythtv.org/wiki/index.php/TV_Out.

This provides an PAL or NTSC standard video output signal, which can be sent to a normal TV set using a normal RCA cable. If your box has PAL/NTSC video out, you'll find an RCA video connector (usually yellow), or a 4-pin Mini-DIN S-Video connector on the back somewhere, which you can connect your monitor to, with the appropriate cable.

ATI

The ATI Proprietary Linux driver (fglrx) currently provides hardware acceleration for 3D graphics and video playback. It also includes support for dual displays and TV Output. The question is; does the driver support your hardware. The driver (fglrx) is also used for the linux 3d desktop (xgl, compiz, beryl)and it looks like ati (amd)has put more resources on the development. Still there are weird things (bugs?) with ati.

ati on this wiki

With the release 8.33.6, release dec. 2006 there is support for openSUSE 10.2 and the new released version of X.org 7.2

current version - jan 2007 - ati driver 8.33.6 - release notes

rpm -qa | grep fglrx

--

TV-OUT ISSUES: still some issues with the 8.33.6 driver and myth 0.20 - will update this when finished. check current state of my research onMoosy.gifby clicking here

--

NVIDIA

You're best off installing the proprietary Nvidia drivers on openSUSE 10.2. This is easiest when you use the default 10.2 install and don't upgrade the kernel. If so, follow the below to get the drivers installed:

Add the nvidia repo to SMART or YAST: http://download.nvidia.com/opensuse/10.2

Install the x11-video-nvidia and nvidia-gfx-kmp-default packages.

Change to a command shell by hitting Ctrl-F1.

Type "init 3" and then "sax2 -r -m 0=nvidia". IF you don't see an Nvidia logo at this point, something's probably gone wrong.

Unless you have reason to believe the sax2 info will be wrong, and/or know what to change it to, just hit save. Type "init 5" to get back to a GUI.

And if you have any problems with refresh rates or DPI issues, check this suseforums thread.


I haven't got as far as TV-out yet...

Hauppauge WinTV PVR-350

no openSUSE specific info available on the 350's TV-OUT, I don't have one. Please add your info here.

Here is some good info about the 350 tv-out http://www.mythtv.org/wiki/index.php/XV_on_PVR-350 and http://www.mythtv.org/wiki/index.php/Pvr350

INTEL

Please, refer to the man page http://intellinuxgraphics.org/man.html.

no openSUSE specific info available, I don't have one. Please add your info here.

Client connectivity

Browser based frontend

Mythweb is the best option to access your mythTV machine over HTTP You can also think of a VNC session to your central box.

In the initial release of 10.2 there is a bug in combination with gdm and the standard vnc. If vnc does not work with gdm (gnome) edit the following file:

pico /opt/gnome/share/gdm/defaults.conf 

look for the [xdmcp] section and change it to enable=true, and then restart gdm, things will start working

Linux based frontend

You can install mythfrontend on the same machine as your mythbackend or on one or more other machines. To have access to your central filesystem you can configure a NFS server for your data directory. On the Linux client; install the NFS client. Have pacman and YaST do the rest for you.

mythVideo

MythVideo allows for cataloging and playback of a variety of video file formats. It can perform automatic meta data look ups on IMDB as well as retrieve poster artwork.

mplayer subtitles

The default mplayer that we got from pacman did not do subtitles. Error message about subfonts.ttf or something. mplayer can search in 2 directories for it's fonts for subtitles:

1.) download the recommended subtitle fonts from

Prerendered fonts: http://www1.mplayerhq.hu/MPlayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
Download MD5 sum: 1ecd31d17b51f16332b1fcc7da36b312
Download size: 234 KB
Additional fonts: http://www1.mplayerhq.hu/MPlayer/releases/fonts/

2.) There are 4 diffrent size in the tar file. Select your preferred font size and save the files in: ~/.player/.font


play non iso dvd rips from disk

When I download some movies, they are not always in ISO format. If they are in VIDEO_TS VOB format I use the following trick to get them in the mythvideo (imdb) display. For this example; let's assume we downloaded a movie called Moosy the Movie part 1.

1.) create a file in your video/movies directory

pico moosymovie.link

dvd://your_directory/moosymovie/VIDEO_TS

2.) now create a new extension in mythfrontend

config, config, media, movies, filetypes

create a new extension

Extension .link
Command: xine -pfhq `cat %s`
Standard: OFF
Ignore: OFF

xine and remote

It looks like the xine that I installed from pacman was not compiled with lirc support so my remote is not working in xine.

If you are using xine and have issues with your remote, check

ldd /usr/bin/xine|grep lirc

Solution: compile xine from source

mythGame

http://www.mythtv.org/wiki/index.php/Special:Search?search=mythgame&go=Go

mythMusic

don't like it and don't use it

Windows based frontend

mythTV player from Mikkelrocks, as far as something on Windows can rock. It sure is a cool puppy you should give a try.

There is a mythfrontend available for Windows. It sucks big time and I don't wanna talk about it.

Good idea to turn your samba server on to have access to your mythTV data: Here is a sample samba config. Read/Write for the world:

/etc/samba/smb.conf

[global]
netbios name = mythtv
workgroup = workgroup
server string = Our home server
#
use client driver = yes
security = share
wins support = no
#
[myth_data]
path = /data
browseable = yes
writable = yes
public = yes

XboX based frontend

Still don't have a xbox, here you can find more info