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)



- Jimmer - 2011-10-16

dubstar_04 Wrote:I've not experienced this. The only time I have missing recordings is when they have been added since xbmc started and the library hasn't been updated.

Oh, does updating the library pull in stuff from the pvr-backend as well? I thought they were independent..... I thought xbmc periodically checked the backend and thus updated itself regularly.....

Jim

edit: just updated library and this morning's Korean F1 just showed up. I guess you could run a script with xbmc-send on the backend to update the xbmc library on recording something, but that seems convoluted to me....

PS don't tell me anything about the F1 - haven't watched it yet!


CMyth Video - dubstar_04 - 2011-10-16

Due to so many people being interested in seeing the add-on in action i have made a quick screen recording.

you can find the video here:

http://www.youtube.com/watch?v=1gA7YpbyxNM


tsp42: can you add a link to this on the opening post?

If anyone wants to see anything in particular let me know and i can make a proper video with music and stuff!!

I have also written tutorials on installing mythtv and compiling xbmc with cmyth that you could add to the opening post if your interested?


- dubstar_04 - 2011-10-16

compile error in the latest git:

http://paste.ubuntu.com/710005/

ignore this!!!!!

a 'make clean' and another pull has sorted it!!

sorry!!

P.S. 200 posts!!


- tsp42 - 2011-10-17

I've merged Dushmaniac with my repository so it should now be up to date with xbmc mainline. I've also added support for updating the records and timer s in the add-on when the backend announces changes to these. I'm not sure it will fix the issue mronkko and Jimmer is seeing.

deadite66: I will see if there are anything I can do to lower the cpu utilization. however the atom processor it not exactly the most powerfull cpu around but at least the power utilization doesn't increase with higher load.

fiveisalive: Dteirney's plugin uses the mythxml data interface to get information about the recordings and program guide. The interface doesn't support scheduling of recordings. The MythXML interface has been replaced with a new API in the current development version of MythTV (ver. 0.25). The new API will support scheduling of recordings etc and I plan to support it instead of libcmyth when 0.25 is released.
The libcmyth library takes care of the communication with the mythtv backend though the MythProtocol and the MySQL server. This expose the majority of the mythtv features (including the scheduling of recordings). I'm not sure how active the development of libcmyth are at mvpmc (last update was 11 months ago and in its current form MythTV 0.24 is not supported). The libcmyth library is also used by the xbmc virtual filesystem in mainline. For more information about the status of libcmyth please see 386 (PR). I plan to push the changes I made to libcmyth to mainline when the code is more mature.

dubstar_04: Thanks for the video. I will add it to the first post. I would be happy to also add your tutorial to the post if you send it to me.

mronkko: I've looked though the log and it looks like xbmc jumps to the end of the video when the stepforward command is recieved. Does the same happen when you use the fast forward button on the GUI? I will try to add some more debug info into the code that should produce a more informative log.


- stevellion - 2011-10-17

Wow! - Fantastic.


- stevellion - 2011-10-17

Darn it.. Just compiled up the latest git - and it has the thumbnail tears issue in it.. Sad Maybe I compiled something wrong.

Ignore me.. old version in /usr/local - new version in /usr... duh.


- Jimmer - 2011-10-17

Well, can report:

a) Thumbnail corruption seems to be a thing of the past

b) Crash 10 seconds after entering movie library fixed

c) Crash immediately on entering music library fixed

d) testing the recordings automatically showing up now.... will report back after I have recorded a few shows... edit: have checked this on multiple recordings, seems to be working perfectly now.

Thanks for all your hard work!

Jimmer


- fiveisalive - 2011-10-18

Current git master fails compilation with:

Code:
tools.cpp: In static member function ‘static uint64_t cTimeMs::Now()’:
tools.cpp:50: error: ‘LOG_DEBUG’ was not declared in this scope
tools.cpp:54: error: ‘LOG_ERROR’ was not declared in this scope
tools.cpp:57: error: ‘LOG_DEBUG’ was not declared in this scope
tools.cpp:60: error: ‘LOG_ERROR’ was not declared in this scope
tools.cpp:66: error: ‘LOG_ERROR’ was not declared in this scope

in the xbmc/pvrclients/mythtv-cmyth directory. Looks like tools.cpp is missing a:

Code:
using namespace ADDON;



- fiveisalive - 2011-10-18

I'm getting crashes when editing the Configuration dialog for the myth-cmyth PVR plugin. Specifically when editing the IP address. It happens sporadically, but usually after about 1-2 minutes. See pastebin:

http://fpaste.org/NSgu/


- fiveisalive - 2011-10-18

Also another semi-reproducible crash, upon selecting "Reset EPG", it starts loading the EPG from the backend, and gets half-way through then crashes:

http://fpaste.org/MrhO/

Actually here's a better pastebin, that shows the crash with the extra myth debugging enabled. In this case, I had reset the "Live TV" support to off, then re-enabled it, and it again crashed (I think during the EPG scan):

http://fpaste.org/OC8J/

Note sure if it's relevant, but I'm also getting a ton of messages like this in the log:

Code:
01:50:28 T:140386141980416   DEBUG: AddOnLog: MythTV cmyth PVR Client: LibCMyth: (cmyth)cmyth_event_select [event.c:189]: (trace) }
01:50:28 T:140386141980416   DEBUG: AddOnLog: MythTV cmyth PVR Client: LibCMyth: (cmyth)cmyth_event_select [event.c:176]: (trace) {
01:50:28 T:140386141980416   DEBUG: AddOnLog: MythTV cmyth PVR Client: LibCMyth: (cmyth)cmyth_event_select [event.c:189]: (trace) }
01:50:28 T:140386141980416   DEBUG: AddOnLog: MythTV cmyth PVR Client: LibCMyth: (cmyth)cmyth_event_select [event.c:176]: (trace) {
01:50:28 T:140386141980416   DEBUG: AddOnLog: MythTV cmyth PVR Client: LibCMyth: (cmyth)cmyth_event_select [event.c:189]: (trace) }
01:50:28 T:140386141980416   DEBUG: AddOnLog: MythTV cmyth PVR Client: LibCMyth: (cmyth)cmyth_event_select [event.c:176]: (trace) {
01:50:28 T:140386141980416   DEBUG: AddOnLog: MythTV cmyth PVR Client: LibCMyth: (cmyth)cmyth_event_select [event.c:189]: (trace) }
01:50:28 T:140386141980416   DEBUG: AddOnLog: MythTV cmyth PVR Client: LibCMyth: (cmyth)cmyth_event_select [event.c:176]: (trace) {
01:50:28 T:140386141980416   DEBUG: AddOnLog: MythTV cmyth PVR Client: LibCMyth: (cmyth)cmyth_event_select [event.c:189]: (trace) }
01:50:28 T:140386141980416   DEBUG: AddOnLog: MythTV cmyth PVR Client: LibCMyth: (cmyth)cmyth_event_select [event.c:176]: (trace) {
01:50:28 T:140386141980416   DEBUG: AddOnLog: MythTV cmyth PVR Client: LibCMyth: (cmyth)cmyth_event_select [event.c:189]: (trace) }
01:50:28 T:140386141980416   DEBUG: AddOnLog: MythTV cmyth PVR Client: LibCMyth: (cmyth)cmyth_event_select [event.c:176]: (trace) {
01:50:28 T:140386141980416   DEBUG: AddOnLog: MythTV cmyth PVR Client: LibCMyth: (cmyth)cmyth_event_select [event.c:189]: (trace) }
01:50:28 T:140386141980416   DEBUG: AddOnLog: MythTV cmyth PVR Client: LibCMyth: (cmyth)cmyth_event_select [event.c:176]: (trace) {
01:50:29 T:140386141980416   DEBUG: AddOnLog: MythTV cmyth PVR Client: LibCMyth: (cmyth)cmyth_event_select [event.c:189]: (trace) }
01:50:29 T:140386141980416   DEBUG: AddOnLog: MythTV cmyth PVR Client: LibCMyth: (cmyth)cmyth_event_select [event.c:176]: (trace) {
01:50:29 T:140386141980416   DEBUG: AddOnLog: MythTV cmyth PVR Client: LibCMyth: (cmyth)cmyth_event_select [event.c:189]: (trace) }



- fiveisalive - 2011-10-18

I renumbered my channels (as previously suggested, and now Live TV works just fine, and the EPG data seems correct (when I can get it to load). Great! (Although it would be good in the long run if it could handle the subchannels like 2.1 or 2_1).

Getting the EPG data, and having it stay there, seems to be the most unstable of the features. In the cases where I have managed to get the data to completely load (and have set the "save EPG database" to on). If I shutdown and restart xbmc, the data is gone and I have to re-scan (however this will often crash, see above).

Also even with the settings to update EPG every 15 mins (the minimum), I haven't ever seen the add-on attempt to reload the data in the log. When I visit the "EPG" option in the sidebar, I've noticed in the that for some reason the end date is incorrect:

Code:
03:14:54 T:140304998864928   DEBUG: OnKey: 11 (0b) pressed, action is Select
03:14:54 T:140304998864928   DEBUG: CGUIWindowPVRGuide - UpdateData - update window 'epg'. set view to 16
03:14:54 T:140304998864928   DEBUG: CGUIEPGGridContainer - SetStartEnd - start=10/18/2011 3:00:00 AM end=01/01/1601 12:00:00 AM
03:14:54 T:140304998864928   ERROR: CGUIEPGGridContainer - UpdateItems - invalid start and end time set



- stevellion - 2011-10-18

I too am getting the occasional crash while loading the channels & EPG data.

Have switched my main HTPC to this branch now though.

(but still using the myth:// source to watch recordings as they are grouped by Programme)

Thanks!


- dubstar_04 - 2011-10-18

Install XBMC PVR with cmyth Addon for Ubuntu 10.10 (Maveric):

Code:
sudo apt-get install git git-core make g++ gcc gawk pmount libtool nasm yasm automake cmake gperf zip unzip bison libsdl-dev libsdl-image1.2-dev libsdl-gfx1.2-dev libsdl-mixer1.2-dev libfribidi-dev liblzo2-dev libfreetype6-dev libsqlite3-dev libogg-dev libasound-dev python-sqlite libglew-dev libcurl3 libcurl4-gnutls-dev libxrandr-dev libxrender-dev libmad0-dev libogg-dev libvorbisenc2 libsmbclient-dev libmysqlclient-dev libpcre3-dev libdbus-1-dev libhal-dev libhal-storage-dev libjasper-dev libfontconfig-dev libbz2-dev libboost-dev libenca-dev libxt-dev libxmu-dev libpng-dev libjpeg-dev libpulse-dev mesa-utils libcdio-dev libsamplerate-dev libmpeg3-dev libflac-dev libiso9660-dev libass-dev libssl-dev fp-compiler gdc libmpeg2-4-dev libmicrohttpd-dev libmodplug-dev libssh-dev gettext cvs python-dev libyajl-dev libboost-thread-dev libplist-dev autopoint

Code:
git clone https://github.com/tsp/xbmc.git

Code:
cd xbmc

Code:
./bootstrap

Code:
./configure

Code:
make

Code:
make install



- dubstar_04 - 2011-10-18

Rough Guide To Installing Mythtv:

Mythbuntu: Add to Existing Ubuntu Install:

Go to: http://www.mythbuntu.org/download-type

Select 'Add to Existing Ubuntu Install'

Once the install has finished:

Code:
system -> Administartion-> Mythbuntu control centre-> system roles

choose:

primary backend

desktop frontend

click apply

You will be asked a number of questions when installing mythbackend:

Root Password-> leave it blank

Other Computers-> yes

Exclusively for mythweb -> no

Once Installation is complete start mythtv:

Code:
Applications -> sound and video -> mythfrontend

warning box: must be a member of "mythtv" -> click yes, log out

When Logged back in you can go to:

Code:
System-> Administration-> Set up MythTv Backend

Configure your system.

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

Optional: Auto-mounting Media Partitions:

Find Drive Number / Name:

Code:
sudo fdisk -l

Terminal Output:
Device Boot Start End Blocks Id System
/dev/sda1 * 1 5860 47067136 83 Linux
/dev/sda2 5860 91201 685502849+ 5 Extended
/dev/sda5 6104 91201 683549653+ 83 Linux
/dev/sda6 5860 6103 1952768 82 Linux swap / Solaris

In this case the media drive is sda5.

Open the fstab file to add the drive to 'auto mount':

Code:
sudo gedit /etc/fstab

Add something like:

# <file system> <mount point> <type> <options> <dump> <pass>

/dev/sda5 /media/media xfs defaults 0 1

'Drive Name' 'Mount Location' 'Partition format' 'Other stuff....'

Mount the partitions to test:

Code:
sudo mount -a



- dubstar_04 - 2011-10-18

I have started using this add-on instead of mythfrontend. I intend that it will gradually replace mythfrontend all together.

I keep noticing little bugs, i just need to remember to report them.

One issue is that the recordings aren't updated. The timers update instantly but if a recording starts i have to restart xbmc before it appears in the list.

A more general enquiry, what needs to be done to get time shifting implemented? i do miss not having it Sad

Thanks,

Dubstar_04