Kodi Community Forum
[OLD] 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: [OLD] HOW-TO watch Live TV in XBMC for Linux with Tvheadend, the easy way! (/showthread.php?tid=51945)



- ptipton - 2009-08-18

FreddyAV Wrote:I don't have any DVB-* cards at the moment but this seems very interesting I must confess. Might need to get some.

Anyhow. Currently I have three Hauppauge PVR tuners which all output a hardware encoded MPEG stream (not sure if it's MPEG1 or 2, have to get back on that when I get home from work). Would it be a lot of job to add support to Tvheadend for such cards? Is there something in the DVB-* specification/output from such cards that is needed for Tvheadend to work the way it is working today?

Cheers! Smile

EDIT: Just to clarify. The Hauppuage PVR-150, 250, 250 and 500 are all analogue but using
Code:
cat /dev/video0 > test.mpg
yields a mpg file.

EDIT2: Haven't gotten home just yet but according to the Hauppauge web site, the cards do output MPEG-2 streams. Also I found that VDR is designed mostly for DVB-* cards but there are two plugins that allow for input from analogue cards and one, which apparently is simpler is specific to the Hauppauge PVR cards.

Would be great to get this working with Hauppauge PVR cards and external satellite tuner boxes.


- patstew - 2009-08-19

T_oo Wrote:Not having a fully functional live TV option in a Media Center is a bummer.

For me, SVN Versions for both XBMC and TVheadend are needed to get at least a live stream. No EPG, Bouquets, sorting, grouping, parent control, recording from within XBMC. Not to mention all the other bugs the SVN versions (of course) still contain.

Is there anybody working on an integration of TVheadend to XBMC? Why not work on that one instead of Showtime 3.0 (adoma?)? It's seems to be a much more logical step than to create YAOMP (yet an other media player).

If there's no one working or plans to work on it, could someone give me a Ok if this could be done with python through a script? I'm willing to work on it. Learning Python is on my list anyway. Would be a great stimualtion.

Thanks.

I'm currently doing that (Learning Python and intending to make a decent htsp interface), hopefully I'll have something to show in a couple of weeks. Don't let me stop you having a go too though, perhaps if we both learn it we can work together.

My rough plan is to get something which lets you sort the channel list properly first, then add epg information to it, then add the ability to set recordings and get programme info from the epg.

Further down the line, decent recordings support would either require more features in tvheadend, or another serverside script to manage them. I'm not sure whether or not andoma intends tvheaded to have that sort of functionality. I would like it to expire recordings based on disk free/age and to allow you to mark recordings for archival, so it would then convert them to mpeg4/h.264 and move them somewhere else. I'd also like to see if it's possible to make xbmc/tvheadend launch redbutton for MHEG support.


- T_oo - 2009-08-19

pastew,

just curious, did you find any more specification about htps than that what adoma has in his wiki. It's a bit sparse ... Google was not my friend this time.


- andoma - 2009-08-19

austin Wrote:if someone wants a dirty hack:

edit file epg.c, at the beginning of method epg_event_create insert something like:

start = start - 180;
stop = stop + 600;

rebuild ...

For the brave people that run code directly from Tvheadend's trunk I can please you
that Tvheadend now contains a configurable offset before and after recordings
(In the DVR configuration tab)


Tvheadend 2.5 - andoma - 2009-08-19

andoma Wrote:For the brave people that run code directly from Tvheadend's trunk I can please you
that Tvheadend now contains a configurable offset before and after recordings
(In the DVR configuration tab)

Actually, I could not hold myself so I decided to put out a release right now.

The changelog:
Code:
* If a previosly detected DVB adapter was not present during startup,
     Tvheadend would crash. This is now fixed.
.
   * If XMLTV grabbing was disabled tvheadend would spin in a 100% CPU loop.
     This is now fixed.
.
   * The HTSP service is now announced via AVAHI (mDNS service discovery)
.
   * Support for IPTV has been added. Only RAW TS in UDP is supported
     at the moment.
.
   * Add support for setting default extra times to add before and after
     a recording. Useful if your TV shows never start on time.
.
   * Use FFmpeg's av_interleaved_write_frame() or some players can't
     play the recorded content (vlc is one)

All of you who happen to live in Sweden and have Telias IPTV service
may now use Tvheadend to watch / record all their free channels.

Tvheadend does not include presets for Telia's IPTV (contrary to how
the DVB configuration is preloaded with networks) but it should be
rather easy to setup nevertheless.

Check this post: http://www.shapeshifter.se/2008/04/01/behind-the-scenes-of-telias-iptv/comment-page-1/#comment-346 for all the channels.


Also this release contains the much asked for feature, to add extra time before
and after scheduled recordings. Check the Configuration / Digital Video Recorder
tab for details.


- patstew - 2009-08-20

T_oo Wrote:pastew,

just curious, did you find any more specification about htps than that what adoma has in his wiki. It's a bit sparse ... Google was not my friend this time.

No, as far as I know the only documentation is what andoma has put here
http://trac.lonelycoder.com/hts/wiki/htsp
However, I'm still in the learning python stage, so I haven't looked at everything yet. Hopefully I'll be in a position to start the script next week. I can't do much this weekend but after that I have a lot of free time.

As you say, there seems to be very little on google, the only sources of information I know of are andoma's documentation and the source of tvheadend/showtime/xbmc.


tvheadend pvr-plugin - pucko - 2009-08-21

Pastew, Have you looked at the pvr-testing branch of XBMC?
https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/pvr-testing
I think a better solution for the future would be to write a tvheadend plugin.
Right now there is VDR plugin which you could take a look at.
Such a solution would intergrate better with XBMC.

BTW tvheadend deserves much more attention.
Easy to setup compared to myth and VDR.
Nice and modern web interface.
Very fast channel changing.
It has been running in my HTPC for the last three month whithout a problem.
A better XBMC intergration would really take my lazy zapping moments to new level.


- patstew - 2009-08-22

pucko Wrote:Pastew, Have you looked at the pvr-testing branch of XBMC?
https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/pvr-testing
I think a better solution for the future would be to write a tvheadend plugin.
Right now there is VDR plugin which you could take a look at.
Such a solution would intergrate better with XBMC.

BTW tvheadend deserves much more attention.
Easy to setup compared to myth and VDR.
Nice and modern web interface.
Very fast channel changing.
It has been running in my HTPC for the last three month whithout a problem.
A better XBMC intergration would really take my lazy zapping moments to new level.

I know about the pvr-testing work, I tried it a while ago, but it wasn't completely stable and I didn't like VDR that much. The last I heard from alcoheca, the groundwork wasn't finished and the api isn't stable (see: here). That post was a while ago but most commits since then seem to be on the vdr plugin and not on the addon framework. When alcoheca/alwinus indicate that the PVR work is ready for plugins I'll look into doing that, but until then I'm going to try and write a python script. I think that it will be easier to write the PVR plugin having the script as a reference anyway, so it won't be completely wasted.


- bisch - 2009-08-25

Could someone point me to a Doc with a how to or more information.

I've downloaded and installed the 64bit deb and it has installed correctly. I can see my hardware card etc.
What is the best way to start and stop this application. The run time launch grabs the hardware of the card and this is great if it is the only application you want to use with your dvb, but otherwise you need to killall it. I see there is the -f and -u option but it seems to never set the same config as when it starts automatically.

There is likely a place for this, but I only see how to install on this forum and the documents on the web page seem general to what is found with the webgui. I apologize if I'm missing where to look.

I'd like to know how if it's possible to install other or custom satelite/transponder lists, I don't see any NorthAmerican satelites on the list by default. I'm wondering if this requires a recompile of some source.
-proper way to start and stop
-explanation on LNB and diseqc in the webgui, or how to manually edit or if advanced features are needed.
-The CWC, I"d like to use newcamd, this looks like it would be very similar or handle all or close to the same parameters, is there any customization if this is based on the newcamd cardclient.conf

So what I"m looking to do is likely all possible:
-DVB-S card (found=check)
-diseqc (options in web gui, not super clear yet)
-lnb settings
-Custom transponder INI or to expand list
-CWC or newcamd support

I'll give it some more time, but that is what I wanted to ready more about, I believe it's all doable from the posts read and feature set, but I seem to not be finding much documentation thus far.
I'm guessing I'll have to play around with the transponder/lnb/diseqc and figure get one going, then it may discover the others, or require a manual entry for each. I'll have more time to try this tomorrow but just wanted to know if there is an easier or better way via the guide of some document.

Thank you for your help and sorry if I missed the document.
Looks like a pretty cool piece of software.


- austin - 2009-08-25

bisch Wrote:Could someone point me to a Doc with a how to or more information.

What is the best way to start and stop this application.

this is a background application - thus you start and stop it with these commands:

/etc/init.d/tvheadend start
/etc/init.d/tvheadend stop

(or similar)

as root (or try to place sudo in front)


- patstew - 2009-08-26

bisch - this is the documentation: http://www.lonelycoder.com/hts/tvheadend/docs/2_5/index.html. Hopefully you can work out what you need from it. Also try the help buttons on the web interface.
If the satellite you want isn't on the list you could try manually adding a couple of multiplexes. Often they broadcast the other multiplexes on the satellite so you won't need to add them all, if you check the 'Autodetect Muxes' and 'Idle Scanning' boxes on the config page. I can't really help you with LNB , cwc or diseqc since I never use them other than adding universal LNB.


- ukasz - 2009-08-26

i can't get it working. i am using hts 2.5 and xbmc 9.04.1. debian squeeze. all dependencies are met. xbmc always returns an error that it can not connect to the server. in hts log i can't see anything and in tcpdump no packets are transmited. in showtime i can connect but no channels etc. in hts logi can see that hts: got connection from....

i want to stream tv from one computer to another.

any idea what might be wrong ?


- bisch - 2009-08-27

Thank you for the replies.
I've found that using dbs for the lnb config works on the initial scan, but it'll only find one info for one or two stations per transponder leaving the others in the initial or unknown state.
If I use auto detect mux it will immediately hang.

ex of error message of syslog:
Quote:Aug 26 22:41:03 BischLan tvheadend[6025]: dvb: Adapter "Genpix 8psk-to-USB2 DVB-S" mux autodiscovery set to:
OnAug 26 22:41:04 BischLan tvheadend[6025]: dvb: New mux "12,559,340 kHz ?? (Default (Port 0, dbs LNB))" created by automatic mux discovery'

And the webpage status/console message:
Quote:Aug 26 22:41:03 dvb: Adapter "Genpix 8psk-to-USB2 DVB-S" mux autodiscovery set to: On

There seems to be a problem with the live update feed from Tvheadend. Trying to reconnect..."

Looking at the source code for dvb_satconf.c the high and low
Code:
else if(!strcmp(id, "DBS")) {
    *f_low    = 11250000;
    *f_hi     = 0;
    *f_switch = 0;
NA sats dishnet/bev require high and low to be 11250000, so this might be the reason.
I'm sort of re-new/rusty at linux so I'll try to recompile this in and see if it helps.

Can it distinguish between qspk and turbofec 8spk? is this automatic or something that is will only handle qspk at this point?

Will you consider the possibility uploading of sat/transponder INI files to the webpage or some config file? I guess if I can get automux to work this won't be a huge deal.

Thank you for your help


- bisch - 2009-08-27

A quick update, changing the DBS lnb high/low and recompiling did not help for scanning, it still only found one or two channels per transponder of 21.
It also crashed with the same error "segfault" with auto mux is on.

Does this work with NA sats ? I'm rusy with my skills so I'm not selling myself short as the problem yet :0

Thanks again


- andoma - 2009-08-27

bisch Wrote:Thank you for the replies.
I've found that using dbs for the lnb config works on the initial scan, but it'll only find one info for one or two stations per transponder leaving the others in the initial or unknown state.
If I use auto detect mux it will immediately hang.

ex of error message of syslog:


And the webpage status/console message:


Looking at the source code for dvb_satconf.c the high and low
Code:
else if(!strcmp(id, "DBS")) {
    *f_low    = 11250000;
    *f_hi     = 0;
    *f_switch = 0;
NA sats dishnet/bev require high and low to be 11250000, so this might be the reason.
I'm sort of re-new/rusty at linux so I'll try to recompile this in and see if it helps.

Can it distinguish between qspk and turbofec 8spk? is this automatic or something that is will only handle qspk at this point?

Will you consider the possibility uploading of sat/transponder INI files to the webpage or some config file? I guess if I can get automux to work this won't be a huge deal.

Thank you for your help

Hi

First of all Tvheadend has currently not support for DVB-S2 adapters.
They work using the old DVB-S API but muxes with modulation other than
QPSK will not work. This is one of the problems Smile

Secondly, the support for circular polarisation seems to be broken.
I think this is what causes Tvheadend to segfault and print strange names
for your muxes. I will look into that and write a post once it is fixed.

The DBS configuration is taken directly from linuxtv.org's dvb-utils.
I will try to look into that and see if something is broken.