Stuff > Mythtv - PVR-150 - Ubuntu - New Zealand HOWTO
Jonathon Sim's Website |
|
|
Mythtv - PVR-150 - Ubuntu - New Zealand HOWTO
Setting up a mythtv-based PVR is not for the faint of heart, but once you are done it is a pretty cool device, gaining you much street-cred/fame/fortune etc. After getting used to mythtv the "legacy" TV experience seems soo 20th century (what, I cant fastforward through the ads?)
I'm afraid this howto wont be too much help, I am mainly trying to document tricky bits that I dont think I will remember :-( Linkshttp://pvr.geek.nz/w/index.php/Main_Pagehttp://zaf.geek.nz/projects/mythtv/mythtv-howto-contents.php HardwareMy PVR is
NoteYou can of course find tv cards cheaper than the PVR 150, but I dont recomend it. The PVR-150 does hardware MPEG encoding, which means even an old throw-away machine like this one can record skip-free high quality TV (using just a few % of CPU). Otherwise you need a fast modern machine, and you need to jump through a few more hurdles.Install ubuntuJust do the default install. Its probably a good idea to do manual partitioning and create an LVM to put your recordings on. XFS works well as a filesystem Mythtv does a lot of deleting of large files, something ext3/reiserfs do poorly with - XFS and JFS do well, and I am used to XFS on my servers.Install some prerequesitessudo apt-get install build-essential gcc-3.4 linux-headers-686 scantv mplayer-686 mysql-server
Install ivtvDownload the latest driver from:http://ivtvdriver.orgThere is a howto in the docs for installing on ubuntu. Ignore all the stuff that tells you to compile your own kernel - the linux-headers package is sufficient. Just untar the ivtv source and do make make install will tell you what you need to do to install the driver, follow those instructions, then follow the instructions in the docs for installing the firmwareOnce installed I find I need to run: sudo ivctl -d /dev/video0 -p 6 -f width=720,height=576 -u 1 (put this in an init script somewhere)Testing itYou can test your tv card works like so. mplayer /dev/video0 Should output some static at this stage since we havent tuned itNow tune a channel sudo scantv -c /dev/video0 -C /dev/vbi0 #(set tv norm to PAL, frequency table to newzealand - this will then find some channels) You should see some live tv!Setup Mythtv sudo apt-get install mysql-server mythtv Set a password for mythtv so you can login: sudo passwd mythtv edit /etc/group and add mythtv to the admin group so you can sudo: admin:x:106:garry,mythtv Login as mythtv Then follow this guide to setting up myth for NZ(this guy has a pvr-500 - basically two 150s on one card, so he sets up two tuners)http://zaf.geek.nz/projects/mythtv/mythtv-howto-contents.php Deal with the fact that ubuntu's mythtv packages are evilI found big problems getting myth-backend to connect to the database, (look in /var/log/mythtv if you have trouble getting the backend to start). Seemed to be something wrong with the standard init script, so I edited the init script and commented out all the start-stop-daemon stuff and replaced it withsu - $USER -c "$DAEMON $ARGAutologinSetup your .xsession, and setup the system to autologin (and bypass all the gnome business):http://www.cs.rit.edu/~css8044/?q=autologin#The remoteApparently this works fine with ubuntu's lircd without any major probs http://www.parker1.co.uk/mythtv_ubuntu2.phpI actually compiled my own version of lirc with a patch to support the ir-out of the pvr-150 - and had to tweak some of the button names in lircrc (YMMV - run "irw" to see what lirc calls each button ), but now the remote works very nicely. Other stuffYou probably want to setup mythvideo/mythmusic/mythnews etc, samba so you can copy movies to/from the thing, ssh for remote admin, a dynamic-dns client and mythweb so you can schedule recordings from on the road. I installed a web-based bittorrent client (torrentflux) (you could also setup torrentocracy to integrate bittorrent right into mythtv)TV OutNvidia TV out works well with the binary nvidia drivers (there are howtos all over the place), with some catches:
Video Playback (mythvideo)The machine I used for this PVR is rather old, so I needed to tweak some things to get video playback working well without too much skipping or loss of audio sync, specifically setting the video playback command tomplayer -fs -ao oss -vo xv -framedrop %s(using native ALSA with the driver for the 82801BA/BAM audio controller in this beast didn't work so well, but oss emulation works better - and -framedrop lets it drop frames to maintain audio sync when 733 Mhz just isnt fast enough)
|