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)



- opdenkamp - 2010-11-08

do you happen to see any video discontinuity message in the xbmc debug log when it starts to stutter?

if you didn't see this behaviour in build odk30 and it appeared it odk32, like akr8844 reported, then the only reason I can think of is vaapi support which has been enabled in the build. there have been no major changes in the source that could cause this difference. you can change the video acceleration being used in system -> video.

I can't reproduce this behaviour on a clean lucid installation with nvidia drivers version 195.36.15.


- akr884 - 2010-11-08

dushmaniac Wrote:try disabling VAAPI in the video settings and manually put it on VDPAU.

Interesting, I turned off VAAPI and now the HD channels work fine with VDPAU temporal but there's just as much stuttering on the SD channels


Segfault - THX-SWE - 2010-11-09

Anyone else getting sporadic segfaults?

I get alot of segmentations faults in CDateTime::CDateTime()
(or maybe i misread the crashdump)

Here's some information from the crashdump

Code:
################ SYSTEM INFO ################
Date: Mon Nov  8 22:25:03 CET 2010
XBMC Options:
Arch: i686
Kernel: Linux 2.6.35-22-generic #35-Ubuntu SMP Sat Oct 16 20:36:48 UTC 2010
Release:
    Distributor ID:     Ubuntu
    Description:        Ubuntu 10.10
    Release:    10.10
    Codename:   maverick
############## END SYSTEM INFO ##############

############### STACK TRACE #################
=====>  Core file: /home/andreas/core (2010-11-08 22:25:03.523510004 +0100)
        =========================================
[New Thread 7126]
[New Thread 7131]
[New Thread 7134]
[New Thread 7140]
[New Thread 7133]
[New Thread 7148]
[New Thread 7135]
[New Thread 7102]
[New Thread 7144]
[New Thread 7103]
[New Thread 7099]
[New Thread 7104]
[New Thread 7105]
[New Thread 7107]
[New Thread 7108]
[New Thread 7106]
[New Thread 7109]
[New Thread 7113]
[New Thread 7110]
[New Thread 7111]
[New Thread 7116]
[New Thread 7117]
[New Thread 7112]
[New Thread 7118]
[New Thread 7114]
[New Thread 7115]
[New Thread 7124]
[New Thread 7079]
Core was generated by `/usr/lib/xbmc/xbmc.bin'.
Program terminated with signal 11, Segmentation fault.
#0  0x08454a92 in CDateTime::CDateTime(CDateTime const&) ()

Thread 28 (Thread 7079):
#0  0x002edb7b in pthread_cond_signal@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x0769fdb1 in SDL_CondSignal () from /usr/lib/libSDL-1.2.so.0
#2  0x0820f4b1 in SetEvent(CXHandle*) ()
#3  0x0825c9b4 in CEvent::Set() ()
#4  0x0870beaa in CXBMCRenderManager::Present() ()
#5  0x0833f020 in CApplication::RenderNoPresent() ()
#6  0x0832e738 in CApplication::Render() ()
#7  0x085dc816 in CXBApplicationEx::Run() ()
#8  0x085dd178 in main ()

........... CUT .............

Thread 1 (Thread 7126):
#0  0x08454a92 in CDateTime::CDateTime(CDateTime const&) ()
#1  0x082f428d in cPVRChannelInfoTag::NowStartTime() const ()
#2  0x086283b9 in CPVRManager::GetStartTime() ()
#3  0x088ee6f0 in XFILE::CPVRFile::GetStartTime() ()
#4  0x08856b5d in CDVDInputStreamPVRManager::GetStartTime() ()
#5  0x086c22b1 in CDVDPlayer::UpdatePlayState(double) ()
#6  0x086cda9a in CDVDPlayer::Process() ()
#7  0x082bc2e5 in CThread::staticThread(void*) ()
#8  0x006eaba8 in ?? () from /usr/lib/nvidia-current/libGL.so.1
############# END STACK TRACE ###############

The segfaults is quite sporadic but seems to happen when;
a tv-show ends, or sometimes when i'm opening/browsing the channellist.
(but not all the time) Sometimes it happens in the middle of a tv-show as well.

Any idea why this is happening?

--------------------

Another question regarding the timers (timed recordings in tvheadend).
Let's say I set a timer to record a program in channel 1.
The timer shows up booth in tvheadend web gui and in xbmc.
But if xbmc is tuned to, let's say channel 2, at the time when tvheadend want to record the timed program it seems to be some conflict.

Tvheadend wants to switch channel to "channel 1" but xbmc won't let it.
If i manually change channel from within xbmc to channel 1, or stop the tv-stream, then tvheadend starts recording.

I'm thinking that xbmc should read the timers and switch channels accordingly.

Is this by design, or is it something that could be looked into?


Anyway, you've done a great job with this xbmc-tvheadend addon. I've been using xbmc+vdr (pvr-testing2 svn) as my primary tv-viewing-system for the last year or so, but i have to say i like tvheadend much more.


- opdenkamp - 2010-11-09

about the crashes: I noticed them too but haven't paid too much attention to them yet. That constructor CDateTime::CDateTime(CDateTime const&) doesn't do much, except copying the values of the argument. I'll have to take a proper look at it and I'll put it on my todo list.

About your timer/recording: my tvheadend is always giving priority to recordings and will interrupt livetv. Don't think I changed any config to get that behaviour.

What you're suggesting about xbmc reading the timer and switching channels won't work, e.g. when you have multiple tuner cards, you don't want to autoswitch channels when a recording starts on a different tuner.


- martdj - 2010-11-09

I was trying to create a new minimal XBMC build on a USB stick with Ubuntu Maverick recently, but failed miserably. Instead I turned to installing the latest XBMCFreak beta and though at the moment the boot time is horrible and there's a lot of unneeded stuff installed (sabnzbd, transmission, tvheadend etc), it might be a good start for a backup build on USB stick. I however wonder, would it be easy to replace the standard XBMCFreak XBMC installation with dusmaniacs latest xbmc+pvr build? Does anyone know?


- opdenkamp - 2010-11-09

sure. debootstrap your target, add-apt-repository my ppa, update, install xbmc, install grub, done.


- martdj - 2010-11-09

dushmaniac Wrote:sure. debootstrap your target, add-apt-repository my ppa, update, install xbmc, install grub, done.
hmm... could you maybe rephrase that for someone who isn't that literate in Linux? This is what I make of your list:
- debootstrap your target => ?
- add-apt-repository my ppa => Replace the sources in /etc/apt/sources.list.d/xbmc.list with:
deb http://ppa.launchpad.net/lars-opdenkamp/xbmc-pvr/ubuntu lucid main
deb-src http://ppa.launchpad.net/lars-opdenkamp/xbmc-pvr/ubuntu lucid main
- update => apt-get update
- install xbmc => apt-get install xbmc ?
- install grub => ?

If you could fill in the "?"'s it would be much appreciated

edit: read up on debootstrap. I guess you want to install kinda a 2nd OS with your xbmc version. That's not what I was thinking of as the USB stick is only 8GB. I really mean removing xbmcfreaks xbmc and installing yours.


- opdenkamp - 2010-11-09

well, this is a bit outside the scope of this topic. I could explain it step by step, but it's likely that you'll fail if you don't know linux and I'd have to support that too Tongue

but the process is fairly simple and all steps can be googled, I'm pretty sure about that
- create a minimal ubuntu installation on your usb stick
- chroot into that installation before booting it
- type the following:
Code:
apt-get install python-software-properties
add-apt-repository ppa:lars-opdenkamp/xbmc-pvr
apt-get update
apt-get install xbmc-live



- opdenkamp - 2010-11-09

tvheadend patch 300 has been applied by andoma. I'll have to update the tvheadend addon for that too because it changed a bit. patch 299 will have the name of the encoding added first and will be commited later.


- opdenkamp - 2010-11-10

the build files for windows have been fixed and everything is working as far as I can see.

only noticed that the pvr plugins weren't showing up when I compiled from the master branch and it worked properly when I compiled from Dharma-pvr. This is probably the same when compiled under linux, so I'll check that out soon.

since most of you here are using the ppa builds, you probably won't care ;-)


- martdj - 2010-11-10

dushmaniac Wrote:the build files for windows have been fixed and everything is working as far as I can see.
Are you saying you have a XBMC installer for windows now somewhere with the PVR plugins in it? I would be very interested in that as I use XBMC for Windows on my normal PCs to watch TV there when the tv downstairs is occupied. Where can I find the package?


- opdenkamp - 2010-11-10

download the latest sources from my github repos, the Dharma-pvr branch. the location is in my sig. you can follow the normal guidelines on the wiki on how to create an installer.


- Swifty - 2010-11-10

Thanks for the great ppa's dushmaniac and all the hard work you have done with this.

Been using it for a few days now, it seems quite stable and even the HD stuff is working for me (was broken with VDR).

Is there any way (without using XMLTV) or picking up Freesat EPG though, as I have lots of 'no information available' in my guide..

Myth and VDR (through EEPG plugin) both support Freesat EPG, so they can maybe used as some reference ??


- opdenkamp - 2010-11-10

this is not possible at the moment.

I'll have a look at what the myth and vdr plugins are doing later, but I'm not going to implement that in the tvheadend addon itself. Something like that should be not be handled by the pvr addon, but rather by xbmc itself. Would even be better to create a new type of addon for that, because this is essentially the same as scraping (but going into a different database and based on different input).

Better wait with these changes to the internals until pvr is integrated in the master branch tho (and not on my github repos but the official one).


- opdenkamp - 2010-11-10

I had planned new ppa builds for today, but the launchpad system is acting up (again...) and doesn't handle binary changes to the source properly. That bug was fixed in maverick, but the launchpad servers are running lucid and are rejecting my latest uploads (ref: https://lists.ubuntu.com/archives/ubuntu-devel-discuss/2010-September/012089.html )

I'll create new binary sources tonight and upload those, but I'll have to clear out some space first. That could result in apt-get update failing on my ppa for an hour or so. If you see that, just ignore it and try again later.

edit:
when I was reading I missed that the fix for this issue with dpkg has already been backported and is in the proposed repos now. new packages coming soon Smile
ref: https://bugs.edge.launchpad.net/ubuntu/+source/dpkg/+bug/633015

edit2:
and now I see that launchpad is running karmic instead and lucid on the other build envs so it's not that easy. hmm... Smile

now that I'm thinking about it, this is pretty logical. shouldn't do these things in a 5 minute break at work Smile

edit3:
and this approach doesn't work either, because the change is in the control file which can't be extracted because of this bug. annoying.