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

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Announcements, Info, and General Discussion (/forumdisplay.php?fid=85)
+--- Forum: Tips, tricks, and step by step guides (/forumdisplay.php?fid=110)
+--- Thread: [Linux] HOW-TO watch Live TV in XBMC for Linux with Tvheadend, the easy way! (/showthread.php?tid=91716)



- NiPiN³ - 2011-04-13 08:19

dushmaniac Wrote:try this. create a file ~/.xbmc/userdata/advancedsettings.xml (if you don't already have it) and put this in it:
Code:
<pvr>
  <inputstreamdelay>500</inputstreamdelay>
</pvr>
this will delay the playback of pvr streams by 500ms. changing channels will be a bit slower, but you shouldn't get buffer underruns anymore. if you still get them, increase the value to 1000 and check again. it's not a real solution, but a work around until I fixed buffering properly there.

Ok thanks. Added the lines to my advancedsettings, but even at 1500 it makes no difference.

It looks like the video stutter starts when this line appears in the log file:
- 08:10:33 T:2874362736 M:1394524160 DEBUG: CPullupCorrection: pattern lost on diff 80000.000000

Edit: Tested some more and every time the stutter starts at the exact moment these lines appear in the logs (first 2 on the digital tuner and the last 1 on the analog tuner):
- root@xbmc:~# tail -f /home/xbmc/.xbmc/temp/xbmc.log | grep "pattern lost on"
- 08:26:09 T:2874362736 M:1399791616 DEBUG: CPullupCorrection: pattern lost on diff 80000.000000
- 08:31:22 T:2874362736 M:1392136192 DEBUG: CPullupCorrection: pattern lost on diff 80000.000000
- 08:35:17 T:170564464 M:1401536512 DEBUG: CPullupCorrection: pattern lost on diff 80000.000000

Edit2: When using the UPC digital "Testbeeld" channel. No moving video, no sound:
- Wed Apr 13 08:39:27 CEST 2011
- root@xbmc:~# tail -f /home/xbmc/.xbmc/temp/xbmc.log | grep "pattern lost on"
- 08:45:09 T:170564464 M:1402654720 DEBUG: CPullupCorrection: pattern lost on diff 320000.000000
- 08:45:44 T:170564464 M:1402306560 DEBUG: CPullupCorrection: pattern lost on diff 280000.000000

Edit3: Also noticed the network drops from >900kB/s to <300kB/s when stuttering.


- Nemphys - 2011-04-13 13:28

I don't know if this happens to everybody, but when I switch to a channel that TvHeadend is having a hard time serving (eg. TvHeadend is not responding for some reason or the channel can't be descrambled, etc) and the "Working" popup appears at the bottom, if I try to switch to another channel, XBMC just hangs (freezes) and a kill is required.
Maybe some function to kill the running communication with the backend as soon as a channel switch is requested would fix this (?)
Also, I have noticed that, when first opening XBMC (and the epg update starts running), if I go to Live TV before the update finishes, the program information of the channels is never properly refresh when it does. Instead, scrolling through the list shows the correct epg data for the current channel (and loses it as soon as I scroll to the next), but all the rest remain "no info blah blah".

Btw. some other issues concerning epg and stuff seem much better after yesterday's commits (haven't found the time to thoroughly check, though), keep it up!


- Nemphys - 2011-04-13 18:21

OK, just did a check including the last commits and the second issue on my previous post seems to be gone (nice work!)
I just noticed that the double "scheduled" and "recording icon" problem is solved in the main epg window, but it is still there on the OSD EPG window (epg while watching a channel).

One more thing (TvHeadend related, but I don't know where else to post it; the tvheadend tracker does not seem to get much attention):

I can't get TvHeadend to scan channels from a specific provider (DVB-T SD; DVB-S2 works just fine). I manually enter the muxes (since the list for my country, Greece, is outdated and has just one provider), I see the adapter "change to status OK" in the log, but no services are detected.
I finally created the required files manually (yes, that what a mess) and I can watch the channels fine now, but I have problems in recording. The sound is fine, but the video stream either stutters or does not display at all.
I think it has to do with the service settings I created manually, because I just copied some settings from w_scan's results (btw w_scan finds the services fine), but there is a setting ("pmt") that I couldn't find anywhere in those.

Any help would be appreciated... (why doesn't TvHeadend just have a complete scan, like all others, or maybe accept w_scan files for configuration?).


- Nemphys - 2011-04-14 11:11

Wow, this is getting much better, I suppose it will be ready for merging in main XBMC really soon!

Haven't had time to check yesterday's commits (which look very promising by the descriptions), but my latest tests had very good results.

Just 3 things:
1) When editing a timer that was created through epg, the displayed channel is wrong (though the correct channel is displayed in epg views and is actually recorded). Generally, editing a timer has it's issues (eg, try to disable the timer and XBMC hangs).
2) When a recording starts, the main menu popup is properly refreshed to display "Now recording" with the correct info, but it refreshes according to the epg programme time (not the ACTUAL recording time, since I set TvHeadend to start recording 5 minutes before the programme start time). This is just an enhancement, wouldn't consider it a bug. Also, for a scheduled recording for eg. 10:30 am, the popup refreshed at 10:31 am.
3) When a recording ends, the Recordings menu is not automatically refreshed to include it, but a manual refresh (just pressing OK on the menu), makes it appear.

(Btw, both recording and scheduled icons are still appearing on the OSD EPG, I edited the xml file "DialogPVRGuideOSD.xml" according to your other commit for ViewsPVR.xml and it fixed it. )

I want to thank you once more for the effort you put in this, I am really grateful.


- opdenkamp - 2011-04-14 11:31

1) known issue. have been investigating it yesterday but didn't find the cause yet. I can see the info is updated, but not being displayed in the home window. I think I know the cause, but haven't fixed it yet.
2) same issue
3) I'll check it out.

I'll fix the double icons in the osd later today. Or send me a pull request for your fix Smile


- _BJ1 - 2011-04-14 23:04

TV-Setup: "EPG Daten löschen und neu einlesen" (something similar like "Delete EPG-Data and reload") don't work. Nothing happens.

_BJ1


- opdenkamp - 2011-04-15 01:23

thanks for the report. if you don't have any custom channel settings in xbmc, reset the whole pvr database for now. that one works.

edit:
fixed in https://github.com/opdenkamp/xbmc/compare/885ca56bcb...dbf4251ec8
will be included in the next build


- Nemphys - 2011-04-15 19:46

Getting better and better every day!
There is still a problem with the refreshing of the Next/Now Recording popup in the main menu: it does not refresh when a timer is added/removed. Eg. when the next scheduled recording is "Show 1" and I add a schedule for "Show 2" which starts before "Show 1", the popup still displays "Show 1" as the next recording.


- opdenkamp - 2011-04-15 20:05

yeah known issue


- jack burton - 2011-04-15 21:36

jack burton Wrote:Hi all,
i successfully installed xbmc-dharma pvr as described on the first post of this thread, i've only two problems:
- live tv is choppy : it seems like the player continuosly try to synchronize the video flow ... alternating slow and fast reproduction ...
- if i don't set "vertical sync" in video settings, in the home page i have 90-100 fps and the cpu load is constantly 100%... This didn't happen before the last upgrade of xbmc..

I'll post a log in the evening,
Thank you.

dushmaniac Wrote:@danz0l:
after configuring your grabber, try executing it (again, as user hts) and check the output on the console. if your grabber has some debugging option, enable it.

@NiPiN³:
try this. create a file ~/.xbmc/userdata/advancedsettings.xml (if you don't already have it) and put this in it:
Code:
<pvr>
  <inputstreamdelay>500</inputstreamdelay>
</pvr>
this will delay the playback of pvr streams by 500ms. changing channels will be a bit slower, but you shouldn't get buffer underruns anymore. if you still get them, increase the value to 1000 and check again. it's not a real solution, but a work around until I fixed buffering properly there.

i still have the issue described above also after the introduction of the delay..
i paste-bin the log when i started playing the channel (33 fps with stuttering)

http://pastebin.com/e8d0bXXU


Thank you


- opdenkamp - 2011-04-16 16:06

Nemphys Wrote:Getting better and better every day!
There is still a problem with the refreshing of the Next/Now Recording popup in the main menu: it does not refresh when a timer is added/removed. Eg. when the next scheduled recording is "Show 1" and I add a schedule for "Show 2" which starts before "Show 1", the popup still displays "Show 1" as the next recording.
fixed in https://github.com/opdenkamp/xbmc/commit/a49d3f5336940c8a69e22a29ad2f80d08154bb39
will be included in the next build


- Nemphys - 2011-04-16 17:59

dushmaniac, you ROCK!
Totally fixed... (even updates in realtime when a timer is updated through the TvHeadend backend)
Now, maybe you can do something about the epg search function? It doesn't seem to work at all... (or maybe I am doing something wrong?)


- danz0l - 2011-04-16 22:23

Silly question guys but how do you use regex in tvheadend to ignore part of a title ?

Say i want WIFE SWAP but not WIFE SWAP USA in the auto recorder.

I tried wife swap ^USA and wife swap [^USA) and all combination but it insists on finding all of them LOL. I know the author isnt here but just curious what or how people would avoid the USA part ?

Loving the PVR branch so much. Sure its hot its bugs (latest TV and Movies puthon script for homepage doesnt display images etc) and it will crash and restart if i reset the PVR database but all in all it functions so well. Well done Smile

dushmaniac you have done an amazing job my friend and have my utter most admiration and praise. Thank you so much ..


- janumix - 2011-04-16 22:54

Hi

Thanks Dushmaniac for update !

It seems there are still some problems with timers. Trying to add it manualy causes xbmc to crush. Nothing has been stored in tvheadend, now. On previous version xbmc crushed, too but timer has been set up in tvheadend but with incorrect channel number.

Here is log

xbmc: 2:11.0-pvr+odk22~git20110415.248d3f1-0ubuntu1~ppa+odk22~lucid


Regards
Janusz


- opdenkamp - 2011-04-17 12:56

@janumix
fixed in https://github.com/opdenkamp/xbmc/commit/c80f44694e9ca18185967027af641cc81ad3414d
will be included in the next build

@danz0l
no idea about the regex
the python scripts have nothing to do with pvr but with changes in mainline and, from what I heard, wrong usage of python methods within those scripts.