Kodi Community Forum

Full Version: pvr.mythtv add-on
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(2014-07-19, 16:27)mcgski Wrote: [ -> ]
(2014-07-19, 04:35)rmiddle Wrote: [ -> ]
(2014-07-19, 01:46)mcgski Wrote: [ -> ]OK, I'll have to do a little more research on unmask. I believe "pi" is the default root for this distro of XBMC (Raspbmc). I'd think that an install by XBMC of an addon would do it with root privileges. Let me do some digging and see what I come up with. Stay tuned...

EDIT: Here's a thought; what if I installed from the GUI and the zip file originated in the home directory? That might take the privileges of that directory. Hmmm......

root != pi . pi is a regular users that is also in the sudo list also likely in a few hardware based groups as well but I have never checked. To run something in root you have to run the command starting with sudo. If the folder is owned by root the PI user will likely not be able to read / write to the folder.

Thanks
Robert

Got it. I did change ownership and priveliges for those folders/files and still no joy.

As you found, OpenELEC doesn't allow apt-get so building on that distro is a non-starter. I'm back to Raspbmc and trying to rebuild the component from scratch. Were you able to get LiveTV working?

I'm still getting the following:

Code:
11:50:50 T:2857366592   ERROR: AddOnLog: MythTV PVR Client: (CPPMyth)__connectAddr: failed to connect (22)
11:50:50 T:2857366592   ERROR: Previous line repeats 6 times.
11:50:50 T:2857366592   ERROR: AddOnLog: MythTV PVR Client: OpenLiveStream: Failed to open live stream
11:50:50 T:2857366592   ERROR: COMXPlayer::OpenInputStream - error opening [pvr://channels/tv/All TV channels/11.pvr]

I've made two observations:
1. The channel number (11) is not what was displayed on the screen (12).
2. The channel number doesn't match what is displayed on the mythfrontend and mythbackend systems.

Could I be getting this error because the channel numbers aren't synced?
I've tried to reduce the number of variables that might cause the issue. I took the Raspberry Pi out of the equation by installing XBMC on an Ubuntu VM and building the source with the new PVR addon.

I'm still getting the following:

Code:
22:24:48 T:2773433152   ERROR: AddOnLog: MythTV PVR Client: (CPPMyth)GetChannelIcon: invalid response
22:24:48 T:2773433152   ERROR: AddOnLog: MythTV PVR Client: Process: Failed to read file: type: 4, local: /home/markg/.xbmc/userdata/addon_data/pvr.mythtv/cache/channelIcon/1889
22:24:51 T:3032115008  NOTICE: DVDPlayer: Opening: pvr://channels/tv/All TV channels/11.pvr
22:24:51 T:3032115008 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
22:24:51 T:2727340864  NOTICE: Thread DVDPlayer start, auto delete: false
22:24:51 T:2727340864  NOTICE: Creating InputStream
22:24:51 T:2727340864   ERROR: AddOnLog: MythTV PVR Client: (CPPMyth)__connectAddr: failed to connect (22)
22:24:51 T:2727340864   ERROR: Previous line repeats 5 times.
22:24:51 T:2727340864   ERROR: AddOnLog: MythTV PVR Client: OpenLiveStream: Failed to open live stream
22:24:51 T:2727340864   ERROR: CDVDPlayer::OpenInputStream - error opening [pvr://channels/tv/All TV channels/11.pvr]

I can play recordings though and get the following in the logs:

Code:
22:25:00 T:3032115008  NOTICE: DVDPlayer: Opening: pvr://recordings/Default/The Big Bang Theory/The Big Bang Theory - The Bozeman Reaction, TV (TBS HD), 20140720_020000.pvr
22:25:00 T:3032115008 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
22:25:00 T:2727340864  NOTICE: Thread DVDPlayer start, auto delete: false
22:25:00 T:2727340864  NOTICE: Creating InputStream
22:25:00 T:2727340864  NOTICE: Creating Demuxer
22:25:00 T:2727340864  NOTICE: Opening video stream: 3 source: 256
22:25:00 T:2727340864  NOTICE: Creating video codec with codec id: 2
22:25:00 T:2727340864  NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: MPEG-2 video
22:25:00 T:2727340864  NOTICE: Creating video thread
22:25:00 T:2700077888  NOTICE: Thread DVDPlayerVideo start, auto delete: false
22:25:00 T:2700077888  NOTICE: running thread: video_thread
22:25:00 T:2727340864  NOTICE: Opening audio stream: 0 source: 256
22:25:00 T:2727340864  NOTICE: Finding audio codec for: 86019
22:25:00 T:2727340864  NOTICE: Creating audio thread
22:25:00 T:2691685184  NOTICE: Thread DVDPlayerAudio start, auto delete: false
22:25:00 T:2691685184  NOTICE: running thread: CDVDPlayerAudio::Process()
22:25:00 T:2691685184  NOTICE: Creating audio stream (codec id: 86019, channels: 6, sample rate: 48000, no pass-through)
22:25:00 T:2700077888  NOTICE: CDVDVideoCodecFFmpeg::GetFormat - Creating VDPAU(1920x1080)
22:25:00 T:2700077888  NOTICE: VDPAU::CreateContext - creating decoder context
22:25:00 T:2700077888  NOTICE: vdp_device = 0x0000006f vdp_st = 0x00000001
22:25:00 T:2700077888   ERROR: (VDPAU) unable to init VDPAU - vdp_st = 0x1.  Falling back.
22:25:00 T:2700077888  NOTICE:  (VDPAU) Close
22:25:00 T:2700077888   ERROR: VAAPI - unable to initialize display -1 - unknown libva error
22:25:00 T:2700077888  NOTICE:  fps: 29.970030, pwidth: 1920, pheight: 1080, dwidth: 1920, dheight: 1080
22:25:00 T:2700077888  NOTICE: Display resolution DESKTOP : 1524x930@ 60.00 - Full Screen (16)
22:25:00 T:3032115008  NOTICE: Using GL_TEXTURE_2D
22:25:00 T:3032115008  NOTICE: GL: Selecting Single Pass YUV 2 RGB shader
22:25:00 T:3032115008  NOTICE: GL: NPOT texture support detected
22:25:00 T:3032115008  NOTICE: GL: Using GL_ARB_pixel_buffer_object
22:25:00 T:3029814080  NOTICE: PulseAudio: Opened device Default in pcm mode with Buffersize 180 ms

So I think this is a LiveTV issue for sure. Hope this helps.
(2014-07-20, 04:30)mcgski Wrote: [ -> ]I've tried to reduce the number of variables that might cause the issue. I took the Raspberry Pi out of the equation by installing XBMC on an Ubuntu VM and building the source with the new PVR addon.

I'm still getting the following:

Code:
22:24:48 T:2773433152   ERROR: AddOnLog: MythTV PVR Client: (CPPMyth)GetChannelIcon: invalid response
22:24:48 T:2773433152   ERROR: AddOnLog: MythTV PVR Client: Process: Failed to read file: type: 4, local: /home/markg/.xbmc/userdata/addon_data/pvr.mythtv/cache/channelIcon/1889
22:24:51 T:3032115008  NOTICE: DVDPlayer: Opening: pvr://channels/tv/All TV channels/11.pvr
22:24:51 T:3032115008 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
22:24:51 T:2727340864  NOTICE: Thread DVDPlayer start, auto delete: false
22:24:51 T:2727340864  NOTICE: Creating InputStream
22:24:51 T:2727340864   ERROR: AddOnLog: MythTV PVR Client: (CPPMyth)__connectAddr: failed to connect (22)
22:24:51 T:2727340864   ERROR: Previous line repeats 5 times.
22:24:51 T:2727340864   ERROR: AddOnLog: MythTV PVR Client: OpenLiveStream: Failed to open live stream
22:24:51 T:2727340864   ERROR: CDVDPlayer::OpenInputStream - error opening [pvr://channels/tv/All TV channels/11.pvr]

I can play recordings though and get the following in the logs:

Code:
22:25:00 T:3032115008  NOTICE: DVDPlayer: Opening: pvr://recordings/Default/The Big Bang Theory/The Big Bang Theory - The Bozeman Reaction, TV (TBS HD), 20140720_020000.pvr
22:25:00 T:3032115008 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
22:25:00 T:2727340864  NOTICE: Thread DVDPlayer start, auto delete: false
22:25:00 T:2727340864  NOTICE: Creating InputStream
22:25:00 T:2727340864  NOTICE: Creating Demuxer
22:25:00 T:2727340864  NOTICE: Opening video stream: 3 source: 256
22:25:00 T:2727340864  NOTICE: Creating video codec with codec id: 2
22:25:00 T:2727340864  NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: MPEG-2 video
22:25:00 T:2727340864  NOTICE: Creating video thread
22:25:00 T:2700077888  NOTICE: Thread DVDPlayerVideo start, auto delete: false
22:25:00 T:2700077888  NOTICE: running thread: video_thread
22:25:00 T:2727340864  NOTICE: Opening audio stream: 0 source: 256
22:25:00 T:2727340864  NOTICE: Finding audio codec for: 86019
22:25:00 T:2727340864  NOTICE: Creating audio thread
22:25:00 T:2691685184  NOTICE: Thread DVDPlayerAudio start, auto delete: false
22:25:00 T:2691685184  NOTICE: running thread: CDVDPlayerAudio::Process()
22:25:00 T:2691685184  NOTICE: Creating audio stream (codec id: 86019, channels: 6, sample rate: 48000, no pass-through)
22:25:00 T:2700077888  NOTICE: CDVDVideoCodecFFmpeg::GetFormat - Creating VDPAU(1920x1080)
22:25:00 T:2700077888  NOTICE: VDPAU::CreateContext - creating decoder context
22:25:00 T:2700077888  NOTICE: vdp_device = 0x0000006f vdp_st = 0x00000001
22:25:00 T:2700077888   ERROR: (VDPAU) unable to init VDPAU - vdp_st = 0x1.  Falling back.
22:25:00 T:2700077888  NOTICE:  (VDPAU) Close
22:25:00 T:2700077888   ERROR: VAAPI - unable to initialize display -1 - unknown libva error
22:25:00 T:2700077888  NOTICE:  fps: 29.970030, pwidth: 1920, pheight: 1080, dwidth: 1920, dheight: 1080
22:25:00 T:2700077888  NOTICE: Display resolution DESKTOP : 1524x930@ 60.00 - Full Screen (16)
22:25:00 T:3032115008  NOTICE: Using GL_TEXTURE_2D
22:25:00 T:3032115008  NOTICE: GL: Selecting Single Pass YUV 2 RGB shader
22:25:00 T:3032115008  NOTICE: GL: NPOT texture support detected
22:25:00 T:3032115008  NOTICE: GL: Using GL_ARB_pixel_buffer_object
22:25:00 T:3029814080  NOTICE: PulseAudio: Opened device Default in pcm mode with Buffersize 180 ms

So I think this is a LiveTV issue for sure. Hope this helps.
Hi, i can't help without debug log enabled. Please enable debug log in the setting screen of the addon (tab advanced) and then redo and post the file (the entire file: i need log of the handshake). Thanks.
But don't post it here, thats what pastebin and xbmclogs.com are for.
nickr, got it. Thanks!

janbar, the logs are pasted into http://www.xbmclogs.com/show.php?id=250980

It's the same log file from the previous post with another example of the same again near the end of the file.

Let me know if there's anything you need me to do.
janbar, I also started looking at the MythTV backend logs and found this message after turning off, then turning on LiveTV in the xbmc frontend.

NOTE: THIS LOG ENTRY WAS IN THE MYTHTV BACKEND LOGS:
Code:
2014-07-20 23:32:29.041427 C [3180/3388] ProcessRequest mainserver.cpp:1342 (HandleVersion) - MainServer::HandleVersion - Client speaks protocol version 75 but we speak 77!

The xbmc frontend is on a different device than the backend.

Hope this helps.

P.S. Thanks for looking into this!
(2014-07-21, 05:38)mcgski Wrote: [ -> ]janbar, I also started looking at the MythTV backend logs and found this message after turning off, then turning on LiveTV in the xbmc frontend.

NOTE: THIS LOG ENTRY WAS IN THE MYTHTV BACKEND LOGS:
Code:
2014-07-20 23:32:29.041427 C [3180/3388] ProcessRequest mainserver.cpp:1342 (HandleVersion) - MainServer::HandleVersion - Client speaks protocol version 75 but we speak 77!

The xbmc frontend is on a different device than the backend.

Hope this helps.

P.S. Thanks for looking into this!
That should not be a problem.

It is mythtv's method of how the client finds which protocol the server uses.

Client: I speak [bogus protocol version, doesn't matter what it is]
Server: Pissoff I speak protocol 77
Client: Thanks for letting me know, I'll talk 77 too.
wrong
(2014-07-21, 08:05)orduek Wrote: [ -> ]wrong
Que?
I am having troubles with cmyth and would like to try this PVR client. I know this may sound nooby but how do I install this addon pvr?
(2014-07-22, 03:10)xmjsilverx Wrote: [ -> ]I am having troubles with cmyth and would like to try this PVR client. I know this may sound nooby but how do I install this addon pvr?

I found that I need to build it on the target system with the directions mentioned in one of my earlier posts. If you are installing it on one of the supported distributions of Linux though I think janbar has them built in his nightly builds on Git.

Once you have the .zip file you'd go to System/Settings and navigate to the Add-ons section. At that point you'd "Install from zip file". I found putting the zip file in my home directory seems to work well with the caveat that I still don't have LiveTV working. Watching recordings works great though. Good luck!
Ok, so I'm running OpenELEC 4.0.7 (which is current stable) on a RaspberryPi. I finally got the toolchain stuff setup and good to go. My MythTV Backend is 0.27-193-g8ee257c and is fully functional from the local frontend.

I compiled at version 1.9.17 and I could get EPG, etc, but when watching LiveTV I could only watch 3 minutes almost exactly and the stream would freeze. Pvr.mythtv was still functional at this point as I could pull up a recording and play exactly 4 minutes. After playing 4 minutes of the recording, it appears that pvr.mythtv would be nonfunctional and EPG wouldn't even work. It would remain in this state for about 30-45 seconds and which point I can start over for another 4 minutes. If I go straight to the recording, I get another 4 minutes played before it dies. It doesn't matter where in the recording that I start, it is always 4 minutes.

Here are my logs from 1.9.17 (cycle starts at 22:51:46). http://xbmclogs.com/show.php?id=251531
Highlight:
Code:
22:19:41 T:2739491920   ERROR: AddOnLog: MythTV PVR Client: (CPPMyth)HangException: connection hang with error 104
22:19:41 T:2739491920   ERROR: AddOnLog: MythTV PVR Client: (CPPMyth)TransferRequestBlockFeedback75: invalid response for request block ()
22:19:42 T:2856363088   ERROR: AddOnLog: MythTV PVR Client: (CPPMyth)HangException: connection hang with error 104
22:19:47 T:2856363088   ERROR: AddOnLog: MythTV PVR Client: (CPPMyth)__connectAddr: failed to connect (111)
22:21:02 T:2774295632   ERROR: Previous line repeats 10 times.
22:21:02 T:2774295632  NOTICE: Thread JobWorker start, auto delete: true

After compiling from the 1.9.18 bump, it doesn't even start. http://xbmclogs.com/show.php?id=251534
Highlight:
Code:
20:51:41 T:2858259536   ERROR: AddOnLog: MythTV PVR Client: (CPPMyth)__connectAddr: failed to connect (111)
20:51:41 T:2858259536   ERROR: AddOnLog: MythTV PVR Client: (CPPMyth)CheckServerHostName: invalid response
20:51:41 T:2858259536   ERROR: AddOnLog: MythTV PVR Client: (CPPMyth)CheckService: MythTV API service is unavailable: 192.168.2.252:6544
20:51:41 T:2858259536   ERROR: AddOnLog: MythTV PVR Client: (CPPMyth)__connectAddr: failed to connect (111)
20:51:41 T:2858259536   ERROR: AddOnLog: MythTV PVR Client: Failed to connect to MythTV backend on 192.168.2.252:6543
20:51:41 T:2858259536   ERROR: AddOnLog: MythTV PVR Client:
20:51:41 T:2858259536   ERROR: PVR - couldn't get the capabilities for add-on 'unknown'. Please contact the developer of this add-on: Christian Fetzer, Jean-Luc Barrière

Just incase it was something strange about a crazy setting, I did completely reimage from a fresh official OpenELEC 4.0.7 (as the log reflects).

Anyone else having similar issues? Anything I can try to assist you guys?

@rmiddle: Once you correct the patch file you mentioned in an earlier post, it is pretty smooth sailing. And smooth is defined as "Error: Source file jansson-config.h missing." + "find .|grep 'jansson-config.h'" + "cp jansson-config.h /expected/path/". The patch was missing an expected line from the original...

Thanks all!
(2014-07-09, 23:26)janbar Wrote: [ -> ]
(2014-07-09, 18:07)pyrodex Wrote: [ -> ]
(2014-07-07, 21:24)janbar Wrote: [ -> ]2 -> Sorry what is "play spot" ? (i know my english is very bad Blush. Sorry for the inconvenience)

The resume spot that is saved when you STOP a recording but don't finish it.

The addon handles them using internal bookmarks of XBMC. It is preferable because XBMC use time position instead framecount.
The old addon uses mythfrontend bookmarks stored in backend. But like EDL we had to estimate the framecount before to store them and then do the reverse operation to retreive them with an approximative error depending of framerate precision.
So here i prefered to use XBMC features. Trying to play a recording for few minutes then stop it. On next play XBMC will propose to start at your previous spot.

I see the reason why you have made this decision, but I would suggest that as this is a MythTV client, the mythfrontend bookmarks are a better solution.

The reason being that MythTV is a system that can have multiple frontends that run on various platforms. With the cmyth addon I can start watching something on my real mythfrontend in the lounge, stop it and continue from the same spot on my xbmc mythfrontend in the bedroom.

Having said that, this is the desired functionality in my household. For a house where multiple people are watching the same show from different frontends, you wouldn't want a single bookmark, so the xbmc feature would actually work better.

I suppose what would be ideal would be a setting to choose the server bookmarks or the xbmc feature??

Either way I won't lose any sleep over the few times I start watching something in one room and finish in the other.

Thanks
Ben
(2014-07-22, 05:07)aboredguy Wrote: [ -> ]Ok, so I'm running OpenELEC 4.0.7 (which is current stable) on a RaspberryPi. I finally got the toolchain stuff setup and good to go. My MythTV Backend is 0.27-193-g8ee257c and is fully functional from the local frontend.

I compiled at version 1.9.17 and I could get EPG, etc, but when watching LiveTV I could only watch 3 minutes almost exactly and the stream would freeze. Pvr.mythtv was still functional at this point as I could pull up a recording and play exactly 4 minutes. After playing 4 minutes of the recording, it appears that pvr.mythtv would be nonfunctional and EPG wouldn't even work. It would remain in this state for about 30-45 seconds and which point I can start over for another 4 minutes. If I go straight to the recording, I get another 4 minutes played before it dies. It doesn't matter where in the recording that I start, it is always 4 minutes.

Here are my logs from 1.9.17 (cycle starts at 22:51:46). http://xbmclogs.com/show.php?id=251531
Highlight:
Code:
22:19:41 T:2739491920   ERROR: AddOnLog: MythTV PVR Client: (CPPMyth)HangException: connection hang with error 104
22:19:41 T:2739491920   ERROR: AddOnLog: MythTV PVR Client: (CPPMyth)TransferRequestBlockFeedback75: invalid response for request block ()
22:19:42 T:2856363088   ERROR: AddOnLog: MythTV PVR Client: (CPPMyth)HangException: connection hang with error 104
22:19:47 T:2856363088   ERROR: AddOnLog: MythTV PVR Client: (CPPMyth)__connectAddr: failed to connect (111)
22:21:02 T:2774295632   ERROR: Previous line repeats 10 times.
22:21:02 T:2774295632  NOTICE: Thread JobWorker start, auto delete: true

After compiling from the 1.9.18 bump, it doesn't even start. http://xbmclogs.com/show.php?id=251534
Highlight:
Code:
20:51:41 T:2858259536   ERROR: AddOnLog: MythTV PVR Client: (CPPMyth)__connectAddr: failed to connect (111)
20:51:41 T:2858259536   ERROR: AddOnLog: MythTV PVR Client: (CPPMyth)CheckServerHostName: invalid response
20:51:41 T:2858259536   ERROR: AddOnLog: MythTV PVR Client: (CPPMyth)CheckService: MythTV API service is unavailable: 192.168.2.252:6544
20:51:41 T:2858259536   ERROR: AddOnLog: MythTV PVR Client: (CPPMyth)__connectAddr: failed to connect (111)
20:51:41 T:2858259536   ERROR: AddOnLog: MythTV PVR Client: Failed to connect to MythTV backend on 192.168.2.252:6543
20:51:41 T:2858259536   ERROR: AddOnLog: MythTV PVR Client:
20:51:41 T:2858259536   ERROR: PVR - couldn't get the capabilities for add-on 'unknown'. Please contact the developer of this add-on: Christian Fetzer, Jean-Luc Barrière

Just incase it was something strange about a crazy setting, I did completely reimage from a fresh official OpenELEC 4.0.7 (as the log reflects).

Anyone else having similar issues? Anything I can try to assist you guys?

@rmiddle: Once you correct the patch file you mentioned in an earlier post, it is pretty smooth sailing. And smooth is defined as "Error: Source file jansson-config.h missing." + "find .|grep 'jansson-config.h'" + "cp jansson-config.h /expected/path/". The patch was missing an expected line from the original...

Thanks all!
1 - Is the cmyth addon run on this platform ?
2 - It looks like a big bottleneck in the network stack.
3 - Please, could you post the log file (xbmclogs.com) watching show until freeze, with debug mode enabled. Without debug mode enabled i cannot do something.

EDIT:
error 104 is Connection reset by peer: So the backend closed the connection for some reason (check log in backend)
error 111 is Connection refused: The backend refuse the connection or was not ready. Here It is a backend issue.

(2014-07-21, 03:24)mcgski Wrote: [ -> ]nickr, got it. Thanks!

janbar, the logs are pasted into http://www.xbmclogs.com/show.php?id=250980

It's the same log file from the previous post with another example of the same again near the end of the file.

Let me know if there's anything you need me to do.

Debug mode was not enabled Sad . It is like reading only title of news Undecided
(2014-07-22, 05:26)BenH Wrote: [ -> ]
(2014-07-09, 23:26)janbar Wrote: [ -> ]
(2014-07-09, 18:07)pyrodex Wrote: [ -> ]The resume spot that is saved when you STOP a recording but don't finish it.

The addon handles them using internal bookmarks of XBMC. It is preferable because XBMC use time position instead framecount.
The old addon uses mythfrontend bookmarks stored in backend. But like EDL we had to estimate the framecount before to store them and then do the reverse operation to retreive them with an approximative error depending of framerate precision.
So here i prefered to use XBMC features. Trying to play a recording for few minutes then stop it. On next play XBMC will propose to start at your previous spot.

I see the reason why you have made this decision, but I would suggest that as this is a MythTV client, the mythfrontend bookmarks are a better solution.

The reason being that MythTV is a system that can have multiple frontends that run on various platforms. With the cmyth addon I can start watching something on my real mythfrontend in the lounge, stop it and continue from the same spot on my xbmc mythfrontend in the bedroom.

Having said that, this is the desired functionality in my household. For a house where multiple people are watching the same show from different frontends, you wouldn't want a single bookmark, so the xbmc feature would actually work better.

I suppose what would be ideal would be a setting to choose the server bookmarks or the xbmc feature??

Either way I won't lose any sleep over the few times I start watching something in one room and finish in the other.

Thanks
Ben

Once i will find a solution to get and set bookmark in the backend , sure i will propose to add this setting. I will let you know.