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.
One is .2, other is .20.
(2014-12-29, 23:20)jsturgis Wrote: [ -> ]I am having the same issues with openelec 5.0 and OSX Yosemite with Kodi Helix installed.

Issues I have seen are stuttering while playing liveTV (fixed by enabling demuxing), playback freezes after a few minutes of watching and the log says "MythTV PVR Client: (CPPMyth)Read: read position is ahead" repeatedly unless I pause for a few seconds and then play. I see these issues with both MythTV 0.27 and 0.28.

Everything was working fine on openelec 4.2.1 and liveTV works fine with mythfrontend, I checked the CPU use on the mythbackend machine and it never goes above 7%.

When the playback freezes I see this in the log:

CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available
CDVDMessageQueue(video)::Get - asked for new data packet, with nothing available

Log file

When the playback freezes in Kodi the liveTV recording continues in MythTV, it seems like the mythTV addon is reading to far ahead and then playback freezes.

Any ideas on how to fix MythTV playback on Kodi Helix?
Having a similar error as well. I have been able to troubleshoot this one on multiple platforms as well; so I've ruled out hardware or drivers as the issue.

Symptoms: When I choose a choose a channel to watch, the program may stream for a few seconds before it abruptly stops. Sometimes it will just say "channel not available". Other times, it will simply time out trying to connect to the channel. One time, I was able to get it to play indefinitely on a channel, however I was seeing terrible buffering and pixelation on a level I've never seen before.

Platforms: Amazon Fire TV (51.1.4.0_514006420) running Helix (Android build) and Intel Atom/NVidia ION2 (Kodibuntu Trusty/Helix x64).

Myth Backend: Dedicated Ubuntu (Trusty-- up to date) server on same network, running mythtv-backend 0.27.4-27-g40506c2.

Tuner Hardware (on backend server): Ceton InfiniTV 4 with latest Linux driver

pvr.mythtv Helix add-on version: Source build from latest in janbar repository, helix branch (for the Kodibuntu install); and whatever the latest stock Android Helix build has with it (for the AFTV install).

Kodi Log
Mythtv Backend Log

Here are a few additional helpful notes:
  • I use only wired connections in my home, with gigabit LAN. Also, there is ample bandwidth to play HD videos in Kodi (via my media server) with no issue. I'm 99.99999% sure the issue is not with bandwidth.
  • When I revert to Gotham (13.2) and the latest cmyth add-on (1.9.16-14) for Gotham, the problem goes away
  • I have an additional HTPC terminal running Gotham (13.2) and the cmyth add-on, and I've never had an issue with that one.
  • I have spent countless hours reading posts here (and elsewhere), trying out various suggestions others have made. These include (but are not limited to): Enabling MPEG-2 Demuxing, playing with the VDPAU settings, generating xorg.conf and disabling compositing (nVidia only), and of course setting the API PIN to 0000 on the backend.

So in summary, I'm certain the issue is not related to any of the following: insufficient bandwidth, incompatible client OS or drivers, insufficient hardware resources (e.g. RAM), incompatible client hardware.

I'd be surprised to find out if the majority of people using a dedicated myth backend server with a Ceton tuner, from a Helix client, are not actually having problems with this configuration. I don't believe there is anything too unusual about my situation. It's worked for years under Eden, Frodo, and Gotham. It's only recently become a problem with Helix.

Any help is much appreciated!
I also have a Ceton InfiniTV 4 maybe that has something to do with it?
@felonious do you have demux on in pvr.mythtv settings?
(2015-01-01, 00:43)jsturgis Wrote: [ -> ]I also have a Ceton InfiniTV 4 maybe that has something to do with it?

I'm also using a Ceton InfiniTV 4. Looks like everyone so far who has the problem is using a ceton... I'm also using MythTV .27 for the backend, perhaps everyone else has moved on to .28?

Using mythfrontend, I generally don't have any problems ever with the setup, and if there's a "hick-up", I just wait a few seconds and the live stream continues to play. Generally that's the case with cmyth version of the kodi plugin as well.

It's only the new pvr.mythtv where the video just stops playing at all, and it occurs almost immediately after I try starting a live TV stream.

(2015-01-01, 00:57)nickr Wrote: [ -> ]@felonious do you have demux on in pvr.mythtv settings?

I know when I have demux setting on, the video just pauses and never starts up again. If I have it off, the video just "exits" out as if I were to push the key "x", to stop the video.
Why would you move to 0.28? It is not released yet.
(2015-01-01, 00:57)nickr Wrote: [ -> ]@felonious do you have demux on in pvr.mythtv settings?
I've tried it both ways, and it makes no difference on either the AFTV or the Atom/ION. FWIW, I have tried countless combinations of settings between the video playback/acceleration and the mythtv add-on settings. When I realized the issue was present on both client machines, I figured the fix would go well beyond a Kodi configuration option.
(2014-12-31, 23:35)nickr Wrote: [ -> ]One is .2, other is .20.

Just a typo in the post, the actual setting is .20 in all cases. I have corrected the last post.
@felonious @Huuh

Moving to mythtv backend 0.28pre will not help.

The pixellation issue is present in 0.27 and 0.28pre.

In my case Enabling MPEG-2 Demux in pvr.mythtv solved the pixellation issue, however this did not solve the root cause.

Mike
@all , so thanks for posted samples !

I pushed a new release 1.11.0-helix and 1.9.22-30-gotham including a patch to resolve stuttering in some cases.

- Check my cloud for new releases:
https://www.canneasucre.org/owncloud/pub...4750925043
- Or from launchpad (janbar ppa) for ubuntu users.

I removed sleeping code on read ahead. It seems to be the guilty. Please let me know about then i will push the fix to xbmc team.

Happy new year !
(2015-01-01, 17:55)janbar Wrote: [ -> ]@all , so thanks for posted samples !

I pushed a new release 1.11.0-helix and 1.9.22-30-gotham including a patch to resolve stuttering in some cases.

- Check my cloud for new releases:
https://www.canneasucre.org/owncloud/pub...4750925043
- Or from launchpad (janbar ppa) for ubuntu users.

I removed sleeping code on read ahead. It seems to be the guilty. Please let me know about then i will push the fix to xbmc team.

Happy new year !

@janbar

Built from source for gotham, live tv played for a few seconds then exited to main xbmc screen

Edit: Demux not enabled

log is here http://xbmclogs.com/show.php?id=389808

Mike
(2015-01-01, 18:32)MikeB2013 Wrote: [ -> ]
(2015-01-01, 17:55)janbar Wrote: [ -> ]@all , so thanks for posted samples !

I pushed a new release 1.11.0-helix and 1.9.22-30-gotham including a patch to resolve stuttering in some cases.

- Check my cloud for new releases:
https://www.canneasucre.org/owncloud/pub...4750925043
- Or from launchpad (janbar ppa) for ubuntu users.

I removed sleeping code on read ahead. It seems to be the guilty. Please let me know about then i will push the fix to xbmc team.

Happy new year !

@janbar

Built from source for gotham, live tv played for a few seconds then exited to main xbmc screen

Edit: Demux not enabled

log is here http://xbmclogs.com/show.php?id=389808

Mike

xbmc has a stupid player ! it is why i have added a wait for 100ms :

Code:
16:27:28 T:140038398531328  NOTICE: AddOnLog: MythTV PVR Client: (CPPMyth)Read: read position is ahead (3021160)
16:27:28 T:140038398531328  NOTICE: CDVDPlayer::OnExit()
16:27:28 T:140038398531328  NOTICE: DVDPlayer: eof, waiting for queues to empty

For now i don't know how to handle this behavior. The player try to read ahead and doesn't wait some time when 0 bytes have been retrieved. Maybe using a wait for 10ms instead ...

Later i will update to try waiting 10ms.
@MikeB2013

You could update the source file lib/cppmyth/cppmyth/src/mythlivetvplayback.cpp at line 494:
replacing...
Code:
if (timeout)
{
m_timeout->Init(100); // Retry after 100ms
DBG(MYTH_DBG_WARN, "%s: read position is ahead (%" PRIi64 ")\n", __FUNCTION__, fs);
}
return 0;

by

Code:
if (timeout)
{
m_timeout->Init(100); // Retry after 100ms
DBG(MYTH_DBG_WARN, "%s: read position is ahead (%" PRIi64 ")\n", __FUNCTION__, fs);
}
else usleep(10000);
return 0;

There it will wait for 10ms
(2015-01-01, 19:03)janbar Wrote: [ -> ]@MikeB2013

You could update the source file lib/cppmyth/cppmyth/src/mythlivetvplayback.cpp at line 494:
replacing...
Code:
if (timeout)
{
m_timeout->Init(100); // Retry after 100ms
DBG(MYTH_DBG_WARN, "%s: read position is ahead (%" PRIi64 ")\n", __FUNCTION__, fs);
}
return 0;

by

Code:
if (timeout)
{
m_timeout->Init(100); // Retry after 100ms
DBG(MYTH_DBG_WARN, "%s: read position is ahead (%" PRIi64 ")\n", __FUNCTION__, fs);
}
else usleep(10000);
return 0;

There it will wait for 10ms

@janbar

Tried the code change, still exits to main xbmc screen after a period.


Log is here http://xbmclogs.com/show.php?id=389890

Mike
Just a quick question: janbar's repo is a fork of the notspiff repo, yet I haven't seen notspiff mentioned once in this entire thread. I'm curious what the functional differences are between the two. Is notspiff the official repo (since it doesn't appear to be a fork of anything itself)?

UPDATE: I just realized I was looking at a different repo. I was looking at pvr.mythtv, whereas all of these recent changes are actually going on in xbmc-pvr-addons. So what is the purpose of the pvr.mythtv repo? Is it obsolete?

HAPPY NEW YEAR, btw!