Kodi Community Forum

Full Version: [OLD] HOW-TO watch Live TV in XBMC for Linux with Tvheadend, the easy way!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
We all know that there's been a lot of fuzz about watching tv with XBMC, and so far, the only solutions have not been very user/noob-friendly.

But I came across a program (for linux) that could change this, namely Tvheadend (http://www.lonelycoder.com). You can either download the .deb package and run dpkg -i package.name.deb or download the latest svn by doing
Code:
svn co svn://svn.lonelycoder.com/hts/trunk/tvheadend && cd tvheadend && ./configure && make
if you downloaded the svn, you can execute the program by typing:
Code:
build.Linux/tvheadend -C
you must be in the tvheadend directory to do that.
If you downloaded and extracted the .deb file instead, you will be prompted for user/passwd when installing, you should be able to find tvheadend in /etc/init.d/hts-tvheadend (use switch stop/start)

you can access the web user-interface by accessing http://127.0.0.1:9981 and setup the dvb-adapter and probe channels. Once all is set, go to your XBMC, and Add source > "htsp://127.0.0.1" (w/o "). If the webui found any channels, you should now be able to access those and enjoy tv function on your XBMC htpc Smile

You can use the webui to schedule recordings, at the moment, you cannot record while using the program itself :/

For support, visit #hts at irc.freenode.net

edit: added -C switch to be able to skip user/password prompt, be sure to create a specific user in the ui to be admin instead of * tho.
Anyone else getting this to work?

Looks too easy to set up, but in the end it just does not work...
XBMC can not connect, and the Showtime gui does not connect.

If I build, I cant log in the webserver. The documentation says: "By default everyone (also from remote hosts)is allowed full access to all features / settings in the web user interface. If this is the first time you setup Tvheadend you are most encouraged to enter the web user interface, selected the 'Configuration' + 'Access Control' tab and make reasonable changes. Futher help / documentationcan be obtained inside the web interface. "

That is a pure lie, since there is no way to log in without a user/password, and my systems user/password does not work either.

Other than that the webserver is way to easy to use... (after reinstalling ubuntu and using the .deb file I got to type a user under the install).

It finds my DVB card with a SAPI driver from s2-liplianin. Provider files for my provider is there. It scans the transponders automatically and finds new one automatically. CardClient works and the probe function tests every channel and adds only open channels to the list.

Recordings work after setting correct permissions on the record folder.

But the part I want, is watching TV from my XBMC. That does not work from XBMC live CD or SVN install... At least for me...
Hehe, not quite shure what I did, but I guess it has something to do with setting the permissions for the recording folder. But now I CAN watch live TV...

The problem now, is that I can only watch.. Not hear...

When I select a channel the picture starts, and I get a XBMC message "Failed to initialize Audio device"

The strange part, is when selecting a HD channel the opposite happens. I get sound, but no picture ?!?
Hehe, one step closer!

I got audio working on SD channels by changing Audio output device to iec958 in the XBMC Video Player settings Smile
Hmm... Strange... I have testet several things but nothing made HD channels work...

Then I tried recording a HD channel. and play that back... Then I was zapping through my channels and accidentally zapped to a HD channel. Now the HD channels suddenly work?!?

The HD channels are out of sync and choppy without VDPAU, but play nice with VDPAU Smile

XBMC & TVHEADEND ROCK!!!
Found a solution to not having a user/password when building Tvheadend Smile

Start it like this:
Code:
build.Linux/tvheadend -C
"If no useraccount exist then create one with no username and no password. Use with care as it will allow world-wide administrative access to your Tvheadend installation until you edit the access-control from within the Tvheadend UI"
I think libhts isn't enabled in the current builds (eg 9.04/win and this one http://danielpatton.com/user-accounts/XB...v20737.zip)
Without it I just get could not connect to server messages, and no connection attempt is made (no TCP packets seen in a snoop).
Cirion Wrote:Found a solution to not having a user/password when building Tvheadend Smile

Start it like this:
Code:
build.Linux/tvheadend -C
"If no useraccount exist then create one with no username and no password. Use with care as it will allow world-wide administrative access to your Tvheadend installation until you edit the access-control from within the Tvheadend UI"

yeah, if u dont have a firewall blocking port 9981 (and 9982 for streaming).
This is a small howto I wrote for setting up Tvheadend on a XBMC Live installation with my Terratec DBC C PCI HD card:

Use ssh user@ip to log into the XBMC PC remotely

Add the repositories (Tvheadend requires the SVN version of XBMC for now).
Code:
sudo apt-get install vim wget
sudo vi /etc/apt/sources.list

Paste these repositories and save & quit
Code:
deb http://ppa.launchpad.net/team-xbmc-svn/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/team-xbmc-svn/ppa/ubuntu jaunty main
deb http://ppa.launchpad.net/xbmc-addons/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/xbmc-addons/ppa/ubuntu jaunty main
deb http://www.lonelycoder.com/debian hts main

Add keys to the different repositories
Code:
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xa292248fcb9cfb8689a30b7a2bbd133164234534
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0x906d501a710f997d4b759003a956eb81318c7509
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0x189701da570c56b9488ef60a6d975c4791e7ee5e
wget http://www.lonelycoder.com/public.key
sudo apt-key add public.key

Upgrade XBMC
Code:
sudo apt-get update
sudo apt-get dist-upgrade

Install some dependencies
Code:
sudo apt-get install mercurial subversion linux-headers-$(uname -r) build-essential libvorbisenc2

Install the s2-liplianin driver if needed for your card
Code:
hg clone http://mercurial.intuxication.org/hg/s2-liplianin
cd s2-liplianin
make
sudo make install
sudo reboot

Installer Tvheadend and select user/password for the admin site
Code:
sudo apt-get install hts-tvheadend

Set some permissions (if anyone knows the exact permissions please tell)
Code:
sudo chmod 777 -R /home/hts
sudo chmod 777 -R /Videos

Enter the admin site with a browser
Code:
http://ip:9981

Now go to your XBMC Live computer and add a Video source and call it TV or something
Code:
htsp://127.0.0.1:9982

Enjoy TV Smile
I got it going and it works a treat. Thanks.
I have gotten LiveTV to work with tvheadend and XBMC, but it doesn't show my recorded shows. Should that work? If so how did you do it? I run tvheadend svn and XBMC svn. XBMC doesn't show a directory for the recorded shows, only for the live tv containing the channels.
It is possible to use Diseqc in Tvheadend for multiple satelites ?
apanloco Wrote:I have gotten LiveTV to work with tvheadend and XBMC, but it doesn't show my recorded shows. Should that work? If so how did you do it? I run tvheadend svn and XBMC svn. XBMC doesn't show a directory for the recorded shows, only for the live tv containing the channels.
Recorded shows are not shown over HTSP, but since they are .mkv files recorded to the videos folder, just add a new source and add your recordings folder Smile
tomu54 Wrote:It is possible to use Diseqc in Tvheadend for multiple satelites ?

In its code, yes, but not exposed yet in the UI. I talked to the dev today, he added a little FAQ with regards to DiSEqC & S2API among others.
Maybe I'm being a little dim, but I can't see it mentioned anywhere in this thread..

Is there any form of guide, or is it just a list of channel names within XBMC ?

As they say, a picture says a thousand words.. so if anyone has screenshots that would be cool Smile

Cheers!