Last year I had a go at building a PC that could have been a replacement for my Tivo, it was going to run Linux and MythTV, and have dual tuners, a big disk, the full monty. Well, it didn’t quite happen like that. I made a start, found out that MythTV is a bugger to configure, and then realised it was too big and noisy to be of any use to anyone. Anyway, here are the blog entries that I made at the time and in true blog fashion you should start reading from the bottom upwards…
Monday, February 28, 2005
My goal was to have everything working by the weekend, but I failed, mainly because the spare TV I’ve been using was taken back upstairs for PS2 duty.Anyway, I kept myself busy by getting VNC working as I thought it could be useful in the future. In case you don’t know, VNC is a client/server type application that lets you view one machine’s desktop from another, ie I can get a KDE desktop up on my WindowsXP system, or vica versa. It’s pretty handy and very easy to set up. On Mandrake you just make sure you have the client and server RPMs installed and on Windows just download it all from www.tightvnc.com.
I also had a play with FreeNX which is a newer method of doing the same thing but it’s a bit more complicated. There’s a good description about how to get it working under mandrake here.
I also set up a FAT32 partition on my XP machine that I can share under Mandrake using Samba.
Thursday, February 24, 2005
First of all I made sure that I had installed the ivtv supplied X server by running this from the ivtv UTILS folder..
install -c -m 0444 ivtvdev_drv_o /usr/X11R6/lib/modules/drivers/ivtvdev_drv.o
Then I edited /etc/X11/XF86config file (having made a backup first) and added
the following sections, replacing what was there before..
Identifier “Hauppauge PVR350”
Option “fbdev” “/dev/fb1”
Identifier “PAL TV”
HTimings 720 760 832 944
VTimings 576 577 580 602
Flags “-HSync” “-VSync”
Device “Hauppauge PVR350”
Monitor “PAL TV”
InputDevice “Keyboard1” “CoreKeyboard”
InputDevice “Mouse1” “CorePointer”
You get the Busid value from the lspci display value for the PVR-350 card and the fb1 value from the messages written to the log when you start ivtv-fb.
I then set Linux to boot in to runlevel 3 to give me a command prompt. I logged in as root on one console and my Mythtv user on another console (press ctrl-alt-F1 or F2 to switch between them).
From root I switched XF86config files to my new definitions and issued the commands..
modprobe ivtv tuner=4 ivtv_debug=1 ivtv_std=2
ivtvctl -u 0xff -p 6
I then switched to the other console and did a startx. Amazingly KDE loaded on the TV screen!
The next small problem is that the desktop is too big for the TV screen.
So, good progress and its only 11pm!!
Tuesday, February 22, 2005
Anyway, after another long break I have decided to make this work. Since my last update Mythtv has had an upgrade to 0.17. I decided the best thing to do was to start from scratch, so I formatted my hard drive and re-installed Mandrake 10.1 Community Edition. I added the various urpmi sources by using http://easyurpmi.zarb.org/ , configured as if I were using 10.1 Official, and installed the Kernel source for 18.104.22.168-10. At this point I also installed the Kpackage application as it helps with RPM management.
I then added a urpmi entry for Thac’s RPMs.. urpmi.addmedia thacs.rpms http://rpm.nyvalls.se/10.1/RPMS with hdlist.cz . I could then install the mythtv-suite RPM which pulled in most of the Mythtv packages. Additionally I had to install the latest XMLTV packages, including the grabber for the UK.
The first thing to do is to get the IVTV driver working for the Hauppauge PVR-350 graphics card. The 22.214.171.124-10 kernel already had drivers built in, but they are pretty old so in order to install newer ones you have to rebuild the kernel, removing the ivtv drivers.
cd /usr/src/linux (make sure this link points to your kernel source)
make xconfig (remove entries for IVTV and LIRC)
edit Makefile and change the EXTRAVERSION option to something meaningful, ie “.1-10lee1”
cp arch/i386/boot/bzImage /boot/vmlinuz-126.96.36.199-10lee1
cp System.map /boot/System.map-188.8.131.52-10lee1
cp .config /boot/config-184.108.40.206-10lee1
mkinitrd /boot/initrd-220.127.116.11-10lee1.img 18.104.22.168-10lee1
kedit /etc/lilo.conf and add an entry for your new kernel
Assuming that has all worked (you’re on your own if it hasn’t) then you should download the latest ivtv drivers from here . At the time of writing the 0.2 versions were stable, but I have decided to use the 0.3 branch as I like to live dangerously! Download the latest 0.3 drivers and the latest firmware.
Unpack the drivers..
Install the firmware using the ivtvfwextract.pl utility.
You can now start to get the ivtv driver working. The various READMEs in the DOC folder are worth reading. Here’s what I did for a PAL set up…
I didn’t want to use the tuner on the card as I am intending to take the TV output from my cable TV box and feed it in to the tv-in.
modprobe ivtv tuner=4 ivtv_debug=1 ivtv_std=2
This disables the tuner and sets output to PAL
Loads fb driver.
ivtvctl -u 0xff -p 6
Sets input and output options
You can now try and display your tv-in on your tv-out. I had the tv-out from my Windows PC connected to the tv-in on my Linux box, and then the Linux tv-out connected to a TV. On Windows I set the tv-out display to be an extension of the desktop.
ivtvfbctl /dev/fb1 -globalalpha -nolocalalpha -alpha 0
dd if=/dev/video of=/dev/video16 bs=64k
After a few seconds you should then see part of your windows desktop on your TV. You should then be able to drag a window on to the extended desktop. There is quite a delay between doing something and seeing it happen on the TV, about 12 seconds on my system, doe to encoding and decoding delays I suppose.
So, that all worked for me. The next step is to get an X display working on the TV. That will be in the next blog. Coming Soon!!
To see my list of PVR related bookmarks that I’ve collected whilst doing this project, see here
Monday, November 29, 2004
Oops! There’s been a long break since the first post, but I have been busy, honest!! In fact, I’m sure I updated this blog fairly recently, but it’s all disappeared, oh well 🙂
BTW, since the last post I have upgraded to Mandrake 10.1 Community Edition. This was painless but introduce a small problem that caused a long delay when logging on. This was caused by a conflict between two packages, DEVFSD and UDEV. The former was used in version 10.0 and the latter in 10.1. I have no real idea what these programs do but the solution to the problem was to uninstall DEVFSD. See this thread if you need more info.
The three things I need to tell you about today are XMLTV and IVTV, so here goes..
Once I’d managed a basic install of Mythtv, the first thing that struck me was “How the hell does it know what’s actually on the TV?” It turns out that it uses a package called XMLTV, which downloads TV schedules from a variety of locations depending on your country of origin. This is called ‘grabbing’. In the UK you should use the ‘tv_grab_uk_rt’ grabber which downloads the info from the Radio Times web site. I find it amazing that the BBC can provide this info for free, as I thought that it cost a lot of money for magazines to purchase this sort of information. On the Tivo I have to pay Â£10 per month to download similar info from Tribune, and Sky+ charge a similar fee.
Make sure you are using the latest version of XMLTV. I think that Mandrake came with version 0.5.34, which didn’t download the listings correctly, as the file layout had changed. I had to upgrade to 0.5.36, but I see that 0.5.37 is now available. If an RPM of the latest version isn’t available then just build it from the source, it’s pretty easy.
I soon came to realise that my Pinnacle PCTV tuner card wasn’t going to be up to the job as it didn’t have a Hardware MPEG decoder, meaning that all the TV compression was going to have to be done in software, using up a lot of the CPU capacity. Also, getting tv-out to work on my Radeon 7000 was looking tricky. I decided to buy the TV card that had the best support, and the most users, the Hauppauge PVR-350. This has tv in and out, as well as a hardware decoder.
Getting this to work has proved a struggle as support for the IVTV driver seems to have changed hands, and the new guy isn’t too hot on documenting what’s going on! I struggled for ages to get the original 0.19 drivers to work, moved on to 0.2, and finally 0.3, before I realised that no matter what I did Mandrake was using some old 0.19 drivers that were pre-installed in the Kernel! The solution was to build a new kernel without IVTV included and then install the latest 0.3 drivers from here.
Once I’d installed these I connected the tv-out from my Windows PC to the tv-in on the PVR-350, and the tv-out from the 350 to a TV. I then followed the instruction on the HowTo page for TVOUT and TVOUTPAL and an image of my Windows desktop appeared on the TV!
OK that’s enough for today!! I’m going to watch some stuff recorded on my trusty Tivo now, Byeee!!
Tuesday, November 09, 2004
I am a happy owner of a Tivo PVR, but here in the UK they are no longer available to buy, even though they are still the best and most flexible PVR there is (the Sky+ is a worthy competitor, but it can’t do all the tricks the Tivo can).
As my Tivo is now several years old I thought that it must be possible to make something that can do the same, or better, than the Tivo. I am a Linux fan so I decided that whatever I build had to run under Linux. Having made that decision and having started to actually build a system, I then discovered that you can now buy Windows Media Center 2005 Edition and build your own system around it. This would probably be a much easier option than Linux but nowhere near as much fun!
I bought a cheap Â£250 PC from a bloke at work. This uses an Nvidia NForce2 chipset which Linux doesn’t seem to like. In order to get it to load you have to use extra kernel parameters at boot time… noapic nolapic nosmp. It has a 40Gb disk, 512Mb RAM, AMD 2400 processor, ATI Radeon 7000 graphics card with TV-out. I added my own Pinnacle PCTV TV tuner card.
Installed Mandrake Linux 10.0 Community edition. I wanted to take the easy option and only install MythTV from RPMs, rather than have to compile it from source. To help me with this I used posts on PVR Guide that helped me to set up the Mandrake Software Media Manager options. Basically, go to Easy URPMI and follow the instructions there to define all the various installation sites.
Once you’ve done that you should be able to issue the ‘urpmi mythtv-suite’ command from root to download almost everything that you need. In case this doesn’t work you can add an additional source ‘urpmi.addmedia thacs.rpms http://rpm.nyvalls.se/10.0/RPMS with hdlist.cz’.
Then it’s a matter of following the instructions in the official Install Guide .