Sunday, April 18, 2010

Using a Hauppauge PVR 150/250/350/500 TV Tuner card in Ubuntu/Linux

Getting traditional TV to work in linux can be an exercise in frustration at times. For those with a Hauppauge PVR 150/250/350/500, you are in luck. The following tutorial will get you up and going in no time. It Is aimed at ubuntu users, but if you are a bit resourceful, you will be able to get it to work on the distro of your choice.

Do:

sudo apt-get install ivtv-utils vlc

Open VLC player

Media -> Open Capture Device -> PVR (from pull down menu) -> Play.

Then you can do (in terminal)

ivtv-tune -c25 (25 is channel number)

Which changes the channel. (this is for people that have cable coming into their computer directly, and NOT coming from the cable box)

If your signal is coming from a cable or satellite box, do ivtv-tune -c3 and change the channel on the box.

ivtv-tune -h

To see the options which control the card. (not necessary though) 


For a cool desktop tv remote,(so you dont have to use terminal to change channels, or to start tv) go to: CSMonkey TV Remote Highly recommended. (only works on ubuntu)

Remember to have Java installed first. Then you can right click>properties> open with> java. After that, just click normally to launch.

I might add, if your distribution does not have the ivtv firmware in the kernel, (all newer kernels do) just get the firmware here and extract the file and put it in /lib/firmware. Then do: (as root)

rmmod ivtv

then

modprobe ivtv

To record tv while you're watching, in VLC, go to Views and check off advanced contols. You will then see a record button in vlc's interface. All recordings will be saved to your home folder.

To schedule a tv for future viewing, we are going to use cron for the job.

We need to make sure you are a member of the crontab group first. Go to System>Administration>Users and Groups and unlock the window by clicking the keys button, or the "unlock" button. Enter password. Then click on Manage Groups button. Scroll down until you see the crontab entry. Highlight it, and then click on Properties. Check your name if it is not already. Log out and then back in.

First, select which channel you want to record by: (we will use channel 25 as an example)

ivtv-tune -c25

Then, in the same terminal window, do:

crontab -e

Delete everything you see in there.

Then as an example of a recording you want done on Dec. 31 4:00 PM to 5:30 PM, you would enter in crontab: (see below for an explanation of how cron works)


# start recording
00 16 31 12 05 cat /dev/video0 > /home/user_name/name_of_show.mpg
# stop recording
30 17 31 12 05 killall cat

To save the job, do Ctrl-X then Y then Enter.

Remember to put your user name in after /home. You can also save the file wherever you want, I just used /home as an example. You can name the show whatever you want, just make sure you have .mpg after the name.

For those not familiar with cron, in the line 00 16 31 12 05 cat /dev/video0 > /home/user_name/name_of_show.mpg

00 represents the minutes of the hour (4:00), 16 is the hour (4:00 a 24 hour clock is used, 12 midnight would be 00, 1 AM would be 01, etc.), 31 is the date, 12 is the month, 05 is the day of the week -Thurs. in this case. (Sunday is 00, Monday is 01, etc)

You may also find the following link useful. Thanks to MeKino for this. http://ubuntuforums.org/showthread.php?t=758845

Hopefully I have helped some people get their all important TV fix.

34 comments:

  1. Ok, I'm being lazy. Since all of the US is now on digital broadcast, does this support digital TV?

    ReplyDelete
  2. Yes it does, but you will need a cable box hooked up to get all the channels you get on your TV. I only have a direct feed to my computer from the cable splitter, so it limits the number of channels I get. But it's still enough for me to enjoy TV on my computer.

    ReplyDelete
  3. Well, that seems to suggest it is capturing analog, not over-the-air digital.

    ReplyDelete
  4. You didn't mention anything about OTA TV. But since my older than dirt TV can do digital TV via the cable box, the tuner card will have no problems either, provided a cable box is doing the inputting. As far as OTA digital, it will, provided you have one of those converter boxes.

    ReplyDelete
  5. Hah! I guess we have a different definition of "digital broadcast" and "digital TV" versus "digital cable".

    ReplyDelete
  6. Hello: Thanks for this tutorial.

    I am having a bit of a challenge with it. I have installed a PVR-150 in my Ubuntu 9.10 machine. I already had VLC installed, so I installed ivtv-utils then rebooted.

    I can start VLC and select the PVR and hit play. This doesn't bring anything up. I try changing the channels in the terminal as suggested, but get this error:

    andrew@AustinPowers:~$ ivtv-tune -c6
    ioctl VIDIOC_S_FREQUENCY failed

    I tried changing the video device to /dev/video1 as suggested in another resource. This shows a second of television, then VLC shuts down.

    Any help appreciated.

    Thanks.

    Andrew.

    ReplyDelete
  7. I am running a multiboot system Win 7 64 and Ubuntu 10.04 64 and Mint 9 (I believe 64 bit as well) I have the Hauppauge PVR 150 card and I am a novice at Linux. While all this might seem simple for most users when I do as you say (Installing in Mint which is Ubuntu based I keep getting these errors when trying to "ivtv-tune -c25" command and after unpacking everything seems smooth till I get the following (Sorry for the large pasted info) Can anyone help me?
    Unpacking ivtv-utils (from .../ivtv-utils_1.4.0-1_amd64.deb) ...
    Selecting previously deselected package libauthen-sasl-perl.
    Unpacking libauthen-sasl-perl (from .../libauthen-sasl-perl_2.13-1_all.deb) ...
    Processing triggers for man-db ...
    debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
    dpkg: error processing man-db (--unpack):
    subprocess installed post-installation script returned error exit status 1
    Processing triggers for doc-base ...
    Processing 5 added doc-base file(s)...
    Registering documents with scrollkeeper...
    Processing triggers for install-info ...
    Errors were encountered while processing:
    /var/cache/apt/archives/postfix_2.7.0-1_amd64.deb
    man-db
    E: Sub-process /usr/bin/dpkg returned an error code (1)

    ReplyDelete
  8. Hi,
    I followed each and every step what you have described but i am giving input through composite vidoe.Please guide me how to configure with composite input.

    Thanks

    Thawfeec

    ReplyDelete
  9. To change the input connection use this command in a terminal.......

    v4l2-ctl -d /dev/video0 -i 2

    or see my how to post here........

    http://forums.linuxmint.com/viewtopic.php?f=48&t=55754

    Regards, Pete

    ReplyDelete
  10. Great information here.... Thanks very much for sharing it, Keep posting....

    kamagra

    ReplyDelete
  11. this stuff didn't work in ubuntu, can you recommend me a forum to fix this problem in my CPU ?

    ReplyDelete
  12. Hello, i think that this is a great post because has useful information.

    ReplyDelete
  13. Great information posted here.. Thanks for sharing this blog.

    ReplyDelete
  14. hello, i think that your post is very good.

    ReplyDelete
  15. I like the pic on the upper part of the page. The peeing guy. LOL

    ReplyDelete
  16. This is another fantastic blog post what I have read

    ReplyDelete
  17. I'm glad to have found this post as its such an interesting one

    ReplyDelete
  18. Wow.. that was really neat way of putting it

    ReplyDelete
  19. I could tell that we’re on the same interest and obsession.

    ReplyDelete
  20. Nice! It will surely help my website. I will read and post comments to those blog now. Thanks!

    ReplyDelete
  21. Hello, I am very happy to read your blog. This is another fantastic blog post what I have read. There are so many tools available that it becomes difficult to know which will work. And how best to use them.

    ReplyDelete
  22. Hi, this is the information that I was looking for, I just start used this OS, is a little bit difficult to use it, specially for the many command that you have to use.

    ReplyDelete
  23. I would like read more information about this, is very interesting! Thanks for the information. A worth bookmarking blog. I would be reading your articles regularly from now on.

    ReplyDelete
  24. great post in your blog. this is so nice! Keep posting such an amazing blog post. Thanks and keep posing....

    ReplyDelete
  25. Thank you..I finally got this card working after YEARS of frustration.

    ReplyDelete
  26. This is one of the highly informatics and attractive blogs that has not only educated also informed me in a very effective manner. There are very few blog like this one I have read.

    ReplyDelete
  27. Tried this in linux mint 14 MATE 64bit edition with vlc 2.0.5 and a hauppauge pvr 150 and works perfectly. Actually only did the the first part about getting a TV window showing everything. Didn't try the remote control portion or the recording portion. But the TV viewing in VLC works great! Thanks very much!

    ReplyDelete
  28. Great article, worked like a charm for me with my pvr-150. I just skimmed through the directions, and need to read a little closer, but I missed seeing how (or if I could) to change the recording quality.

    Thanks a lot

    ReplyDelete
  29. Thanks for sharing this informative post with us.

    Book TV Tuning

    ReplyDelete
  30. This is great! Thank You so much for sharing this valuable list. It will help me out greatly.
    zoid research
    zoid research reviews

    ReplyDelete