TVH with Analog PCI tuner on Debian
Added by Alex A over 10 years ago
Hello,
I'm using an "Avermedia AVerTV GO 007 FM" Analog PCI card (no dvb!) connected to Coax, on Debian 7.6 netinst (without X server) and I'm trying to configure it with TVH to be able to stream it.
saa7133[0]: found at 0000:00:0b.0, rev: 208, irq: 19, latency: 64, mmio: 0xfebfe800 saa7133[0]: subsystem: 1461:f31f, board: Avermedia AVerTV GO 007 FM [card=57,autodetected] saa7133[0]: board init: gpio is 80788 Registered IR keymap rc-avermedia input: saa7134 IR (Avermedia AVerTV GO as /devices/pci0000:00/0000:00:0b.0/rc/rc0/input6 rc0: saa7134 IR (Avermedia AVerTV GO as /devices/pci0000:00/0000:00:0b.0/rc/rc0 [...] tuner 4-004b: Tuner -1 found with type(s) Radio TV. tda829x 4-004b: setting tuner address to 61 tda829x 4-004b: type set to tda8290+75 saa7133[0]: registered device video0 [v4l2] saa7133[0]: registered device vbi0 saa7133[0]: registered device radio0 saa7134 ALSA driver for DMA sound loaded saa7133[0]/alsa: saa7133[0] at 0xfebfe800 irq 19 registered as card -1
ls -lh /dev/video* crw-rw-rwT 1 root video 81, 0 Jul 20 11:59 /dev/video0
Problem is I've never dealt with this situation before, so I'm using a multitude of software (found while googling) in order to at least capture some input from /dev/video0.
Here are my attempts:
v4l2-ctl -I ioctl: VIDIOC_ENUMINPUT Input : 0 Name : Television Tuner : 0x00000000 [...] Standard : 0x0000000000FFBFFF (PAL-B/B1/G/H/I/D/D1/K/M/N/Nc/60 NTSC-M/M-JP/M-KR SECAM-B/D/G/H/K/K1/L/Lc) Status : 0x00010100 (no hsync lock., no sync lock) Capabilities: 0x00000004 (SD presets) Input : 1 Name : Composite1 Tuner : 0x00000000 [...] Standard : 0x0000000000FFBFFF (PAL-B/B1/G/H/I/D/D1/K/M/N/Nc/60 NTSC-M/M-JP/M-KR SECAM-B/D/G/H/K/K1/L/Lc) Status : 0x00000000 (ok) Capabilities: 0x00000004 (SD presets) Input : 2 Name : S-Video Tuner : 0x00000000 [...] Standard : 0x0000000000FFBFFF (PAL-B/B1/G/H/I/D/D1/K/M/N/Nc/60 NTSC-M/M-JP/M-KR SECAM-B/D/G/H/K/K1/L/Lc) Status : 0x00000000 (ok) Capabilities: 0x00000004 (SD presets)
v4l2-ctl -I Video input : 0 (Television: no hsync lock., no sync lock)
tvtime-scanner cat /root/.tvtime/stationlist.xml <list norm="PAL" frequencies="Custom" audio="bg"> <station name="112.25MHz" active="1" position="1" band="Custom" channel="112.25MHz" finetune="0"/> <station name="119.25MHz" active="1" position="2" band="Custom" channel="119.25MHz" finetune="0"/> <station name="126.25MHz" active="1" position="3" band="Custom" channel="126.25MHz" finetune="0"/> [...] ivtv-tune --list-freqtable ivtv-tune --freqtable=europe-east -l [...] SE2 112.250 SE3 119.250 SE4 126.250 [...] ivtv-tune -d /dev/video0 -t europe-east -c63 #random channel selection /dev/video0: 807.250 MHz (Signal Detected) cat /dev/video0 > test.mpg #VLC or MPC unable to open it
Installed TVH from deb, but got:
tvheadend[7316]: v4l: /dev/video0: Device lacks MPEG encoder, device skipped
So I've compiled the 3.6 branch from git with the following change to src/v4l.c: int can_mpeg = 1;
(instead of = 0).
./configure --enable-v4l --disable-linuxdvb --disable-dvbscan
After some testing and more googling, I've also changed these in src/v4l.c:
vf.frequency = (frequency * 16) / 1000;
(instead of / 1000000;)unsigned int frequency = t->s_v4l_frequency;
(instead of int frequency = t->s_v4l_frequency;)and recompiled.
tvheadend -C -c .hts/
Pasted to pastebin because it's too long: http://pastebin.com/THbgz3iB
I've also configured the EPG grabber (selected just 5 channels for the sake of speed):
/usr/bin/tv_grab_huro --configure using config filename /root/.xmltv/tv_grab_huro.conf Grab listings for which country? 0: Czech 1: Hungary 2: Romania 3: Slovakia Select one: [0,1,2,3 (default=1)] 2 getting list of channels: ################################################## add channel TVR 1? [yes,no,all,none (default=yes)] yes add channel TVR 2? [yes,no,all,none (default=yes)] add channel HBO? [yes,no,all,none (default=yes)] add channel Acas▒ TV? [yes,no,all,none (default=yes)] add channel Prima TV? [yes,no,all,none (default=yes)]
Alright, I can see my tuner in DVB Inputs / TV Adapters:
Hardware Device path: /dev/video0 Device name: Avermedia AVerTV GO 007 FM saa7134 PCI:0000:00:0b.0 Status Currently tuned to: - inactive -
Configuration / DVB Inputs / TV Adapters / Services is empty
Configuration / "Channel/EPG" / Channels is empty
I've tried manually adding some Services in 'Configuration / DVB Inputs / TV Adapters / Services' (before and after the Frequency hack in v4l.c) and then to 'Configuration / "Channel/EPG" / Channels'. I've used frequencies the scanner found but for names I just used "test" - don't know if it matters. After hitting Play I get this in the log:
v4l: /dev/video0: Tuned to 735000000Hz tvheadend[2544]: subscription: "HTTP" subscribing on "test2", weight: 100, adapter: "Avermedia AVerTV GO 007 FM saa7134 PCI:0000:00:0b.0", network: "<N/A>", mux: "735000000 Hz", provider: "<N/A>", service: "<N/A>", quality: 100 tvheadend[2544]: webui: Couldn't start streaming /stream/channelid/5, No input detected tvheadend[2544]: subscription: "HTTP" unsubscribing from "test2"
or
tvheadend[28512]: v4l: /dev/video0: Tuned to 783000Hz tvheadend[28512]: subscription: "HTTP" subscribing on "test", weight: 100, adapter: "Avermedia AVerTV GO 007 FM saa7134 PCI:0000:00:0b.0", network: "<N/A>", mux: "783000 Hz", provider: "<N/A>", service: "<N/A>", quality: 100 tvheadend[28512]: webui: Couldn't start streaming /stream/channelid/1?ticket=B0748D11013C1C06AFB79B792C1591790288E8E8, No input detected tvheadend[28512]: subscription: "HTTP" unsubscribing from "test"
or
v4l: /dev/video0: Tuned to 783Hz debian tvheadend[2544]: subscription: "HTTP" subscribing on "test", weight: 100, adapter: "Avermedia AVerTV GO 007 FM saa7134 PCI:0000:00:0b.0", network: "<N/A>", mux: "783 Hz", provider: "<N/A>", service: "<N/A>", quality: 100 tvheadend[2544]: webui: Couldn't start streaming /stream/channelid/6, No input detected tvheadend[2544]: subscription: "HTTP" unsubscribing from "test"
I don't know what I should do next. Any help is greatly appreciated, especially after 2 days of googling X_X
Replies (2)
RE: TVH with Analog PCI tuner on Debian
-
Added by Jos E over 10 years ago
As far as I know, Analog TV is not supported by TvHeadend, only digital broadcasts are... So it would require some re-wrapping the analog signal to a DVB-standard. Not impossible, someone probably did it already, but is it worth so many hacking ?
I mean, MythTV does support Analog broadcasts; perhaps it is worth investigating that option at http://www.mythtv.org/
RE: TVH with Analog PCI tuner on Debian
-
Added by Alex A over 10 years ago
Hi Jos,
I have, too, read that TVH generally doesn't support analog tv, but I've also read a few people's threads which indicated they managed doing that. Obviously none describe how they've done it (hence me posting here :( ).
It's also confusing and contradictory to TVH's own description on the main page, which states "Tvheadend is a TV streaming server for Linux supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, IPTV, and Analog video (V4L) as input sources". I mean you either support it or don't :D
In re to MythTV, I'm not sure I want to use that. The point was to use (after this initial test) two Raspberry Pis, one for the backend and another one running OpenElec with TVH add-on, and stream on the TV set. I also liked that there is a TVH client for Android. A lot more flexibility if TVH would actually work...