
The hardware is an Elgato EyeTV hybrid. Mine is a few years old and doesn't look like the one pictured, so the hardware may be different (although I kind of doubt it). It must be plugged into a powered USB hub. The hardware seems to really not like being hot plugged (in fact I'm pretty sure that unplugging or replugging it restarts the PI). I always make sure it's plugged in (to the powered hub) before boot. I'm using raspbian from 18 Sep 2012 (with some updates). This is a 512MB pi (although I doubt it matters).
lsusb identified it immediately:
I googled the device Id's (0fd9:0008) and discovered that the device is actually a Hauppauge HVR950Q based around the Auvitek AU8522 QAM/8VSB Frontend chip. The hardware pages on linux tv are somewhat helpful but googling the device ids was more helpful.lsusb
Bus 001 Device 006: ID 0fd9:0008 Elgato Systems GmbH
I compiled a kernel, enabling the au8522 module. This is involved and tedious, but described well elsewhere so I won't repeat. I bought an MPEG2 license; this was super easy and cheap!
I installed some stuff:
I grabbed a bunch of firmware files:sudo apt-get install w_scan dvb-apps
(thanks to Quonith on stmlabs forum, below, for this.)cd /lib/firmware/
sudo wget goo.gl/xZSPH -O dvb_firmware.tar.gz
sudo tar xzf dvb_firmware.tar.gz
I may have had some other stuff installed previously (I have compiled xbmc locally before).
I added myself to the video group:
substitute your username (ie pi).sudo gpasswd -a cmason video
I rebooted. I watched the output in dmesg:
I then ran w_scan in order to scan for stations (called "muxes" because each frequency has potentially multi multiplexed av streams).usb 1-1.3.3: new high-speed USB device number 6 using dwc_otg
usb 1-1.3.3: New USB device found, idVendor=0fd9, idProduct=0008
usb 1-1.3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=10
usb 1-1.3.3: Product: EyeTV Hybrid
usb 1-1.3.3: Manufacturer: Elgato
usb 1-1.3.3: SerialNumber: 4031657106
Linux video capture interface: v2.00
au0828 driver loaded
au0828: i2c bus registered
tveeprom 0-0050: Hauppauge model 72231, rev B3F0, serial# 5125266
tveeprom 0-0050: MAC address is 00:0d:fe:4e:34:92
tveeprom 0-0050: tuner model is Xceive XC5000 (idx 150, type 76)
tveeprom 0-0050: TV standards NTSC(M) ATSC/DVB Digital (eeprom 0x88)
tveeprom 0-0050: audio processor is AU8522 (idx 44)
tveeprom 0-0050: decoder processor is AU8522 (idx 42)
tveeprom 0-0050: has no radio, has IR receiver, has no IR transmitter
hauppauge_eeprom: hauppauge eeprom: model=72231
au8522 0-0047: creating new instance
au8522_decoder creating new instance...
i2c-core: driver [tuner] using legacy suspend method
i2c-core: driver [tuner] using legacy resume method
tuner 0-0061: Tuner -1 found with type(s) Radio TV.
xc5000 0-0061: creating new instance
xc5000: Successfully identified at address 0x61
xc5000: Firmware has not been loaded previously
au8522 0-0047: attaching existing instance
xc5000 0-0061: attaching existing instance
xc5000: Successfully identified at address 0x61
xc5000: Firmware has not been loaded previously
DVB: registering new adapter (au0828)
DVB: registering adapter 0 frontend 0 (Auvitek AU8522 QAM/8VSB Frontend)...
Registered device AU0828 [Hauppauge HVR950Q]
...
This specific w_scan incantation is pretty important as the defaults are for European DVB setups and result in incorrect channel info. This takes a little while, but eventually produces a channels file that looks like:w_scan -A1 -X -c US -fa -t3 > ~/.azap/channels.conf
tune to: 8VSB f=195000 kHz
service is running. Channel number: 10:1. Name: 'OPB'
service is running. Channel number: 10:2. Name: 'OPBPlus'
service is running. Channel number: 10:3. Name: 'OPB-FM'
... many services listed ...
Next, I tune one of these channels using azap:OPB:195000000:8VSB:49:52:3
OPBPlus:195000000:8VSB:65:68:4
OPB-FM:195000000:8VSB:81:84:5
... more channels ...
Azap needs to continue to run while you view/capture, but it produces a bunch of output, so, after I verify it's working (HAS_LOCK), I usually run it like:azap -r OPB
using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
tuning to 195000000 Hz
video pid 0x0031, audio pid 0x0034
status 00 | signal 0073 | snr 0087 | ber 000000ff | unc 000000ff |
status 1f | signal 00fa | snr 00fa | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal 00fa | snr 00fa | ber 00000000 | unc 00000000 | FE_HAS_LOCK
The -r option is important, it sets up the dvr device. Then we play using omxplayer (I can't recall how I got this installed but I'm sure there's other posts about this):azap -r OPB >& /dev/null &
-o hdmi was necessary to get hdmi audio (I guess the default is the headphone jack).omxplayer -o hdmi /dev/dvb/adapter0/dvr0
This results in flawless, stutter free video and audio on the hdmi connector! Yipee! The load is amazingly low (like 30%).
A couple points that were confusing to me:
The resulting data from the device is an MPEG "transport stream." This is pretty amazing because you can basically start reading it from any point and you'll quickly end up with valid video. You can cat (or dd, as cat sometimes reports errors) this to a file and then read it later. The sdcard I have seems plenty fast enough to support something like a pause live tv buffer although I haven't found software yet to do this.
There's different sets of related utilities for atsc versus dvb-t versus other stuff. It's important to use the right set, and the corresponding channels.conf file has a different format above. Be sure you use the right w_scan options for your part of the world.
These pages were super helpful:
http://forum.stmlabs.com/showthread.php?tid=2648
http://www.linuxtv.org/wiki/index.php/T ... DVB_device
http://linuxtv.org/wiki/index.php/W_scan
http://www.linuxtv.org/wiki/index.php/Zap
Things that didn't work:
- dvbstreamer (never sends anything)
mplayer (segfaults)
vlc on my mac (neither streaming nor reading the ts file directly)
tvheadend
Nits:
- omxplayer is pretty finicky about hiccups in the stream and seems to get stuck in unkillable D (disk) wait easily. I end up rebooting a bunch. But once it's playing and has good signal it seems pretty solid.
My (admittedly ancient) Panasonic Plasma isn't recognized very well and none of the modes are 16:9. (I'll make a separate post about this with the edid data.) This results in letterboxed video, which is not too terrible except that:
I can't figure out a good way to hide the console and because the video is letterboxed it shows the blinking cursor and part of the pi logo. This is super annoying. I tried a number of things suggested on the forums (including setterm -blank force) but none of them worked I think perhaps because I'm ssh'd in.
- Investigate cheaper hardware. I've seem some listed for $40, although it's not clear it'll be compatible.
Get tvheadend working or find something else.
I'd really like to figure out transcoding so I can stream to normal web browsers without having special plugins installed.