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

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



RE: New MythTV add-on using libcmyth - hatta - 2013-06-23

I am experiencing segfaults when trying to watch live TV in XBMC via cmyth. MythTV is set up on the same machine and works well. I am using the built in cmyth frontend in XBMC. I am using the most recent versions in the deb-multimedia repository. XBMC 12.2 and mythtv 0.26.0+fixes.

90% of the time when I try to watch live TV, XBMC segfaults instantly. 9% of the time it tries to play the mpeg stream, but it's choppy and blocky, and freezes within a minute. about 1% of the time it appears to work. I cannot find any conditions that determine which of these is going to happen. I've pasted a typical crash log here with debug, and cmyth debug enabled: http://xbmclogs.com/show.php?id=31208

cmyth appears to be failling to create a recording here:

Quote:09:34:31 T:140610816005888 DEBUG: AddOnLog: MythTV cmyth PVR Client: LibCMyth: (cmyth)cmyth_proginfo_create }
09:34:31 T:140610845533952 DEBUG: AddOnLog: MythTV cmyth PVR Client: LibCMyth: (cmyth)__cmyth_rcv_length: buffer is '5 ' ret = 5
09:34:31 T:140610845533952 DEBUG: AddOnLog: MythTV cmyth PVR Client: LibCMyth: (cmyth)__cmyth_rcv_string: string received 'ERROR'
09:34:31 T:140610845533952 ERROR: AddOnLog: MythTV cmyth PVR Client: LibCMyth: (cmyth)cmyth_proginfo_get_from_timeslot: didn't recieve OK as response
09:34:31 T:140610845533952 DEBUG: AddOnLog: MythTV cmyth PVR Client: Unlock 1610706832
09:34:31 T:140610845533952 DEBUG: AddOnLog: MythTV cmyth PVR Client: Lock 1610706832
09:34:31 T:140610845533952 DEBUG: AddOnLog: MythTV cmyth PVR Client: Lock acquired 1610706832
09:34:31 T:140610845533952 DEBUG: AddOnLog: MythTV cmyth PVR Client: Unlock 1610706832
09:34:31 T:140610845533952 DEBUG: AddOnLog: MythTV cmyth PVR Client: IsConnected - true
09:34:31 T:140610845533952 ERROR: AddOnLog: MythTV cmyth PVR Client: EventUpdateRecordings - Add recording failed for 1000 1372019671
09:34:31 T:140610816005888 DEBUG: AddOnLog: MythTV cmyth PVR Client: LibCMyth: (cmyth)__cmyth_send_message
09:34:31 T:140610816005888 DEBUG: AddOnLog: MythTV cmyth PVR Client: LibCMyth: (cmyth)__cmyth_send_message: sending message '42 QUERY_RECORDER 1[]:[]GET_CURRENT_RECORDING'

I'm not sure where to proceed from here. The mythtv logs are empty for some reason. But it shouldn't be a mythtv problem, because mythtv works fine. Any ideas?


RE: New MythTV add-on using libcmyth - fetzerch - 2013-06-23

Please build the dev version of the addon from github.com/fetzerch/xbmc-pvr-addons (branch frodo) as described here: http://wiki.xbmc.org/index.php?title=PVR/Backend/MythTV/BuildFromSource
The addon should report version 1.6.11 in XBMC's addon manager. Let me know if that version works for you.

If it still crashes, install gdb and make it crash again. XBMC should then generate ~/xbmc_crashlog_*.log which is basically the log + a stack trace that can help to find the reason for
the crash.


RE: New MythTV add-on using libcmyth - fetzerch - 2013-06-27

(2013-06-09, 10:58)cfetzer Wrote: I've updated the development repository to work with API 1.8.0: https://github.com/fetzerch/xbmc-pvr-addons
A bit on the background of this API change: https://github.com/xbmc/xbmc/pull/2812
So far we were not able to add MythTV specific context menu entries because we had no access to the selected item.
No we get the selection and can add such things as "Delete and rerecord recording". I'll let you know when there is something to test :-)

Just pushed the "Delete and re-record" menu entry to the development branch at github.com/fetzerch/master.
This was requested a couple of times already; PVR API 1.8.0 (and a bit of help from janbar) made this possible now.
If you want to test this: Go to the recordings list, open the context menu for the recording you want to re-record -> "Client actions" -> "Delete and re-record"

(Gotham only, not for Frodo unfortunately)

Cheers,
Christian


RE: New MythTV add-on using libcmyth - janbar - 2013-06-28

@tdavis or anybody interesting to test a new commbreaks/cutlist management.

I made a new method to manage commbreak and cutlist into the addon on pre-processing. It is based on frame offsets instead time and could be help people living in US where they have non constant frame rates. Also anybody using RPI or android could help by testing it on these hardware.
Actual dev branch is for Gotham only, but it could be merged to frodo. To get it:

git clone -b internal_edl https://github.com/janbar/xbmc-pvr-addons.git

This branch was rebased with the new master from cfetzer. Once compiled and zip installed start XBMC and go to configuration screen of addon. Then select "Internal" for the new setting "EDL method provider" (the last setting at the bottom of the list). Save setting and restart XBMC. Now recording playback use the new EDL method.

Thanks for your feedback.


RE: New MythTV add-on using libcmyth - teeedubb - 2013-06-28

(2013-06-28, 10:52)janbar Wrote: @tdavis or anybody interesting to test a new commbreaks/cutlist management.

I made a new method to manage commbreak and cutlist into the addon on pre-processing. It is based on frame offsets instead time and could be help people living in US where they have non constant frame rates. Also anybody using RPI or android could help by testing it on these hardware.
Actual dev branch is for Gotham only, but it could be merged to frodo. To get it:

git clone -b internal_edl https://github.com/janbar/xbmc-pvr-addons.git

This branch was rebased with the new master from cfetzer. Once compiled and zip installed start XBMC and go to configuration screen of addon. Then select "Internal" for the new setting "EDL method provider" (the last setting at the bottom of the list). Save setting and restart XBMC. Now recording playback use the new EDL method.

Thanks for your feedback.

Any chance of getting these changes for Frodo? I'd love to test but Gotham crashes alot for me Sad


RE: New MythTV add-on using libcmyth - janbar - 2013-06-29

Hi, yes it Is possible. I Will merge to frodo branch. But this week-end i am not at home. I Will doing it on sunday evening. Br.


RE: New MythTV add-on using libcmyth - teeedubb - 2013-06-29

Thanks, comskip for frodo would be awesome. Would it be as simple as cherry picking the commit into the frodo dev branch?


RE: New MythTV add-on using libcmyth - janbar - 2013-06-29

(2013-06-29, 02:34)teeedubb Wrote: Thanks, comskip for frodo would be awesome. Would it be as simple as cherry picking the commit into the frodo dev branch?

Not so simple. Because i reused some already defined type from master branch, but they don't exist in frodo branch.


RE: New MythTV add-on using libcmyth - janbar - 2013-07-01

@teeedubb

Hi. I finished to merge with frodo branch. The new branch with EDL support for frodo is "frodo_internal_edl".

git clone -b frodo_internal_edl https://github.com/janbar/xbmc-pvr-addons.git

Think to select "Internal" for the new setting "EDL method provider". The default choice is "None" in frodo branch. And then restart XBMC to get the new settings.


RE: New MythTV add-on using libcmyth - teeedubb - 2013-07-01

Awesome, thanks janbar. I'll compile openelec with the new add on tonight.

Thanks again janbar, and all the others that have contributed. This add on just keeps getting better Smile


RE: New MythTV add-on using libcmyth - teeedubb - 2013-07-01

It works! Seeing a ad skipped automatically for the first time is magical Smile Thanks!


RE: New MythTV add-on using libcmyth - janbar - 2013-07-02

(2013-07-01, 10:14)teeedubb Wrote: It works! Seeing a ad skipped automatically for the first time is magical Smile Thanks!

Currently i cut just before the commbreak start until just after the commbreak end (+/- 0.5s). But what would be better ? to cut after the start instead , until just before the end ?


RE: New MythTV add-on using libcmyth - teeedubb - 2013-07-03

Janbar, I haven't been able to test alot as myth's built in commercial detection doesn't work to well here in australia and I need to get another method working, but from what I've seen maybe its better to cut after start and before the end so that the viewer knows that there has been a ad break. Currently it is very seamless, especially if the show doesn't display a full screen logo before/after the ad break, and is easy to miss.


RE: New MythTV add-on using libcmyth - simora - 2013-07-03

@janbar
I used your code and it was fantastic. Wife was very excited. Great job. as far a 0.5s here or there, I thought the skip was good. I like the seamless behavior of it as it is now.

Is there a way for people like teeeedubb to temporarily disable the use of the internal edl on a per playback basis? i'm sure you can go through and set the edl setting back to none, restart the addon and begin watching again but something easier would be better. I'm not sure what the big picture vision for edl use is. If the automatic use of edl internal could be disabled in favor of a manual skip forward past commercial function than teeedubb could use edl when it works for him and not when it doesn't. Every once in a while I like to watch a couple commercials to remind myself how much better life is in the age of the dvr.


RE: New MythTV add-on using libcmyth - simora - 2013-07-03

@cfetzer

Any update on the epg memory leak?

Any strategy to solve the "stop playback 30s before recording" business yet? You mentioned you might have to interface with the scheduler. When you watch livetv playback from the mythtv-frontend I would assume the server starts recordings on the next available tuners and informs the clients if they need to be dropped due to a conflict. Can that be arranged with the addon?