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)



- bomping - 2011-08-15

dushmaniac Wrote:We've moved to a new location for the binaries.

To upgrade, execute the following commands:
Code:
sudo apt-get -y install curl
curl -Ls --output /tmp/install-xbmc-pvr.sh http://packages.pulse-eight.net/ubuntu/install-xbmc-pvr.sh
chmod +x /tmp/install-xbmc-pvr.sh
/tmp/install-xbmc-pvr.sh

This will add the new repositories, import the GPG key and install XBMC.

If there are any issues, please let me know.


I'm on Debian Sid, will the new repo work ?

//Bomping.


- bas.t - 2011-08-17

bomping Wrote:I'm on Debian Sid, will the new repo work ?

//Bomping.

No, you will have to compile yourself, wich is easy.
I did it on squeeze, no problem. In fact, I am compiling right now, so I have the newest version.
If you are interested, I have got detailed instructions at hand. I suppose you could use them for Sid as well, maybe with some minor modifications.

Bas.


- EmuMannen - 2011-08-19

bas.t Wrote:No, you will have to compile yourself, wich is easy.
I did it on squeeze, no problem. In fact, I am compiling right now, so I have the newest version.
If you are interested, I have got detailed instructions at hand. I suppose you could use them for Sid as well, maybe with some minor modifications.

Bas.
I just switched to Squeeze. Where did you install tvheadend from (deb or repos, if repo what repo, source or binary)?

I'm interested in any details (instructions or experiences on Debian (preferably Squeeze. I'm about to turn my new Fusion based media server into a combined front- and back-end.


- aoaaron - 2011-08-19

Can someone please explain a bit more the advantages of TVHeadend?

I have Sky (UK). Does this mean I can access my sky subscription using TV Headend? How is this possible via software alone? I have an emachine HR1401 atm as my HTPC and an unRAID server.


RE: [LINUX] HOW-TO watch Live TV in XBMC for Linux with Tvheadend, the easy way! - bas.t - 2011-08-19

EmuMannen Wrote:I just switched to Squeeze. Where did you install tvheadend from (deb or repos, if repo what repo, source or binary)?

I'm interested in any details (instructions or experiences on Debian (preferably Squeeze. I'm about to turn my new Fusion based media server into a combined front- and back-end.

I build from git since the repos are ubuntu. You don't want to mix Debian and Ubuntu.
Here is how I did it on 32 as well as 64 bits Debian Squeeze.

OK, this assumes that you have a nvidia graphic card installed.

First you have to get your repos right, meaning enabling contrib, non-free and add multimedia.


My sources.list looks like this:

Code:
# deb http://mirrors.nl.kernel.org/debian/ squeeze main

deb http://mirrors.nl.kernel.org/debian/ squeeze main contrib non-free
deb-src http://mirrors.nl.kernel.org/debian/ squeeze main contrib non-free

deb http://security.debian.org/ squeeze/updates main contrib non-free
deb-src http://security.debian.org/ squeeze/updates main contrib non-free

# squeeze-updates, previously known as 'volatile'
deb http://mirrors.nl.kernel.org/debian/ squeeze-updates main
deb-src http://mirrors.nl.kernel.org/debian/ squeeze-updates main
deb http://www.debian-multimedia.org squeeze main non-free
deb-src http://www.debian-multimedia.org squeeze main non-free

Don't forget to install debian-multimedia-keyring

Code:
apt-get update && apt-get --yes --quiet --allow-unauthenticated install debian-multimedia-keyring


Then make sure your dependencies are met and install your nvidia driver:

(all as root)

Code:
apt-get update && apt-get dist-upgrade -y

apt-get build-dep xbmc -y

apt-get install -y nvidia-kernel-dkms nvidia-settings nvidia-xconfig && nvidia-xconfig

apt-get install autoconf automake autotools-dev bison cvs fp-compiler fp-units-rtl g++-4.3 gdc gdc-4.3 git-core libboost-date-time1.42-dev libboost-serialization1.42-dev libboost-serialization1.42.0 libboost-thread-dev libboost-thread1.42-dev libltdl-dev libmpeg3-1 libmpeg3-dev libphobos-4.3-dev libsdl-gfx1.2-4 libsdl-gfx1.2-dev libsqlite0 libssh-dev libstdc++6-4.3-dev libtool libyajl-dev libyajl1 pmount python-dev python-sqlite yasm gdb

Now you are ready to compile xbmc and tvheadend from git.

Do:

Code:
cd /usr/src

git clone -b Eden-pvr-cec git://github.com/Pulse-Eight/xbmc.git

cd xbmc

git reset --hard HEAD

./bootstrap && ./configure --prefix=/usr && make && make install


That was xbmc. Now for tvheadend, if you want that too, do this:

Code:
cd /usr/src

git clone git://github.com/opdenkamp/tvheadend.git

cd tvheadend

git reset --hard HEAD

./configure --release

make

adduser --system --group hts

cp -f /usr/src/tvheadend/build.Linux/tvheadend /usr/bin/tvheadend

Now you want to autostart tvheadend.

First do

Code:
nano /etc/init.d/tvheadend

Then copy and past this into /etc/init.d/tvheadend

Code:
#! /bin/sh
### BEGIN INIT INFO
# Provides:          tvheadend
# Required-Start:    $local_fs $remote_fs udev
# Required-Stop:     $local_fs $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
### END INIT INFO

# Author: Andreas Ă–man

# Do NOT "set -e"

# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/usr/sbin:/usr/bin:/sbin:/bin
DESC="HTS Tvheadend"
NAME=tvheadend
DAEMON=/usr/bin/$NAME
DAEMON_ARGS="-f -u hts -g video"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME

# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0

# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME

# Load the VERBOSE setting and other rcS variables
[ -f /etc/default/rcS ] && . /etc/default/rcS

# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions

#
# Function that starts the daemon/service
#
do_start()
{
    # Return
    #   0 if daemon has been started
    #   1 if daemon was already running
    #   2 if daemon could not be started
        udevadm settle
    start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
        || return 1
    start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
        $DAEMON_ARGS \
        || return 2
}

#
# Function that stops the daemon/service
#
do_stop()
{
    # Return
    #   0 if daemon has been stopped
    #   1 if daemon was already stopped
    #   2 if daemon could not be stopped
    #   other if a failure occurred
    start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
    RETVAL="$?"
    [ "$RETVAL" = 2 ] && return 2
    # Many daemons don't delete their pidfiles when they exit.
    rm -f $PIDFILE
    return "$RETVAL"
}


case "$1" in
  start)
    [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
    do_start
    case "$?" in
        0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
        2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
    esac
    ;;
  stop)
    [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
    do_stop
    case "$?" in
        0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
        2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
    esac
    ;;
  restart|force-reload)
    #
    # If the "reload" option is implemented then remove the
    # 'force-reload' alias
    #
    log_daemon_msg "Restarting $DESC" "$NAME"
    do_stop
    case "$?" in
      0|1)
        do_start
        case "$?" in
            0) log_end_msg 0 ;;
            1) log_end_msg 1 ;; # Old process is still running
            *) log_end_msg 1 ;; # Failed to start
        esac
        ;;
      *)
          # Failed to stop
        log_end_msg 1
        ;;
    esac
    ;;
  *)
    echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
    exit 3
    ;;
esac

:

then do:

Code:
chmod 755 /etc/init.d/tvheadend

update-rc.d tvheadend defaults 21 21

Restart your machine and you are done.

Enjoy!

Bas.

PS:

Should you encounter problems accessing the webui of tvheadend, have a look at this.


- downhiller2010 - 2011-08-19

I recently installed xbmc-pvr and tvheadend. I have it setup but tvheadend will only pick up one channel, where mythtv finds close to a 100. I'd prefer to use tvheadend but am not sure where to start in troubleshooting this.


- bas.t - 2011-08-19

downhiller2010 Wrote:I recently installed xbmc-pvr and tvheadend. I have it setup but tvheadend will only pick up one channel, where mythtv finds close to a 100. I'd prefer to use tvheadend but am not sure where to start in troubleshooting this.

Maybe someone could help you when you provide information, such as:
where do you live, what cable or sat company did you subscribe to, what have you done to configure tvheadend, is your cable/sat provider encrypting the broadcasts and so on...


- EmuMannen - 2011-08-19

Thanks a lot bas.t, you probably saved me a lot of time. So you got tvheadend from git too. I will play around a bit to see if I can get it to work with the on-board AMD gfx but I got a nVidia card as a fallback. I want to stay on Debian if possible. I do understand the ones running Ubuntu (nice critical mass and ppa is a really cool concept). I tried to install 11.04 at first but even samba seemed broken so I just gave up and installed good old Debian...


- downhiller2010 - 2011-08-19

I live in central virginia and I am stuck with shentel for my cable. So far I have stuck with the basic scanning options which seemed to work with mythtv. I have been using the standard cable QAM256 option when adding DVB by location, and then when it finishes I am mapping them. I know some of the channels are encrypted but they still seemed to work with mythtv? I am new to this realm of pvr, but I should be able to figure it out with some guidance.


- phofman - 2011-08-19

dushmaniac,

may I ask about future plans for tvheadend in your https://launchpad.net/~lars-opdenkamp/+archive/xbmc-pvr repository? Since xbmc-pvr is moved to the new repository, is there any chance for tvheadend updates? I know I can compile from git, but your builds were tested to work Smile Thanks a lot.


- bas.t - 2011-08-20

EmuMannen Wrote:Thanks a lot bas.t, you probably saved me a lot of time. So you got tvheadend from git too. I will play around a bit to see if I can get it to work with the on-board AMD gfx but I got a nVidia card as a fallback. I want to stay on Debian if possible. I do understand the ones running Ubuntu (nice critical mass and ppa is a really cool concept). I tried to install 11.04 at first but even samba seemed broken so I just gave up and installed good old Debian...

The amd gfx probably works too. I just don't know about the driver since all my machines have nvidia. Installing nvidia drivers the way I described pulls in some packages you will need like build-essential. The driver itself is of course not mandatory.


- bas.t - 2011-08-20

downhiller2010 Wrote:I live in central virginia and I am stuck with shentel for my cable. So far I have stuck with the basic scanning options which seemed to work with mythtv. I have been using the standard cable QAM256 option when adding DVB by location, and then when it finishes I am mapping them. I know some of the channels are encrypted but they still seemed to work with mythtv? I am new to this realm of pvr, but I should be able to figure it out with some guidance.

So did tvheadend discover all of your muxes and services? It might just be a mapping problem.

Look in configuration --> TV adapters and select an adapter.
Now look in multiplexes and services.
How many multiplexes should you have? Are they there?
How many services should be there?

I'm not familiar with the basic scanning settings you need for your provider, but obviously someone in your home region is...

Also, you could try to contact your provider and ask them for the info you need, since adding a initial mux by location would not do you any good imho. Virginia is not in the tvheadend list.
You should probably manualy add a initial mux. So you need to know the frequency, the symbolrate, the constellation and the FEC. And maybe your provider uses "nit other". If so, you need to know wich "nit other" they are using.

Good luck.

Bas.


- EmuMannen - 2011-08-20

bas.t Wrote:The amd gfx probably works too. I just don't know about the driver since all my machines have nvidia. Installing nvidia drivers the way I described pulls in some packages you will need like build-essential. The driver itself is of course not mandatory.
It's not the driver as such but the hw-acceleration that worries me a bit. I'm sure it's just a matter of time before Linux got a stable solution for the new AMD Fusion platform but who got time Wink This is a quite intriguing lead worth exploring: http://systemsaviour.com/?p=339


- bas.t - 2011-08-20

EmuMannen Wrote:It's not the driver as such but the hw-acceleration that worries me a bit. I'm sure it's just a matter of time before Linux got a stable solution for the new AMD Fusion platform but who got time Wink This is a quite intriguing lead worth exploring: http://systemsaviour.com/?p=339

Looks very interesting to me. I wonder if that new vaapi will coexist with xbmc though...

Good luck.


- awikatchikaen - 2011-08-22

Why the PVR version is now ubuntu-only ? Is there something in debian which block the installation by package ??