This shows you the differences between two versions of the page.
— | project:ivtv [2018/07/25 21:29] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== MythTV & WinPVR Howto ===== | ||
+ | |||
+ | // | ||
+ | |||
+ | **//Please note that this page hasn't been updated for a while and most probably will show outdated information. It is mainly kept here for reference.// | ||
+ | |||
+ | Someadays in 2004 the idea of building up my own, debian based PVR came to my mind. A spare Pentium4 machine and a Hauppauge WinPVR-350 were purchased rather quickly but then the adventure started. I realized that anything can work smooth and perfect but documentation on the web is incredibly distributed. | ||
+ | |||
+ | This page is my personal, small attempt to collect all information to get my special setup easily up and running. Take it as it is and don't ask me for other possible setups :) Of course any feedback on errors or improvements is welcome. | ||
+ | |||
+ | === Steps to success === | ||
+ | |||
+ | - Introduction | ||
+ | - Hardware | ||
+ | - System preparation | ||
+ | - Getting the IR running | ||
+ | |||
+ | === Introduction === | ||
+ | |||
+ | My system is based on the following hardware components: | ||
+ | |||
+ | * Asus Mainboard P4B-266 | ||
+ | * Pentium IV, 1.8 GHz | ||
+ | * LC-Power 6350 Netzteil (low noise!) | ||
+ | * 512 MB RAM | ||
+ | * Hauupauge WinPVR 350, model 990 (primary video card) | ||
+ | * Hauppauge WinTV PCI (sec. video card, PIP & EPG - not yet active) | ||
+ | * 180 GB IDE Disk | ||
+ | |||
+ | === Basic System Setup === | ||
+ | |||
+ | I assume you are an experienced Debian user and have installed your Debian Sarge system ready to use. There are no special recommendations but a big partition for storing video & audio is a good idea. The minimum Sarge install is absolutely necessary, I will mention all further packages needed. | ||
+ | |||
+ | After finishing the base install, you have to add some additional sources for mythtv and supporting packages | ||
+ | to your / | ||
+ | |||
+ | # Debian base (use a mirror nearby) | ||
+ | deb http:// | ||
+ | deb-src http:// | ||
+ | # Security updates | ||
+ | deb http:// | ||
+ | # 3rd party packages for mythtv | ||
+ | deb ftp:// | ||
+ | deb http:// | ||
+ | # ??? | ||
+ | deb http:// | ||
+ | deb-src http:// | ||
+ | # 3rd party packages for mplayer\\ | ||
+ | deb ftp:// | ||
+ | |||
+ | First of all and especially before building kernel modules it is a good idea to bring Debian to the latest patch level. Please note that I exclusively use Linux 2.6. | ||
+ | |||
+ | apt-get update apt-get upgrade | ||
+ | |||
+ | === Kernel Konfig === | ||
+ | |||
+ | Since we have to compile several kernel modules, we need kernel-sources and some tools - please replace the kernel with the latest 2.6 version available as package: | ||
+ | |||
+ | apt-get install kernel-package | ||
+ | apt-get install kernel-image-2.6.8-2-686 | ||
+ | apt-get install kernel-source-2.6.8 | ||
+ | apt-get install gcc g++ libc6-dev sharutils | ||
+ | |||
+ | Extract the kernel and make some links necessary to build ivtv: | ||
+ | |||
+ | cd / | ||
+ | tar xvpjf kernel-source-2.6.8.tar.bz2 | ||
+ | ln -s kernel-source-2.6.8 linux-2.6 | ||
+ | ln -s linux-2.6 linux | ||
+ | ln -s / | ||
+ | |||
+ | Prepare the kernel to build modules against (we do not have to build a new kernel itselves): | ||
+ | |||
+ | cd / | ||
+ | cp / | ||
+ | make oldconfig | ||
+ | make prepare | ||
+ | echo " | ||
+ | |||
+ | Reboot and check that the new kernel is running smooth. | ||
+ | |||
+ | === Driver Install === | ||
+ | |||
+ | Now we have to install the driver for the WinPVR, called " | ||
+ | |||
+ | cd / | ||
+ | tar xvpzf ivtv-0.3.2a.tar.gz | ||
+ | cd ivtv-0.3.2a | ||
+ | cd driver | ||
+ | make | ||
+ | make install | ||
+ | cd ../ | ||
+ | make | ||
+ | make install | ||
+ | rm / | ||
+ | |||
+ | The msp3400 kernel module has to be deleted since ivtv provides its own, improved module. | ||
+ | |||
+ | Additionally you have to extract the IVTV firmware from an official Windows-Driver Package and put the two files to / | ||
+ | |||
+ | root@vcr:/ | ||
+ | # -rw-r--r-- 1 root root 262144 Nov 23 21:14 | ||
+ | -rw-r--r-- 1 root root 262144 Nov 23 21:14 ivtv-fw-enc.bin | ||
+ | |||
+ | To insure that the ivtv modules are loaded in the correct order and with options set, put these module options to / | ||
+ | |||
+ | # Remote | ||
+ | alias char-major-61 lirc_i2c | ||
+ | # WinPVR | ||
+ | alias char-major-81 videodev | ||
+ | alias char-major-81-0 ivtv | ||
+ | alias char-major-81-1 bttv | ||
+ | options ivtv ivtv_std=2 tda9887=0 ivtv_debug=1 | ||
+ | options msp3400 once=1 simple=1 | ||
+ | options tuner pal=1 | ||
+ | install ivtv / | ||
+ | |||
+ | In our case we want to wake up the server using the onboard RTC, so we have to load the appropriate modules rtc and apm. | ||
+ | Note that we tweak the system here since genrtc breaks RTC support on latest debian 2.6 kernels, so the following entry in / | ||
+ | |||
+ | install genrtc / | ||
+ | |||
+ | Ensure that the modules get loaded by putting them in / | ||
+ | |||
+ | ivtv nvram apm | ||
+ | |||
+ | Reboot and check if ivtv gets loaded properly and if all hardware ist detected! | ||
+ | |||
+ | === Base Install === | ||
+ | |||
+ | The next step is to install all the MythTV and associated tools via debian packages. There are some binaries we have to build on our own but this will be described later. We will use KDE as a nifty window manager, since it allows easy implementation of features like password less login, auto login or sound system. | ||
+ | |||
+ | apt-get install x-window-system-core xserver-xfree86 kde kdm mythtv sudo | ||
+ | |||
+ | Relax and get a cup of coffee :) | ||
+ | |||
+ | If the install completes, insure that that there are two users mythtv and mythv-setup sharing the same UID. | ||
+ | |||
+ | mythtv: | ||
+ | mythtv-setup: | ||
+ | |||
+ | Put your mysql access passwords in / | ||
+ | |||
+ | mkdir / | ||
+ | cd / | ||
+ | ln -s / | ||
+ | mkdir / | ||
+ | cd / | ||
+ | ln -s ../ | ||
+ | |||
+ | Put an .xsession file in user mythtv' | ||
+ | |||
+ | # PAL | ||
+ | / | ||
+ | / | ||
+ | # Tuner | ||
+ | / | ||
+ | / | ||
+ | # MythTv | ||
+ | / | ||
+ | / | ||
+ | |||
+ | And the same for user mythtv-setup: | ||
+ | |||
+ | # PAL | ||
+ | / | ||
+ | / | ||
+ | # Tuner | ||
+ | / | ||
+ | / | ||
+ | # MythTv | ||
+ | / | ||
+ | / | ||
+ | |||
+ | Now we are actually done and just some finetuning is missing. | ||
+ | |||
+ | Login as mythtv-setup and make your settings, relogin as mythtv and us your new PVR :) | ||
+ | |||
+ | === KDE/X11 Konfig === | ||
+ | |||
+ | Here are my suggested settings for X11/ | ||
+ | |||
+ | * KDE allows me to setup password less logins for users mythtv or mythtv-setup. | ||
+ | * The .xsession file for each user starts mythtv or mythtv-setup. | ||
+ | * I have set up mythtv to wake up via RTC clock as soon as a recording is scheduled and near to start. MythTV is also switching off the machine when there is no action for more than 10 minutes. Unfortunately mythtv only switches off, when no frontend is running. To solve this, normally my machine boots only to the KDE-Login. The backend is yet running and can do the recording while we do not block MythTV from shutting down after the recording finished. | ||
+ | |||
+ | If I use the PVR or want to avoid shutdown I simply have to login as mythtv. | ||
+ | |||
+ | Note that you must *not* shutdown the computer manually in this setup since MythTV has to set the next RTC-wakeup time prior to shutdown. Instead just go back to the KDE-Login and wait for the automatic shutdown. | ||
+ | |||
+ | To allow MythTV automatic shutdown and setting of the RTC, add the following to / | ||
+ | |||
+ | mythtv ALL = NOPASSWD: / | ||
+ | |||
+ | and do the appropriate settings in the setup dialogues using sudo. | ||
+ | |||
+ | === IR Remote Control Support === | ||
+ | |||
+ | The WinPCR 350, model 990, contains a new infrared unit. It has ??? keys and is silver/grey coloured. Please note that keycodes have changed in opposite to the previous version! | ||
+ | |||
+ | There are two possibilites to route IR commands to MythTV. The first option is to compile IR support directly in mythv. Since I wanted to use the precompiled debian packages I decided to use the second option. A small daemon, called lird, is able to send simulated keystrokes to MythTV. | ||
+ | |||
+ | I have adapted the available configs to suite the new infrared unit, links for downloading lircd.conf and lircrc may be found some lines below. | ||
+ | |||
+ | Currently the lirc driver has to be compiled from source, since available packages don't support the IR port on WinPVR, model 990. You need at least version 0.7.0: | ||
+ | |||
+ | apt-get install dialog | ||
+ | apt-get install libx11-dev | ||
+ | |||
+ | tar xvpzf lirc-0.7.0.tar.gz | ||
+ | cd lirc-0.7.0 | ||
+ | ./configure --with-x --with-driver=hauppauge | ||
+ | make | ||
+ | make install | ||
+ | chgrp mythtv / | ||
+ | chgrp mythtv / | ||
+ | chmod g+r,g+w / | ||
+ | chmod g+r,g+w /dev/lircd | ||
+ | |||
+ | Be sure that the tool " | ||
+ | |||
+ | Sample Configfiles lircd.conf and lircrc may be found here. Place them in /etc. | ||
+ | |||
+ | {{lircd.conf}} | ||
+ | {{lircrc}} | ||
+ | |||
+ | === MPlayer === | ||
+ | |||
+ | While it is quite easy to record TV shows with MythTV, you need separate tools to play DVDs or any AVI, WMV, ... file. I recommend mplayer. Unfortunately you have to compile it on your own, because prebuild packages haven' | ||
+ | |||
+ | === Other Features === | ||
+ | |||
+ | Features I am currently working on are integrated DVD-Burning, | ||
+ | |||
+ | === Local Configuration & EPG === | ||
+ | |||
+ | My local installation is set up to work in the cable network of Kabel-BW Stuttgart, Germany. EPG may be grabbed from Prisma Online with tv_grab_de_prisma. I prefer this over grabbing from TV Today since the performance seems to be better and changes on the server' | ||
+ | |||
+ | {{channel.dmp}} | ||
+ | {{channel.mysql}} | ||
+ | |||