Kodi Community Forum
Linux HOW-TO watch Live TV in XBMC for Linux with Tvheadend, the easy way! - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Tips, tricks, and step by step guides (https://forum.kodi.tv/forumdisplay.php?fid=110)
+--- Thread: Linux HOW-TO watch Live TV in XBMC for Linux with Tvheadend, the easy way! (/showthread.php?tid=91716)



- jacksback - 2011-12-06

Is the NIT section only for certain providers? I've left mine as 0 and still get all my channels. The only thing I had to do was enable idle scanning and add 1 mux manually, the rest were then auto added almost instantly


- Begall - 2011-12-08

I've searched the thread a bit but I can't find the answer to this - What would be the recommended version of Ubuntu to use with this? Is it functional on 11.10 or would I have to go to an earlier release?


- Mettbrot - 2011-12-08

The script workes fine on the following systems:
Code:
SUPPORTED_VERSIONS=(karmic lucid maverick natty oneiric)
So with 11.10 you're good to go ;-)


- Begall - 2011-12-08

Thank you very much Smile


- Mettbrot - 2011-12-08

For a single HTPC system you could also try openELEC. It is easy to install and build directly for HTPCs. See the website to find out which build is suitable for you (most likely the generic one, if you dont own ION) and download the latest PVR build from here:
http://gujs.openelec.tv/build/PVR-PPA-opdenkamp/pvr-ppa-odk56/

Or if you prefer Ubuntu i recommend the minimal images from here since this does not install unneeded crap Tongue


- phin586 - 2011-12-08

Can't seem to get any EPG information using the first page instructions. Everything else seems to be on the up and up though. Any help?


- Begall - 2011-12-08

Hmm ok, so I've managed to get this all installed. However, when attempting to connect XBMC to TVheadend it denies access. XBMC then crashes when I disable live TV in order to stop the error messages.

I've added a user account for xbmc in the web interface for tvheadend and added the details to xbmc's plugin. This has made no difference at all. Thoughts?


- Gnaddel - 2011-12-09

I'm currently setting up Tvheadend and the initial mux scanning seems to be stuck at 5 remaining. The debug log still indicates that there is some activity but it has been four hours and I think this is getting kind of excessive Wink

This is what the current output of the log looks like:
Code:
Dec 09 16:33:46 dvb: "/dev/dvb/adapter0" tuning via s2api to "12,168,000 kHz Vertical (Default (Port 0, Universal LNB))" (1568000, 27500000 Baud, 3/4, SYS_UNDEFINED, QPSK)
Dec 09 16:34:07 dvb: "/dev/dvb/adapter0" tuning via s2api to "11,836,000 kHz Horizontal (Default (Port 0, Universal LNB))" (1236000, 29900000 Baud, 3/4, SYS_UNDEFINED, QPSK)
Dec 09 16:34:26 dvb: "/dev/dvb/adapter0" tuning via s2api to "11,914,000 kHz Horizontal (Default (Port 0, Universal LNB))" (1314000, 27500000 Baud, 3/4, SYS_UNDEFINED, QPSK)



- mystefix - 2011-12-09

Hi,

since around 1 month i have updated to the last version of the xbmc-pvr and tvheadend from pulse eight. I took a look in my xbmc.log and found the following error messages.

Code:
Query: INSERT INTO epgtags (idEpg, iStartTime, iEndTime, sTitle,
sPlotOutline, sPlot, iGenreType, iGenreSubType, sGenre, iFirstAired,
iParentalRating, iStarRating, bNotify, iSeriesId, iEpisodeId, iEpisodePart,
sEpisodeName, iBroadcastUid) VALUES (15, 1323471600, 1323471600,
'Kesslers Expedition', '', 'Mit dem Floà auf der Havel (4/5)', 240, 240, '', 0, 0,
0, 0, 0, 0, 0, '', 21929);
21:44:13 T:139893653104384   ERROR: CommitInsertQueries - failed to execute queries
21:44:13 T:139893653104384   ERROR: EPG - Update - failed to update table 'LibertyTV FR'
21:44:13 T:139893653104384   ERROR: SQL: Abort due to constraint violation

This error occured also to other channels.

Could it be that the new tvheadend and xbmc version (the old version was from https://launchpad.net/~lars-opdenkamp/+archive/xbmc-pvr ) use a newer sql syntax which is incompatible with the exsting epg database ? If yes, how can i solve that ? just deleted the epg database file and restart xbmc ?

my versions:
xbmc 2:11.0-pvr+p8~git20111111.28637ff-0ubuntu1~stable55~natty
tvheadend 2.12.99~pulse-natty-2


- jacksback - 2011-12-10

Begall Wrote:Hmm ok, so I've managed to get this all installed. However, when attempting to connect XBMC to TVheadend it denies access. XBMC then crashes when I disable live TV in order to stop the error messages.

I've added a user account for xbmc in the web interface for tvheadend and added the details to xbmc's plugin. This has made no difference at all. Thoughts?

Did you tick the "streaming" box when adding xbmc as a user?


latest pulse tvheadend keeps crashing - phofman - 2011-12-11

Hi,

I just upgraded to the latest tvheadend in pulse repository (ubuntu lucid, 2.12.99~pulse-3). Unfortunately this version always runs for just a few minutes and crashes:

Code:
Dec 11 00:25:01 htpc tvheadend[931]: htsp: Got connection from 127.0.0.1
Dec 11 00:25:01 htpc tvheadend[931]: htsp: 127.0.0.1: Welcomed client software: XBMC Media Center
Dec 11 00:25:09 htpc tvheadend[931]: CRASH: Signal: 11 in PRG: /usr/bin/tvheadend (2.12.99~pulse-3) [edaad3ca7463fb92c00286ee878fd19b6f95da14] CWD: /  
Dec 11 00:25:09 htpc tvheadend[931]: CRASH: Fault address (nil) (Address not mapped)
Dec 11 00:25:09 htpc tvheadend[931]: CRASH: Loaded libraries: /lib/tls/i686/cmov/librt.so.1 /lib/tls/i686/cmov/libdl.so.2 /usr/lib/libavahi-common.so.3 /usr/lib/libavahi-client.so.3 /lib/i686/cmov/libssl.so.0.9.8 /lib/tls/i686/cmov/libpthread.so.0 /lib/tls/i686/cmov/libm.so.6 /lib/tls/i686/cmov/libc.so.6 /lib/i686/cmov/libcrypto.so.0.9.8 /lib/ld-linux.so.2 /lib/libdbus-1.so.3 /lib/libz.so.1 /lib/tls/i686/cmov/libnss_compat.so.2 /lib/tls/i686/cmov/libnsl.so.1 /lib/tls/i686/cmov/libnss_nis.so.2 /lib/tls/i686/cmov/libnss_files.so.2  
Dec 11 00:25:09 htpc tvheadend[931]: CRASH: Register dump [19]: 00000033 c0590000 ffff007b 0000007b 0809d435 00000000 abdf67d8 abdf67bc 003c4ff4 00000000 00000000 00000000 0000000e 00000004 002e2821 00000073 00210246 abdf67bc 0000007b
Dec 11 00:25:09 htpc tvheadend[931]: CRASH: STACKTRACE
Dec 11 00:25:09 htpc tvheadend[931]: CRASH: ??:0 0x80687ca
Dec 11 00:25:09 htpc tvheadend[931]: CRASH: __kernel_rt_sigreturn+0x0  ()
Dec 11 00:25:09 htpc tvheadend[931]: CRASH: ??:0 0x8064b46
Dec 11 00:25:09 htpc tvheadend[931]: CRASH: ??:0 0x807e7c2
Dec 11 00:25:09 htpc tvheadend[931]: CRASH: ??:0 0x804f2f9
Dec 11 00:25:09 htpc tvheadend[931]: CRASH: ??:0 0x804f6f1
Dec 11 00:25:09 htpc tvheadend[931]: CRASH: ??:0 0x804f959
Dec 11 00:25:09 htpc tvheadend[931]: CRASH: ??:0 0x804fa54
Dec 11 00:25:09 htpc tvheadend[931]: CRASH: ??:0 0x804df33
Dec 11 00:25:09 htpc tvheadend[931]: CRASH: ??:0 0xb9696e
Dec 11 00:25:09 htpc tvheadend[931]: CRASH: clone+0x5e  (/lib/tls/i686/cmov/libc.so.6)

All ubuntu lucid libraries are upgraded. Thanks a lot in advance for information about further investigation steps I should do to file a proper bug report.

Pavel.


- Moonbase - 2011-12-11

Same here, after updating tvheadend to »HTS Tvheadend version 2.12.99~pulse-3« on a »ztreambox« (Ubuntu 11.04 on an AMD E-350 system):

Code:
Dec 10 23:03:22 ztreambox tvheadend[2950]: CRASH: Signal: 11 in PRG: /usr/bin/tvheadend (2.12.99~pulse-3) [0d70e226281d53a00641834f45aa47c4b07d5f5a] CWD: /
Dec 10 23:03:22 ztreambox tvheadend[2950]: CRASH: Fault address 0x8 (Address not mapped)
Dec 10 23:03:22 ztreambox tvheadend[2950]: CRASH: Loaded libraries: /opt/lib/libmediaclient.so /lib/x86_64-linux-gnu/librt.so.1 /lib/x86_64-linux-gnu/libdl.so.2 /usr/lib/x86_64-linux-gnu/libavahi-common.so.3 /usr/lib/x86_64-linux-gnu/libavahi-client.so.3 /lib/libssl.so.0.9.8 /lib/x86_64-linux-gnu/libpthread.so.0 /lib/x86_64-linux-gnu/libm.so.6 /lib/x86_64-linux-gnu/libc.so.6 /lib/libcrypto.so.0.9.8 /lib64/ld-linux-x86-64.so.2 /lib/x86_64-linux-gnu/libdbus-1.so.3 /lib/x86_64-linux-gnu/libz.so.1 /lib/x86_64-linux-gnu/libnss_compat.so.2 /lib/x86_64-linux-gnu/libnsl.so.1 /lib/x86_64-linux-gnu/libnss_nis.so.2 /lib/x86_64-linux-gnu/libnss_files.so.2
Dec 10 23:03:22 ztreambox tvheadend[2950]: CRASH: Register dump [23]: 00007f75cb822b80 0000000000001a72 6d69532065694420 0000000000000006 000000004ee63bbc 000000000000dbf2 0000000001a14c10 00000000000000f2 0000000000000000 0000000000000000 000000004ee6352c 0000000000000000 000000004ee6352c 0000000000000000 0000000000000000 00007f75e77f7d08 00007f75eee8a5d1 0000000000010283 0000000000000033 0000000000000004 000000000000000e fffffffe7ffbfa17 0000000000000008
Dec 10 23:03:22 ztreambox tvheadend[2950]: CRASH: STACKTRACE
Dec 10 23:03:22 ztreambox tvheadend[2950]: CRASH: ??:0 0x420e0b
Dec 10 23:03:22 ztreambox tvheadend[2950]: CRASH: ??:0 0x7f75ef430c60
Dec 10 23:03:22 ztreambox tvheadend[2950]: CRASH: ??:0 0x7f75eee8a5d1
Dec 10 23:03:22 ztreambox tvheadend[2950]: CRASH: __strdup+0x16  (/lib/x86_64-linux-gnu/libc.so.6)
Dec 10 23:03:22 ztreambox tvheadend[2950]: CRASH: ??:0 0x424a69
Dec 10 23:03:22 ztreambox tvheadend[2950]: CRASH: ??:0 0x409a7d
Dec 10 23:03:22 ztreambox tvheadend[2950]: CRASH: ??:0 0x43aff0
Dec 10 23:03:22 ztreambox tvheadend[2950]: CRASH: ??:0 0x43bc11
Dec 10 23:03:22 ztreambox tvheadend[2950]: CRASH: ??:0 0x7f75ef427d8c
Dec 10 23:03:22 ztreambox tvheadend[2950]: CRASH: clone+0x6d  (/lib/x86_64-linux-gnu/libc.so.6)
Dec 10 23:03:22 ztreambox kernel: [97658.182070] tvheadend[2956]: segfault at 8 ip 00007f75eee8a5d1 sp 00007f75e77f7d08 error 4 in libc-2.13.so[7f75eee08000+18a000]

The previous tvheadend (I reckon it was 2.12.99~pulse-2) worked for more than 2 months without a crash.

If it’s important, the XBMC »ztreambox« currently uses is »XBMC PRE-11.0 Git:Unknown (Compiled: Nov 12 2011)« (that’s what XBMC sysinfo hardware displays).

After doing the initial update, tvheadend kept crashing after a maximum of about a minute. I then ran ztreambox’s »update script« which somehow didn’t revert to version ~pulse-2 (as I expected) but deinstalled my upgraded version ~pulse-3 and apparently re-installed the same version. The only difference is that the version installed using the ztreambox script doesn’t crash that often, i.e., it often runs for several hours before crashing.

Here’s the ztreambox script that did the update (I selected »tvheadend«, look at function tvhinst):

[Sorry, I tried to include the script but the forum claims it’s too long and I couldn’t find a possibility to add an attachment. The script is located at /home/xbmc/ztreambox/scripts/pvrbackend.sh.]

Here’s the function tvhinst from the script:
Code:
###############################################################################
#Funktion zur Installation von tvheadend
function tvhinst {

    (
    #Kurze Denkpause
    sleep 2
    #HTS-tvheadend installieren
    #preseed für Installation vorbereiten
    echo "# Antwortdatei wird vorbereitet..." ; sleep 2
    cd ~
    sudo sh -c "echo 'tvheadend    tvheadend/admin_username string xbmc' > ~/tvheadend.seed"
    sudo sh -c "echo 'tvheadend    tvheadend/admin_password password xbmc' >> ~/tvheadend.seed"
    sudo sh -c "echo 'tvheadend    tvheadend/webinterface note' >> ~/tvheadend.seed"
    sudo debconf-set-selections ~/tvheadend.seed
    #Repository hinzufügen
    echo "# Paketquelle wird hinzugefuegt..." ; sleep 2
    #ppa:lars-opdenkamp/xbmc-pvr , https://launchpad.net/~lars-opdenkamp/+archive/xbmc-pvr
    sudo add-apt-repository ppa:lars-opdenkamp/xbmc-pvr
    #deb http://www.lonelycoder.com/debian/ hts main , https://www.lonelycoder.com/hts/tvheadend_download.html
    #sudo sh -c 'echo "deb http://www.lonelycoder.com/debian/ hts main" >> /etc/apt/sources.list'
    #Repositories aktualisieren
    echo "# Paketquellen werden aktualisiert..." ; sleep 2
    sudo apt-get update -y --force-yes
    #Installation tvheadend
    echo "# tvheadend wird installiert..." ; sleep 2
    #wenn aus xbmc-pvr installiert wird
    sudo apt-get install -y --force-yes -q tvheadend
    #Erfolgskontrolle und Protokollierung
    PKGNAME="tvheadend"
    checkinstall
    #hts Benutzer muss Mitglied der Gruppe video sein, um auf die TV-Karte
    #zugreifen zu können.
    echo "# Benutzeranpassungen werden durchgefuehrt..." ; sleep 2
    sudo usermod -a -G video hts
    #den Benutzer hts der Gruppe xbmc hinzufügen
    sudo usermod -a -G xbmc hts
    cd ~
    #Verzeichnis für TV Aufnahmen erstellen
    echo "# Aufnahmeverzeichnis wird erstellt..." ; sleep 2
    mkdir ~/Recordings
    #Berechtigungen für Gruppe xbmc setzen (hts ist Mitglied)
    chmod g+w ~/Recordings
    echo "# Aufraeumen..." ; sleep 2
    rm -f ~/tvheadend.seed
    #Kontrolldatei erstellen
    touch ~/ztreambox/tvheadend.installed
    #######################################################################
    #Optional:
    #Paketquellen wieder entfernen
    #cd ~
    #wget http://downloads.ztreambox.org/ztreamboxlive/scripts/remove-apt-repository.sh
    #chmod +x remove-apt-repository.sh
    #sudo ./remove-apt-repository.sh lars-opdenkamp/xbmc-pvr
    #sudo apt-get update -y --force-yes
    #rm -f remove-apt-repository.sh
    #######################################################################
    if [ "$REBOOT" = "no" ]; then
       echo "# tvheadend installiert!"
    else
      echo "# tvheadend installiert, Rechner wird jetzt neu gestartet!"
    fi
    ) | zenity --progress --title="PVR-Backend Installation:" --text="tvheadend wird installiert..Bitte warten..." --pulsate

    if [ "$?" = 1 ]; then
       zenity --warning --title="PVR-Backend Installation:" --text="Installation wurde durch Benutzer abgebrochen!"
    else
      if [ "$REBOOT" = "no" ]; then
        exit 1
      else
        sudo reboot
      fi      
    fi

}
###############################################################################



crash report with dbg package - phofman - 2011-12-11

My fault, I did not notice the dbg package. Here is the crash log with debug strings:

Code:
Dec 11 21:35:22 htpc tvheadend[3058]: CRASH: Signal: 11 in PRG: /usr/bin/tvheadend (2.12.99~pulse-3) [edaad3ca7463fb92c00286ee878fd19b6f95da14] CWD: /  
Dec 11 21:35:22 htpc tvheadend[3058]: CRASH: Fault address (nil) (Address not mapped)
Dec 11 21:35:22 htpc tvheadend[3058]: CRASH: Loaded libraries: /lib/tls/i686/cmov/librt.so.1 /lib/tls/i686/cmov/libdl.so.2 /usr/lib/libavahi-common.so.3 /usr/lib/libavahi-client.so.3 /lib/i686/cmov/libssl.so.0.9.8 /lib/tls/i686/cmov/libpthread.so.0 /lib/tls/i686/cmov/libm.so.6 /lib/tls/i686/cmov/libc.so.6 /lib/i686/cmov/libcrypto.so.0.9.8 /lib/ld-linux.so.2 /lib/libdbus-1.so.3 /lib/libz.so.1 /lib/tls/i686/cmov/libnss_compat.so.2 /lib/tls/i686/cmov/libnsl.so.1 /lib/tls/i686/cmov/libnss_nis.so.2 /lib/tls/i686/cmov/libnss_files.so.2  
Dec 11 21:35:22 htpc tvheadend[3058]: CRASH: Register dump [19]: 00000033 c0590000 ffff007b 0000007b 0809d435 00000000 ac8fe7d8 ac8fe7bc 0080dff4 00000000 00000000 00000000 0000000e 00000004 0072b821 00000073 00010246 ac8fe7bc 0000007b
Dec 11 21:35:22 htpc tvheadend[3058]: CRASH: STACKTRACE
Dec 11 21:35:22 htpc tvheadend[3058]: CRASH: /tmp/buildd/tvheadend-2.12.99~pulse/src/trap.c:139 0x80687ca
Dec 11 21:35:22 htpc tvheadend[3058]: CRASH: __kernel_rt_sigreturn+0x0  ()
Dec 11 21:35:22 htpc tvheadend[3058]: CRASH: /tmp/buildd/tvheadend-2.12.99~pulse/src/htsmsg.c:219 0x8064b46
Dec 11 21:35:23 htpc tvheadend[3058]: CRASH: /tmp/buildd/tvheadend-2.12.99~pulse/src/webui/extjs.c:891 0x807e7c2
Dec 11 21:35:23 htpc tvheadend[3058]: CRASH: /tmp/buildd/tvheadend-2.12.99~pulse/src/http.c:344 0x804f2f9
Dec 11 21:35:23 htpc tvheadend[3058]: CRASH: /tmp/buildd/tvheadend-2.12.99~pulse/src/http.c:437 0x804f6f1
Dec 11 21:35:23 htpc tvheadend[3058]: CRASH: /tmp/buildd/tvheadend-2.12.99~pulse/src/http.c:749 0x804f959
Dec 11 21:35:23 htpc tvheadend[3058]: CRASH: /tmp/buildd/tvheadend-2.12.99~pulse/src/http.c:792 0x804fa54
Dec 11 21:35:23 htpc tvheadend[3058]: CRASH: /tmp/buildd/tvheadend-2.12.99~pulse/src/tcp.c:397 0x804df33
Dec 11 21:35:23 htpc tvheadend[3058]: CRASH: ??:0 0x63a96e
Dec 11 21:35:23 htpc tvheadend[3058]: CRASH: clone+0x5e  (/lib/tls/i686/cmov/libc.so.6)



- phofman - 2011-12-12

dushmaniac, please is there a way to provide source packages for your tvheadend pulse packages? Or at least a way to include the github commit MD5 in the package description so that I can file a bug report telling the version? Thanks a lot. Pavel.


- NeVeREire - 2011-12-12

does this work on Apple TV 2 ? Also does it matter which country you live in ?