Watch TV using a Hauppage WinTV PVR USB2
This article describes how you can watch TV on your computer using your Hauppage WinTV PVR USB2 video tuner.
Driver and Firmware
- connect your TV Tuner via USB to your computer and to the electric power supply
- get the firmware
mkdir -p /lib/firmware/ cd /lib/firmware wget http://dl.ivtvdriver.org/ivtv/firmware/ivtv-firmware.tar.gz tar xvzf ivtv-firmware.tar.gz
- verify you have the driver
modprobe -l | grep pvr /lib/modules/2.6.25.11-0.1-default/kernel/drivers/media/video/pvrusb2/pvrusb2.ko
- load the driver
modprobe pvrusb2
- make sure the driver has loaded
dmesg usbcore: registered new interface driver pvrusb2 drivers/media/video/pvrusb2/pvrusb2-main.c: Hauppauge WinTV-PVR-USB2 MPEG2 Encoder/Tuner : V4L in-tree version drivers/media/video/pvrusb2/pvrusb2-main.c: Debug mask is 31 (0x1f) pvrusb2: Device microcontroller firmware (re)loaded; it should now reset and reconnect. usb 2-4: USB disconnect, address 4 pvrusb2: Device being rendered inoperable usb 2-4: new high speed USB device using ehci_hcd and address 5 usb 2-4: configuration #1 chosen from 1 choice usb 2-4: New USB device found, idVendor=2040, idProduct=2400 usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 2-4: Product: WinTV usb 2-4: Manufacturer: Hauppauge usb 2-4: SerialNumber: 2401-00-0082BA22 usb 2-4: reset high speed USB device using ehci_hcd and address 5 cx25840' 4-0044: cx25843-24 found @ 0x88 (pvrusb2_a) tuner' 4-0043: chip found @ 0x86 (pvrusb2_a) tda9887 4-0043: tda988[5/6/7] found tuner' 4-0061: chip found @ 0xc2 (pvrusb2_a) wm8775' 4-001b: chip found @ 0x36 (pvrusb2_a) tveeprom 4-00a2: Hauppauge model 24019, rev C389, serial# 8567330 tveeprom 4-00a2: tuner model is TCL MFPE05 2 (idx 89, type 38) tveeprom 4-00a2: TV standards PAL(B/G) PAL(I) SECAM(L/L') PAL(D/D1/K) (eeprom 0x74) tveeprom 4-00a2: audio processor is CX25843 (idx 37) tveeprom 4-00a2: decoder processor is CX25843 (idx 30) tveeprom 4-00a2: has radio, has IR receiver, has no IR transmitter pvrusb2: Supported video standard(s) reported available in hardware: PAL-B/B1/D/D1/G/H/I/K;SECAM-B/D/G/H/K/K pvrusb2: Mapping standards mask=0xff00ff (PAL-B/B1/D/D1/G/H/I/K;SECAM-B/D/G/H/K/K1/L/LC) pvrusb2: Setting up 20 unique standard(s) pvrusb2: Set up standard idx=0 name=PAL-B/G pvrusb2: Set up standard idx=1 name=PAL-D/K pvrusb2: Set up standard idx=2 name=SECAM-B/G pvrusb2: Set up standard idx=3 name=SECAM-D/K pvrusb2: Set up standard idx=4 name=PAL-B pvrusb2: Set up standard idx=5 name=PAL-B1 pvrusb2: Set up standard idx=6 name=PAL-G pvrusb2: Set up standard idx=7 name=PAL-H pvrusb2: Set up standard idx=8 name=PAL-I pvrusb2: Set up standard idx=9 name=PAL-D pvrusb2: Set up standard idx=10 name=PAL-D1 pvrusb2: Set up standard idx=11 name=PAL-K pvrusb2: Set up standard idx=12 name=SECAM-B pvrusb2: Set up standard idx=13 name=SECAM-D pvrusb2: Set up standard idx=14 name=SECAM-G pvrusb2: Set up standard idx=15 name=SECAM-H pvrusb2: Set up standard idx=16 name=SECAM-K pvrusb2: Set up standard idx=17 name=SECAM-K1 pvrusb2: Set up standard idx=18 name=SECAM-L pvrusb2: Set up standard idx=19 name=SECAM-LC pvrusb2: Initial video standard auto-selected to PAL-B/G pvrusb2: Device initialization completed successfully.
- make sure an additional video device exists
ls /dev/video* /dev/video /dev/video0
Watch TV
According to http://www.isely.net/pvrusb2/usage.html#V4L, your watching application needs to be capable of decoding an mpeg2 stream.
- watch that you see a video signal
gqcam /dev/video
You will not be able to switch channels, and it is not sure you see more than snow. How to go on, depends on your distribution:
SUSE Linux 11 and 11.1
- make sure you have one (and not more) soundcard and it works.
- make sure the videolan (VLC) repository is contained in your yast installation repositories.
- Install several development packages
yast -i libmpeg2-devel yast -i zvbi-devel yast -i arts-devel yast -i kdelibs3-arts yast -i kdemultimedia3-arts-mad yast -i libmpg123-arts yast -i openmotif-devel yast -i aalib-devel yast -i libdv-devel yast -i libmad-devel
Download xawtv's latest cvs snapshot from http://dl.bytesex.org/cvs-snapshots/?N=A. In this example, we assume it is xawtv-20081014-100645.tar.gz.
- Unpack the snapshot
tar xvzf xawtv-20081014-100645.tar.gz cd xawtv
- Configure the compile
./autogen.sh ./configure
- build it
make
- install it
make install
- prepare the sender list for xawtv by calling
scantv
You are asked some questions. If you do not know what PAL standard your country uses, consult wikipedia.
- start it
/usr/local/bin/xawtv
Record a video
To capture a video with sound, do
echo false >/sys/class/pvrusb2/sn-*/ctl_mute/cur_val && cat /dev/video > myvideo.mpg
In this case, we assume /dev/video is the video device that you created above. This command is possible because mpeg2 data is streamed over /dev/video. It contains sound.
TV-Viewer
TV-Viewer is a complete frontend to watch and record TV. Installation is quite easy and you'll find a good documentation on the homepage. To get a first impression of the program have a look at the screenshots.
More information
- ~/.tv contains config files for xawtv4
- good irc channels for your needs are on freenode: #v4l, #pvrusb2 and #mythtv-users