[Solved] TVheadend on QNAP (Embedded Linux)
Added by virtual dj about 13 years ago
Hi, I already know that my question may be a little 'out of scope', but I think that it can be quite useful to other people too...
So, I tried Tvheadend v2.12 on a Debian VM with an Hauppauge WinTV Nova-T USB2 tuner card, and it works well (I'm using DVB-T).
It works so well that I would like to move it on my QNAP TS-239 Pro II, an Intel Atom x86 NAS running Linux 2.6.33.2.
As this is an embedded version of Linux, I had to compile the kernel modules for my tuner, but I've managed to do it successfully, and now I can tune in the DVB-T channels with tzap and record them using dvbstreamer.
Unfortunately, I compiled Tvheadend from the tarball successfully (with --disable-avahi and --release) but, although the web UI loads correctly and I can see the tuner, when adding the muxes the services names are blank.
That is: I add manually the mux by frequency, the mux goes into the Multiplexes list (with quality 100%), but in the Services list I can see all the channels without any name, so I'm unable to move them on the channel tab and then record them.
This is the logfile:
[/share/Public] # ./tvheadend -C -d
[WARNING]:accesscontrol: Created default wide open access controle entry
[INFO]:dvb: Found adapter /dev/dvb/adapter0 (DiBcom 7000PC) via USB (480 Mbit/s)
[ALERT]:v4l: Unable to open /dev/video0 -- No such device or address
[ALERT]:v4l: Unable to open /dev/video1 -- No such device or address
[ALERT]:v4l: Unable to open /dev/video2 -- No such device or address
[ALERT]:v4l: Unable to open /dev/video3 -- No such device or address
[ALERT]:v4l: Unable to open /dev/video4 -- No such device or address
[INFO]:dvr: Creating new configuration ''
[WARNING]:dvr: Output directory for video recording is not yet configured for DVR configuration "". Defaulting to to "/root". This can be changed from the web user interface.
[INFO]:CSA: Using SSE2 128bit parallel descrambling
[NOTICE]:START: HTS Tvheadend version 2.12 started, running as PID:17033 UID:0 GID:0, settings located in '/root/.hts/tvheadend'
[DEBUG]:dvb: "/dev/dvb/adapter0" tuning to "514,000 kHz" (Initial autoscan)
[DEBUG]:dvb: "514,000 kHz" on adapter "DiBcom 7000PC", status changed to OK
[DEBUG]:dvb: Add service "_dev_dvb_adapter0_DiBcom_7000PC514000000_2185" on "514,000 kHz"
[DEBUG]:dvb: Add service "_dev_dvb_adapter0_DiBcom_7000PC514000000_2186" on "514,000 kHz"
[DEBUG]:dvb: Add service "_dev_dvb_adapter0_DiBcom_7000PC514000000_2187" on "514,000 kHz"
[DEBUG]:dvb: Add service "_dev_dvb_adapter0_DiBcom_7000PC514000000_2188" on "514,000 kHz"
[DEBUG]:dvb: Add service "_dev_dvb_adapter0_DiBcom_7000PC514000000_2189" on "514,000 kHz"
[DEBUG]:PSI: Transport "DiBcom 7000PC/514,000 kHz" PMT (version 14) updated, PCR PID changed, New elementary stream, Language changed, Parent PID changed, PIDs reordered
[DEBUG]:PSI: Transport "DiBcom 7000PC/514,000 kHz" PMT (version 14) updated, PCR PID changed, New elementary stream, Language changed, Parent PID changed, PIDs reordered
[DEBUG]:PSI: Transport "DiBcom 7000PC/514,000 kHz" PMT (version 15) updated, PCR PID changed, New elementary stream, Language changed, Parent PID changed, PIDs reordered
[DEBUG]:PSI: Transport "DiBcom 7000PC/514,000 kHz" PMT (version 14) updated, PCR PID changed, New elementary stream, Language changed, Parent PID changed, PIDs reordered
[DEBUG]:PSI: Transport "DiBcom 7000PC/514,000 kHz" PMT (version 14) updated, PCR PID changed, New elementary stream, Language changed, Parent PID changed, PIDs reordered
[DEBUG]:dvb: "/dev/dvb/adapter0" initial scan completed for "RAI: 514,000 kHz"
Tvheadend can be an interesting feature to be installed on the NAS: it is light, the tuner can easily be connected to the USB ports and the NAS is always on (perfect for scheduling recordings). Ah... and the recordings are saved directly on the NAS where they can be shared to the other devices.
Can someone point me to the right direction? What may be the cause of my problem?
What are the dependencies of running Tvheadend on such system? I even tried to compile linuxtv.org/dvb-apps and running gnutv works OK.
Thanks.
Replies (15)
RE: TVheadend on QNAP (Embedded Linux) - Added by Hein Rigolo about 13 years ago
Is the channel name column empty or the service name column?
if it is the channel name column then you can do the following:
After the initial tuning is finished (even with manually added muxes) you can press the "Map DVB services to channels" in order to create the channels.
RE: TVheadend on QNAP (Embedded Linux) - Added by virtual dj about 13 years ago
The Service name is empty, while Channel name is Unmapped.
The same configuration in a Debian VM (with the same tuner of course) automatically retrieve the Service Name and the Channel name, while on the QNAP it doesn't. I've perl v5.10.0 installed on the QNAP (which seems to be linked to Tvheadend, at least on the Debian apt-get dependencies).
Additionally, both on the Debian VM and the QNAP, I've noticed that if I manually add a mux the Muxes awaiting initial scan counter always remains at "1" and the Map DVB services to channels button is disabled. But there is a workaround: simply click the Add DVB network by location button, select a random city and then on the Multiplexes tab delete all the added muxes. Tvheadend refreshes and updates the muxes and the counter go to 0, allowing to map the channels.
But on the QNAP even if I click the Map DVB services to channels button they're not added because of the blank Service name.
Here there are some screenshots.
http://imageshack.us/photo/my-images/69/tvh1.jpg/
http://imageshack.us/photo/my-images/718/tvh2.jpg/
http://imageshack.us/photo/my-images/94/tvh3.jpg/
RE: TVheadend on QNAP (Embedded Linux) - Added by Hein Rigolo about 13 years ago
Oke,
The service name is taken from the DVB information it self.
If you create a channels.conf file using the dvb-apps tools (see http://www.linuxtv.org/wiki/index.php/Testing_your_DVB_device) are the service names populated in the channels.conf file?
If so, then the information is there, but tvheadend can not pick it up some how.
Hein.
RE: TVheadend on QNAP (Embedded Linux) - Added by virtual dj about 13 years ago
I've tried another time (previously a used a debian-created channels.conf) by compiling dvb-apps tools directly on the QNAP.
I then exported the LD_LIBARY_PATH to usr/lib subfolder of the dvb-apps tools.
Running dvbscan results in an error: "Unable to query frontend status".
However, scan works (on the wiki it is written to try scan if dvbscan doesn't work); this is the output:
[/share/Public/usr/bin] # ./scan ../share/dvb/dvb-t/it-Test > ~/channels.conf scanning ../share/dvb/dvb-t/it-Test using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0' initial transponder 514000000 0 9 9 6 2 4 4 >>>tune to: 514000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_AUTO:FEC_AUTO:QAM_AUTO:TRANSMISSION_MODE_AUTO:GUARD_INTERVAL_AUTO:HIERARCHY_AUTO 0x0000 0x2185: pmt_pid 0x01a5 RAI -- Rai Premium (running) 0x0000 0x2186: pmt_pid 0x01a6 RAI -- Rai yoyo (running) 0x0000 0x2187: pmt_pid 0x01a7 RAI -- Rai 4 (running) 0x0000 0x2188: pmt_pid 0x01a8 RAI -- Rai Gulp (running) 0x0000 0x2189: pmt_pid 0x01a9 RAI -- Rai Movie (running) Network Name 'RAI' dumping lists (5 services) Done. [/share/Public/usr/bin] # cat ~/channels.conf Rai Premium:514000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_AUTO:FEC_AUTO:QAM_AUTO:TRANSMISSION_MODE_AUTO:GUARD_INTERVAL_AUTO:HIERARCHY_AUTO:431:441:8581 Rai yoyo:514000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_AUTO:FEC_AUTO:QAM_AUTO:TRANSMISSION_MODE_AUTO:GUARD_INTERVAL_AUTO:HIERARCHY_AUTO:432:442:8582 Rai 4:514000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_AUTO:FEC_AUTO:QAM_AUTO:TRANSMISSION_MODE_AUTO:GUARD_INTERVAL_AUTO:HIERARCHY_AUTO:433:443:8583 Rai Gulp:514000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_AUTO:FEC_AUTO:QAM_AUTO:TRANSMISSION_MODE_AUTO:GUARD_INTERVAL_AUTO:HIERARCHY_AUTO:434:445:8584 Rai Movie:514000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_AUTO:FEC_AUTO:QAM_AUTO:TRANSMISSION_MODE_AUTO:GUARD_INTERVAL_AUTO:HIERARCHY_AUTO:435:446:8585
RE: TVheadend on QNAP (Embedded Linux) - Added by virtual dj about 13 years ago
If anyone has an idea on how I can debug Tvheadend to solve my problem, please let me know.
If the tuner works, and the channel scan works, that has to be something wrong with Tvheadend. But I don't know where to look, as there is not so much debug info...
Please help!
Regards.
RE: TVheadend on QNAP (Embedded Linux) - Added by Hein Rigolo about 13 years ago
how long did you wait after the initial scan was completed? Sometimes it takes some time before the service name is populated.
Did you manually add the required mux into tvheadend? (so not using the " Add DVB network by location " button.)
From what you have posted it looks correct, and also tvheadend finds the correct services.
RE: TVheadend on QNAP (Embedded Linux) - Added by virtual dj about 13 years ago
how long did you wait after the initial scan was completed?
About ten minutes, it should be enough...
Did you manually add the required mux into tvheadend? (so not using the " Add DVB network by location " button.)
As I've written before, if I add a mux manually, it is added but the Muxes awaiting initial scan counter always remains at 1 so I cannot add the channels anyway.
On the contrary, if I add the mux manually and then Add DVB network by location the muxes (both the manually and the automatically added) are scanned and the Muxes awaiting initial scan counter goes to 0. But unfortunately the services, although detected (see on the third screenshot, they are there), cannot be converter to channels because they lack the name. And that's the problem!
From what you have posted it looks correct, and also tvheadend finds the correct services.
Yes, I know, and that's the reason I'm asking how I can debug Tvheadend to see why it doesn't retrieve the channels name.
Thank you.
RE: TVheadend on QNAP (Embedded Linux) - Added by Hein Rigolo about 13 years ago
Okee, from your posts I can see that you use the default 2.12 release. Could you compile the latest version from GIT?
Just to make sure that some of the bugs that were solved in the latest version is not getting into your way.
Hein
RE: TVheadend on QNAP (Embedded Linux) - Added by virtual dj about 13 years ago
I would like to try to compile tvheadend from GIT, but wasn't able to.
I can't make the sources because of an error. I'm not so skilled on GIT, can you help me?
These are the commands and their output:
[~] # mkdir tvh [~] # cd tvh [~/tvh] # git clone git://github.com/andoma/tvheadend.git Initialized empty Git repository in /root/tvh/tvheadend/.git/ remote: Counting objects: 10599, done. remote: Compressing objects: 100% (2756/2756), done. Receiving objects: 100% (10599/10599), 4.30 MiB | 268 KiB/s, done. Resolving deltas: 100% (8051/8051), done. [~/tvh] # cd tvheadend/ [~/tvh/tvheadend] # ./configure --disable-avahi --release Using C compiler: cc Using libssl: 0.9.8g Release build: 2.12.99 Final binary is: build.Linux/tvheadend [~/tvh/tvheadend] # make at: build.Linux/ver: No such file or directory Version changed CC build.Linux/src/main.o CC build.Linux/src/utils.o CC build.Linux/src/wrappers.o CC build.Linux/src/version.o CC build.Linux/src/access.o CC build.Linux/src/dtable.o CC build.Linux/src/tcp.o CC build.Linux/src/http.o CC build.Linux/src/notify.o CC build.Linux/src/epg.o CC build.Linux/src/xmltv.o CC build.Linux/src/spawn.o CC build.Linux/src/packet.o CC build.Linux/src/streaming.o CC build.Linux/src/teletext.o CC build.Linux/src/channels.o ... removed ... CC build.Linux/src/dvb/diseqc.o CC build.Linux/src/dvb/dvb_adapter.o CC build.Linux/src/dvb/dvb_multiplex.o CC build.Linux/src/dvb/dvb_transport.o CC build.Linux/src/dvb/dvb_preconf.o /root/tvh/tvheadend/src/dvb/dvb_preconf.c: In function ‘dvb_mux_preconf_add’: /root/tvh/tvheadend/src/dvb/dvb_preconf.c:67: error: ‘struct dvb_mux_conf’ has no member named ‘dmc_fe_delsys’ /root/tvh/tvheadend/src/dvb/dvb_preconf.c:67: error: ‘SYS_DVBS’ undeclared (first use in this function) /root/tvh/tvheadend/src/dvb/dvb_preconf.c:67: error: (Each undeclared identifier is reported only once /root/tvh/tvheadend/src/dvb/dvb_preconf.c:67: error: for each function it appears in.) make: *** [build.Linux/src/dvb/dvb_preconf.o] Error 1
How can I fix the error and compile it?
RE: TVheadend on QNAP (Embedded Linux) - Added by Hein Rigolo about 13 years ago
A change was made to the dvb_preconf.c code with the following diff:
If you reverse that .. and then try again ...
Hein
RE: TVheadend on QNAP (Embedded Linux) - Added by virtual dj about 13 years ago
I don't know how to apply a diff with git, however I had a look to the link you provided and I manually removed the line:
dmc.dmc_fe_delsys = SYS_DVBS;from dvb_preconf.c and now tvheadend compiles successfully! Thank you.
However, the issue is still not resolved.
Now I'm running the git-d4562ec version and on the Services tab there is a new column (DVB default charset) that there wasn't before.
But the channel names still are not retrieved. Look at the screenshot here:
http://imageshack.us/photo/my-images/94/tvheadendgit.jpg/
You can see that all the PIDs are correctly identified, but no channel names.
I've made another test: if I input the channels names manually by double clicking the listview cell, then I'm able to add and map the channels.
Obviously this is not so easy to do with more then 30 channels, which have to be identified by PID (using a pen & paper)... :-(
RE: TVheadend on QNAP (Embedded Linux) - Added by Hein Rigolo about 13 years ago
OKee, so somehow the code that retrieves the service names from the DVB tables is not working on your QNAP. But using the dvb-apps utils you can see the service names so they are present in the data.
If I look at older screenshots that also the network name and provider name are not retreived. So somehow that part of the code is not working correctly.
So I can identify where things go wrong, but I can not fix it for you.
Hein
RE: TVheadend on QNAP (Embedded Linux) - Added by virtual dj about 13 years ago
Yeah, can you point me how can I help you to get more debug data to fix the problem?
Something has to be missing if that "name discovery" doesn't work... but what?
RE: TVheadend on QNAP (Embedded Linux) - Added by virtual dj about 13 years ago
Hi, I would just update about this problem.
Thanks to the user cival on QNAP forums, we now know that the issue was related on the gconv utility, that is somewhat "a lite version" on the QNAP.
The missing channels name can be solved by installing the full gconv and adding the required environment variable:
ipkg install gconv-modules export GCONV_PATH=/opt/lib/gconv
RE: [Solved] TVheadend on QNAP (Embedded Linux) - Added by Adam Sutton over 12 years ago
virtualdj,
I've you're still monitoring this thread, could you mail me I need a quick chat about your QNAP package.
Regards
Adam