Kodi Community Forum
New MythTV add-on using libcmyth - Printable Version

+- Kodi Community Forum (http://forum.kodi.tv)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: PVR Development (/forumdisplay.php?fid=136)
+--- Thread: New MythTV add-on using libcmyth (/showthread.php?tid=110694)



RE: New MythTV add-on using libcmyth - janbar - 2012-10-09 00:38

(2012-10-06 03:32)Aubrien Wrote:  Cool, thanks Janbar. As I mentioned earlier, you know more about this than me and I trust what you are doing. I just happen to have a setup that takes about 3s between shows and about 8s for channel switches so I have been looking into this for a while hoping for a good solution. I should be the perfect person for testing this once you are ready. I use a Hauppague HD-PVR which is pretty common so I imagine others are out there with the same issues as me.

I agree that the locks can get hung forever (I've seen this) and the front end hangs forever unless we have a max timeout. I didn't think about adding those additional events but I like it better than what I was doing. I'm really more of a .NET developer that C++ but I figured I'd play around since I know enough to be dangerous.

It is not yet resolve. my commit is bad. i trying now. I tell you soon when it will be ok. 1 hour


RE: New MythTV add-on using libcmyth - Aubrien - 2012-10-09 04:14

Thanks janbar. I been at work all day but I just managed to get you a log of a show transition. It freezes the frontend while the backend continues to record. I sent the log via email.


RE: New MythTV add-on using libcmyth - Aubrien - 2012-10-09 07:53

Janbar,
I compiled a fresh XBMC as well as your current master with all of your changes from this evening and it looks like we are almost there. As you know, the channel change delay is not in your master but the buffer delay is. As I was hoping, the buffer delay code also fixes the channel change delay since it is the same thing as the delay between shows. I can now tune and it fills the buffer until it can start playback.

I am having a couple issues still though. When I start playback from nothing it can take 45s for it to tune while it very very slowly fills the buffer. That is way higher than it should take. Once tuned, the buffer is really low and the slightest disturbance will make it buffer. When it is having to re-buffer, it is really slow (1% every 2s or so). As soon as it starts playback again (it will start playback when the buffer is at ~10%) it has to buffer again in about for 1s for about 15s. The cycle just continues..buffer 15s...playback for <1s...loop. It is buffering over 95% of the time. I think there is something making the buffering code be very slow which is causing all of the issues I am seeing.

It looks to be buffering when it needs to now, just at a very slow pace. Once we get the buffering working at a regular rate I may have additional feedback, but it is hard to do much since it has to buffer almost the entire time. An additional idea may be to have a min buffer size, so if it does have to buffer it will grab at least a certain amount of data before starting playback again. It may increase tuning time to have no buffer, but it is just too unstable imo. I'm not even talking about a big min buffer size either. Just something though. I feel like as soon as it has a byte of data it plays it back and re-empties the buffer again causing the slow re-buffer.

As always, thanks for the hard work. I can tell we are almost there.


RE: New MythTV add-on using libcmyth - janbar - 2012-10-09 16:37

@aubrien,

Great, we go on. Now we know that timeout has the good place.
Also now you have seen we have a new issue since merge. We have the explanation. The connexion hang during the loading of artwork and fanart. Cfetzer and me are working on it. Probably we decide to suspend loading of artwork during playback.
I have removed temporary the timeout to investigate on this new issue. But now i insert it again. Thanks for your feedback.
Br


RE: New MythTV add-on using libcmyth - dteirney - 2012-10-09 22:05

(2012-10-08 13:49)janbar Wrote:  @dteirney: I read your commit. It is a way. But i think we must to find a solution without use backend's database at least for liveTV. Would not be better to use only Mythtv protocol ?

Yes, much better to use protocol. See http://trac.xbmc.org/ticket/11082 for further discussion about that. Another community member submitted the database approach. I haven't had time to check to see if any of the server generated Myth Protocol events could be used to detect whether a DUMMY tuner was still being used and wait until a proper tuner had been allocated before reading. Surely there must be one. I hardly use LiveTV so haven't looked much into that area.


RE: New MythTV add-on using libcmyth - cfetzer - 2012-10-09 23:10

Hi,

We've combined now all our changes (including the fixes for the program breaks) into https://github.com/fetzerch/xbmc-pvr-addons/.
Time for some extensive testing :-) Let us know if everything works for you or if you experience problems (like crashes or freezes).

Cheers,
Christian


RE: New MythTV add-on using libcmyth - jskube - 2012-10-10 02:17

@cfetzer

Setup - Myth 0.25 w/ two PCIe Ceton Cablecard Tuners

I have done some testing so far with your latest update and overall everything seems to be working fine but a few hiccups.

1. The addon no longer downloads all of my channel icons. The default mythtv icons transfer fine but my custom ones do not. Only difference I see between the two is the stock ones are .jpg and my custom ones are .png.

2. A lot of my recording thumbnail don't load and I get just the default movie reel icon.

3. I get a lot of craziness in my logs which I think pertains to the problem above:

Code:
20:10:10 T:139791916066560   DEBUG: AddOnLog: MythTV cmyth PVR Client: GetPreviewIconPath: preview icon: /1640_20120918145700.mpg.png
20:10:10 T:139791916066560   DEBUG: AddOnLog: MythTV cmyth PVR Client: GetPreviewIconPath: preview icon: /1670_20120827162700.mpg.png
20:10:10 T:139791916066560   DEBUG: AddOnLog: MythTV cmyth PVR Client: IsRecordingVisible: Ignoring recording /1683_20121009003005.mpg
20:10:10 T:139791916066560   DEBUG: AddOnLog: MythTV cmyth PVR Client: GetPreviewIconPath: preview icon: /1640_20120926135700.mpg.png
20:10:10 T:139791916066560   DEBUG: AddOnLog: MythTV cmyth PVR Client: GetPreviewIconPath: preview icon: /1507_20120907192700.mpg.png
20:10:10 T:139791916066560   DEBUG: AddOnLog: MythTV cmyth PVR Client: GetPreviewIconPath: preview icon: /1670_20120902212700.mpg.png
20:10:10 T:139791916066560   DEBUG: AddOnLog: MythTV cmyth PVR Client: GetPreviewIconPath: preview icon: /1621_20120923125700.mpg.png
20:10:10 T:139791916066560   DEBUG: AddOnLog: MythTV cmyth PVR Client: GetPreviewIconPath: preview icon: /1622_20121002155700.mpg.png
20:10:10 T:139791916066560   DEBUG: AddOnLog: MythTV cmyth PVR Client: GetPreviewIconPath: preview icon: /1640_20120823195700.mpg.png
20:10:10 T:139791916066560   DEBUG: AddOnLog: MythTV cmyth PVR Client: GetPreviewIconPath: preview icon: /1670_20120912122700.mpg.png
20:10:10 T:139791916066560   DEBUG: AddOnLog: MythTV cmyth PVR Client: GetPreviewIconPath: preview icon: /1664_20120926105700.mpg.png
20:10:10 T:139791916066560   DEBUG: AddOnLog: MythTV cmyth PVR Client: GetPreviewIconPath: preview icon: /1670_20120908132700.mpg.png
20:10:10 T:139791916066560   DEBUG: AddOnLog: MythTV cmyth PVR Client: GetPreviewIconPath: preview icon: /1670_20120914155700.mpg.png
20:10:10 T:139791916066560   DEBUG: AddOnLog: MythTV cmyth PVR Client: GetPreviewIconPath: preview icon: /1670_20120831162700.mpg.png
20:10:10 T:139791916066560   DEBUG: AddOnLog: MythTV cmyth PVR Client: GetPreviewIconPath: preview icon: /1690_20120830031400.mpg.png
20:10:10 T:139791916066560   DEBUG: AddOnLog: MythTV cmyth PVR Client: GetPreviewIconPath: preview icon: /1622_20120909065700.mpg.png
20:10:10 T:139791916066560   DEBUG: AddOnLog: MythTV cmyth PVR Client: GetPreviewIconPath: preview icon: /1664_20120927105700.mpg.png
20:10:10 T:139791916066560   DEBUG: AddOnLog: MythTV cmyth PVR Client: GetPreviewIconPath: preview icon: /1640_20120906025800.mpg.png
20:10:10 T:139791916066560   DEBUG: AddOnLog: MythTV cmyth PVR Client: GetPreviewIconPath: preview icon: /1622_20120906155700.mpg.png
20:10:10 T:139791916066560   DEBUG: AddOnLog: MythTV cmyth PVR Client: GetPreviewIconPath: preview icon: /1508_20120904233200.mpg.png
20:10:10 T:139791916066560   DEBUG: AddOnLog: MythTV cmyth PVR Client: GetPreviewIconPath: preview icon: /1670_20120826235700.mpg.png
20:10:10 T:139791916066560   DEBUG: AddOnLog: MythTV cmyth PVR Client: GetPreviewIconPath: preview icon: /1670_20120905192700.mpg.png
20:10:10 T:139791916066560   DEBUG: AddOnLog: MythTV cmyth PVR Client: GetPreviewIconPath: preview icon: /1670_20120831155700.mpg.png
20:10:10 T:139791916066560   DEBUG: AddOnLog: MythTV cmyth PVR Client: GetPreviewIconPath: preview icon: /1711_20120821225800.mpg.png
20:10:10 T:139791916066560   DEBUG: AddOnLog: MythTV cmyth PVR Client: GetPreviewIconPath: preview icon: /1622_20120909105700.mpg.png
20:10:10 T:139791916066560   DEBUG: AddOnLog: MythTV cmyth PVR Client: GetPreviewIconPath: preview icon: /1670_20120926192700.mpg.png
20:10:10 T:139791916066560   DEBUG: AddOnLog: MythTV cmyth PVR Client: GetPreviewIconPath: preview icon: /1640_20120924135700.mpg.png

I see thousands upon thousands of entries like that in my log, it seems to never stop.

Other then those problems my channel changes are much quicker and so far it hasn't stopped playing after then end of a show.

EDIT:

I may have spoken too soon on issues number 2 and 3. It seems I only see those DEBUG lines when I am not watching live tv and it may be caused by me having a little over 1200 recordings. I will report back after I let it hang out without tv playing for a while.


RE: New MythTV add-on using libcmyth - robweber - 2012-10-10 14:58

@jskube - someone can correct me if I'm wrong here but those log messages are probably normal. When not currently watching TV the addon will attempt to download your preview icons from your recorded shows so that they can display in XBMC. Since you have so many shows this is likely taking a while.

@cfetzer - do you have a recommended XBMC build to test this against? I used the 10/9/2012 nightly build of XBMC (Win 7) against your current repo and it did not work. The cmyth addon could not be loaded and then XBMC crashed. May be just be an unstable nightly as I was running your current builds for days with no issues before that. If you have a recommended "stable" nightly that has the correct PVR API version that would help with my testing. Thanks!


RE: New MythTV add-on using libcmyth - jskube - 2012-10-10 16:05

(2012-10-10 14:58)robweber Wrote:  @jskube - someone can correct me if I'm wrong here but those log messages are probably normal. When not currently watching TV the addon will attempt to download your preview icons from your recorded shows so that they can display in XBMC. Since you have so many shows this is likely taking a while.

@cfetzer - do you have a recommended XBMC build to test this against? I used the 10/9/2012 nightly build of XBMC (Win 7) against your current repo and it did not work. The cmyth addon could not be loaded and then XBMC crashed. May be just be an unstable nightly as I was running your current builds for days with no issues before that. If you have a recommended "stable" nightly that has the correct PVR API version that would help with my testing. Thanks!

I had the same issue. I did a fresh pull off of the main xbmc git and everything worked fine after that.


RE: New MythTV add-on using libcmyth - kburkart - 2012-10-10 16:57

Hey jskube,

What kind of channel change time are you seing with this new build? is it comparable to mythfrontend?

Thanks,
Kevin


RE: New MythTV add-on using libcmyth - pyrodex - 2012-10-10 18:56

Could someone compile a version for Windows 7 (64 bit)? I'd love to test this out on my box.


RE: New MythTV add-on using libcmyth - robweber - 2012-10-10 19:14

(2012-10-10 18:56)pyrodex Wrote:  Could someone compile a version for Windows 7 (64 bit)? I'd love to test this out on my box.

http://mirrors.xbmc.org/nightlies/win32/


RE: New MythTV add-on using libcmyth - Ayla - 2012-10-10 19:17

Could someone give pointers (a short tutorial) on how to compile this addon for Mac (OS X)?

Would really appreciate it, and would love to help out with the testing Smile

Also, I'm using the latest nightly OS X builds from xbmc.org, are they OK to use with this addon?


RE: New MythTV add-on using libcmyth - Aubrien - 2012-10-10 19:36

I see alot of you are using the Ceton cards and HDHomeRun. I can't use those because DISH Network doesn't have CableCards. Actually, only terrestrial cable is required to provide those so nobody with sattellite can get an mcard. But before I switched to DISH for all of the extra channels and lower prices I was looking into one of these CableCard tuners when I had Time Warner and Comcast. I was a little reluctant to invest in them though since you can only use channels that are flagged as copy freely. It also looked like any channel labeled as copy freely can change at any time if the cable company wants to as well. There is basically no promises that it will work tomorrow. I didn't like the sound of that. Also all of my premium channels wouldn't be able to be tunned to with those capture devices using xbmc and mythbackend since they are flagged copy once/never. Are any of you experiencing this issue? For example can you watch HBO, Cinemax, Shotime, etc. with this setup? I'm currently using the analog loophole with a set top box and HD PVR to strip the DRM, but I have a friend with TWC asking what card to get. If I tell him that he cant get some channels to work without being forced to do playback through an "approved media extender" (not xbmc/mythbackend) then he wont be happy. Thanks


RE: New MythTV add-on using libcmyth - janbar - 2012-10-10 19:41

(2012-10-10 16:57)kburkart Wrote:  Hey jskube,

What kind of channel change time are you seing with this new build? is it comparable to mythfrontend?

Thanks,
Kevin
Hi, yes it is. Just 1~3 sec more depending of stream type. But this overhead is related to the demuxer ffmpeg included with xbmc.

@all mac users
About OsX, i had started to build it and stop. Now i have more time since we have resolved major issues. I'll post a tuto for mac user. Br