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 - janbar - 2013-03-03

(2013-03-03, 07:16)ubuntu-xbmc Wrote: Janbar.

I just tried your update for a while, and it appears that you've resolved the crashing -- however, I am now seeing very bad mpeg distortion. This isn't my photo, but it is similar in image to what I am seeing.

The distortion begins after about 5 to 8 seconds of high-quality image viewing on the analog channels. The distortion is bad enough to make the content unwatchable. XBMC digital channels are ok, Mythfrontend is ok with analog channels.

The log was very large and wouldn't post to xbmclogs.com so I've posted the first 5000 lines (out of 115k) after beginning to select the channel. I also posted just the lines that had the word "Error" in them into a separate paste file. I'm not sure this enough, if not, let me know what you'd like me to "filter in."

Thanks
Hi, the issue is resolved now. But you have other things not linked with addon. First now disable "extra debug log" to avoid to fill you disk.
Also retry to watch the channel for few minutes and then copy the stream file from mythbackend to your xbmc video folder. Then try to read it using xbmc to see what happend. You can also post the file somewhere, then i can get it to test it. Thanks.


RE: New MythTV add-on using libcmyth - ubuntu-xbmc - 2013-03-03

Cfetzer,

My high CPU issue appears to have cleared up, but I ran the netstat command anyway.

I had 8 TCP connections, 4 TCP6, 4 UDP, and 20 Unix 3 streams.

Thanks


RE: New MythTV add-on using libcmyth - janbar - 2013-03-03

(2013-03-03, 12:20)Den4t Wrote: Hi Janbar !

No crushes now, thanks !
But i have now another problem, after 3-5 seconds xbmc begin bufferig,
video is freeze, when buffering done, video is go on, but audio is absent, xbmc shows (when press "O"),
that not audio at all: D() P(aq: 0%,Kb/s:122,75,att:0.0 db)
at the begining audio was mp3.
myth:// protocol steel work fine.

In mythbackend logs a saw this:
strange error flushing buffer ...
strange error flushing buffer ...

New xbmc log here:
http://xbmclogs.com/show.php?id=1839 part1
http://xbmclogs.com/show.php?id=1840 part2

In this log i start watch channel, wait buffering done, then, after a 2-3 sec video vithout audio press stop
and exit xbmc.
Hi,

Can you post somewhere the stream file: /u/Recordings/LiveTV/1003_20130303142127.nuv or an other generated during analog channel show ?


RE: New MythTV add-on using libcmyth - Den4t - 2013-03-03

Janbar,
here: http://dl.dropbox.com/u/12758817/1216_20130303160156.nuv

Not the file you request, but from LiveTV mythbackend directory, 10-15 secons long without audio in PVR after buffering.
XBMC play all file with normal mp3 audio.


RE: New MythTV add-on using libcmyth - janbar - 2013-03-03

(2013-03-03, 12:20)Den4t Wrote: myth:// protocol steel work fine.
You said an interesting thing. The internal myth:// protocol can read your analog channel without "read" issue.

Can you confirm that ? Or i read wrong !


RE: New MythTV add-on using libcmyth - Den4t - 2013-03-03

Yes, confirm, and here log: http://xbmclogs.com/show.php?id=1865


RE: New MythTV add-on using libcmyth - richardk - 2013-03-03

(2013-03-03, 10:20)cfetzer Wrote:
(2013-03-02, 17:22)richardk Wrote: OpenELEC 2.99.4 (RC4) was released yesterday. Unfortunately, it still has version 1.6.7 of the addon.

If the latest changes don't make it into the final release of OpenELEC with Frodo, there are going to be a lot of unhappy users.

I don't know the details of how the distribution process works, but it seems that it needs some streamlining so that fixes can get out to users when they are needed.

Do you have any contacts in openelec? I asked on their irc channel but didn't get an answer.

In general, we release our stuff to the official xbmc repo github.com/opdenkamp/xbmc-pvr-addons but when the release is rolled out to the users
is no more in our hands. For linux it's up to the distribution authors to pick the changed from there.
Other platforms should get the update installed at some point. Which hasn't happened so far.

I try to write as much info as possible in our change log, so it should be clear for distro maintainers that it's worth to pick that update.

---

About the cpu load:
Since I still cannot reproduce the issue, I've queued a lot more recordings now and in addition I'm using munin and the proc plugin to gather statistics on the mythbackend process.
It'll create graphs about CPU and memory usage, number of threads and a couple of more things.
I will let it run for a couple of days now without restarting and hopefully that helps to find out why the cpu load increases.

If you have the issue, could you check if there is an inexplicable high number of tcp connections between xbmc and the backend?
Code:
sudo netstat -apn | grep mythbackend

In addition I'm working on aligning the tcp receive buffer sizes. It could be related to the problem: https://github.com/fetzerch/xbmc-pvr-addons/pull/98
It's not yet ready for testing since it causes stuttering. I'll let you know as soon as there's something to test.

One interesting thing would be: Do we have anybody here that has the increasing cpu load issue while using only windows as frontend?

Thanks,
Christian

I'm just another user of OpenELEC, but I'll post something on their forum about the need to update the cmyth addon. It just seems like the process is awkward, since it has to go through several hands before making it out to the users. But I know there's nothing you guys can do about it.

Here is the output you requested. This is with one HD stream playing on XBMC from 192.168.1.83:

Code:
richard@MythTV:~$ sudo netstat -apn | grep mythbackend
[sudo] password for richard:
tcp        0      0 192.168.1.77:6543       0.0.0.0:*               LISTEN      17737/mythbackend
tcp        0      0 127.0.0.1:6543          0.0.0.0:*               LISTEN      17737/mythbackend
tcp        0      0 192.168.1.77:6544       0.0.0.0:*               LISTEN      17737/mythbackend
tcp        0      0 127.0.0.1:6544          0.0.0.0:*               LISTEN      17737/mythbackend
tcp        0      0 192.168.1.77:6543       192.168.1.83:39954      ESTABLISHED 17737/mythbackend
tcp        0      0 192.168.1.77:6543       192.168.1.83:46169      ESTABLISHED 17737/mythbackend
tcp        0      0 192.168.1.77:6543       192.168.1.83:46171      ESTABLISHED 17737/mythbackend
tcp        0      0 192.168.1.77:6543       192.168.1.83:40021      ESTABLISHED 17737/mythbackend
tcp        0      0 127.0.0.1:49149         127.0.0.1:35327         ESTABLISHED 17737/mythbackend
tcp        0      0 192.168.1.77:6543       192.168.1.83:46173      ESTABLISHED 17737/mythbackend
tcp6       0      0 fe80::230:67ff:fe3:6543 :::*                    LISTEN      17737/mythbackend
tcp6       0      0 ::1:6543                :::*                    LISTEN      17737/mythbackend
tcp6       0      0 fe80::230:67ff:fe3:6544 :::*                    LISTEN      17737/mythbackend
tcp6       0      0 ::1:6544                :::*                    LISTEN      17737/mythbackend
udp        0      0 255.255.255.255:1900    0.0.0.0:*                           17737/mythbackend
udp        0      0 239.255.255.250:1900    0.0.0.0:*                           17737/mythbackend
udp        0      0 0.0.0.0:6549            0.0.0.0:*                           17737/mythbackend
unix  3      [ ]         STREAM     CONNECTED     542732   17737/mythbackend
unix  3      [ ]         STREAM     CONNECTED     542486   17737/mythbackend
unix  3      [ ]         STREAM     CONNECTED     542484   17737/mythbackend
unix  3      [ ]         STREAM     CONNECTED     540647   17737/mythbackend
unix  3      [ ]         STREAM     CONNECTED     538471   17737/mythbackend
unix  3      [ ]         STREAM     CONNECTED     540470   17737/mythbackend
unix  3      [ ]         STREAM     CONNECTED     537964   17737/mythbackend
unix  2      [ ]         STREAM     CONNECTED     535226   17737/mythbackend
unix  3      [ ]         STREAM     CONNECTED     530983   17737/mythbackend
unix  3      [ ]         STREAM     CONNECTED     360166   17737/mythbackend
unix  3      [ ]         STREAM     CONNECTED     360740   17737/mythbackend
unix  3      [ ]         STREAM     CONNECTED     359840   17737/mythbackend
unix  3      [ ]         STREAM     CONNECTED     359838   17737/mythbackend
unix  3      [ ]         STREAM     CONNECTED     359837   17737/mythbackend
unix  3      [ ]         STREAM     CONNECTED     360479   17737/mythbackend
unix  3      [ ]         STREAM     CONNECTED     359810   17737/mythbackend
unix  2      [ ]         STREAM     CONNECTED     360478   17737/mythbackend
unix  2      [ ]         STREAM     CONNECTED     359625   17737/mythbackend
unix  3      [ ]         STREAM     CONNECTED     359272   17737/mythbackend
unix  3      [ ]         STREAM     CONNECTED     359271   17737/mythbackend
unix  3      [ ]         STREAM     CONNECTED     359550   17737/mythbackend
unix  3      [ ]         STREAM     CONNECTED     359549   17737/mythbackend
unix  3      [ ]         STREAM     CONNECTED     359548   17737/mythbackend
unix  3      [ ]         STREAM     CONNECTED     359547   17737/mythbackend
unix  3      [ ]         STREAM     CONNECTED     359546   17737/mythbackend
unix  3      [ ]         STREAM     CONNECTED     359545   17737/mythbackend
unix  3      [ ]         STREAM     CONNECTED     359544   17737/mythbackend
unix  3      [ ]         STREAM     CONNECTED     359543   17737/mythbackend
unix  3      [ ]         STREAM     CONNECTED     359542   17737/mythbackend
unix  3      [ ]         STREAM     CONNECTED     359541   17737/mythbackend
unix  3      [ ]         STREAM     CONNECTED     359540   17737/mythbackend
unix  3      [ ]         STREAM     CONNECTED     359539   17737/mythbackend
unix  3      [ ]         STREAM     CONNECTED     359538   17737/mythbackend
unix  3      [ ]         STREAM     CONNECTED     359537   17737/mythbackend
unix  3      [ ]         STREAM     CONNECTED     359536   17737/mythbackend
unix  3      [ ]         STREAM     CONNECTED     359535   17737/mythbackend
richard@MythTV:~$

(I wasn't seeing the excessive cpu usage, since my MythTV system had recently been rebooted to install updates.)


RE: New MythTV add-on using libcmyth - janbar - 2013-03-03

(2013-03-03, 14:29)Den4t Wrote: Yes, confirm, and here log: http://xbmclogs.com/show.php?id=1865

Internal cmyth is not wordy. But you can read your channel with it. So i reverted the "read" part of addon with the same code of internal cmyth. I committed to the same branch "test". You can go to the source folder "test/xbmc-prv-addons" and type :

git fetch origin test
git pull origin test

Then rebuild ( one more time Wink ) the addon. Don't miss make clean.

I hope it is the read part. But it could be seek part. I wait your feedback. Thanks.


RE: New MythTV add-on using libcmyth - Den4t - 2013-03-03

Rebuid, no help Sad

Here log:
http://xbmclogs.com/show.php?id=1880 part 1
http://xbmclogs.com/show.php?id=1881 part2


RE: New MythTV add-on using libcmyth - richardk - 2013-03-03

I posted this.

http://www.openelec.tv/forum/110-update-openelec/62828-pvr-cmyth-addon-needs-to-be-updated#65538

Don't know if it'll help, but worth a try.


RE: New MythTV add-on using libcmyth - janbar - 2013-03-03

(2013-03-03, 16:19)Den4t Wrote: Rebuid, no help Sad

Here log:
http://xbmclogs.com/show.php?id=1880 part 1
http://xbmclogs.com/show.php?id=1881 part2

Hi, it is a seek issue. Something weird. I debug it with your file. Thanks.


RE: New MythTV add-on using libcmyth - janbar - 2013-03-03

(2013-03-03, 16:19)Den4t Wrote: Rebuid, no help Sad

Here log:
http://xbmclogs.com/show.php?id=1880 part 1
http://xbmclogs.com/show.php?id=1881 part2

I reviewed SEEK functions and i committed in the branch "test" to avoid out of range (see in your log). But the code was almost identical. So addon should read your channel like internal myth. You could try it when you will have time.

After your feedback for this change. We will try with disabled SEEK. The internal cmyth don't provide SEEK function. Perhaps the player does something weird using the seek function of the addon. If the stream contains errors the player try to seek over. With the internal cmyth, the player can't and continue a linear read.


RE: New MythTV add-on using libcmyth - Den4t - 2013-03-03

Thanks janbar ! Let's try with disabled SEEK, changes not help, now xbmc buffering forever, until i press stop button,
sometimes i saw 100% and than buffering again, sometimes i dont saw buffering window at all, but
xbmc log is grow. Video is freeze all time, exept first 3-5 secs at the begining:

http://xbmclogs.com/show.php?id=1993
http://xbmclogs.com/show.php?id=1994
http://xbmclogs.com/show.php?id=1995
http://xbmclogs.com/show.php?id=1997


RE: New MythTV add-on using libcmyth - sfrooster - 2013-03-04

(2013-03-03, 10:20)cfetzer Wrote: If you have the issue, could you check if there is an inexplicable high number of tcp connections between xbmc and the backend?
Code:
sudo netstat -apn | grep mythbackend

What would you consider a high number? This is not too long after a reboot, so I expect this represents "not high":

Code:
~$ sudo netstat -apn | grep mythbackend
tcp        0      0 192.168.1.36:6543       0.0.0.0:*               LISTEN      1923/mythbackend
tcp        0      0 127.0.0.1:6543          0.0.0.0:*               LISTEN      1923/mythbackend
tcp        0      0 192.168.1.36:6544       0.0.0.0:*               LISTEN      1923/mythbackend
tcp        0      0 127.0.0.1:6544          0.0.0.0:*               LISTEN      1923/mythbackend
tcp        0      0 192.168.1.36:6543       192.168.1.3:35399       ESTABLISHED 1923/mythbackend
tcp        0      0 192.168.1.36:55461      192.168.1.2:65001       ESTABLISHED 1923/mythbackend
tcp        0      0 192.168.1.36:6543       192.168.1.8:35471       ESTABLISHED 1923/mythbackend
tcp        0      0 192.168.1.36:55458      192.168.1.2:65001       ESTABLISHED 1923/mythbackend
tcp        0      0 192.168.1.36:55460      192.168.1.2:65001       ESTABLISHED 1923/mythbackend
tcp        0      0 192.168.1.36:6543       192.168.1.8:35602       ESTABLISHED 1923/mythbackend
tcp        0      0 192.168.1.36:6543       192.168.1.3:35401       ESTABLISHED 1923/mythbackend
tcp        0      0 192.168.1.36:6543       192.168.1.8:35600       ESTABLISHED 1923/mythbackend
tcp        0      0 127.0.0.1:39159         127.0.0.1:35327         ESTABLISHED 1923/mythbackend
tcp        0      0 192.168.1.36:6543       192.168.1.8:35473       ESTABLISHED 1923/mythbackend
tcp6       0      0 fe80::82ee:73ff:fe:6543 :::*                    LISTEN      1923/mythbackend
tcp6       0      0 ::1:6543                :::*                    LISTEN      1923/mythbackend
tcp6       0      0 fe80::82ee:73ff:fe:6544 :::*                    LISTEN      1923/mythbackend
tcp6       0      0 ::1:6544                :::*                    LISTEN      1923/mythbackend
udp        0      0 255.255.255.255:1900    0.0.0.0:*                           1923/mythbackend
udp        0      0 239.255.255.250:1900    0.0.0.0:*                           1923/mythbackend
udp        0      0 0.0.0.0:6549            0.0.0.0:*                           1923/mythbackend
udp        0      0 0.0.0.0:52124           0.0.0.0:*                           1923/mythbackend
udp        0      0 0.0.0.0:44273           0.0.0.0:*                           1923/mythbackend
udp        0      0 0.0.0.0:57345           0.0.0.0:*                           1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     19136    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     24699    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     26195    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     24395    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     17177    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     17917    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     17901    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     18610    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     17537    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     18609    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     12851    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     14697    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     15458    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     15456    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     15455    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     13699    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     14632    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     15368    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     15362    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     12215    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     12664    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     12663    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     12662    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     12661    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     12660    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     12659    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     14468    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     14467    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     14466    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     14465    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     14464    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     14463    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     14462    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     14461    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     14460    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     14459    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     14458    1923/mythbackend
unix  3      [ ]         STREAM     CONNECTED     14457    1923/mythbackend



RE: New MythTV add-on using libcmyth - janbar - 2013-03-04

(2013-03-03, 22:33)Den4t Wrote: Thanks janbar ! Let's try with disabled SEEK, changes not help, now xbmc buffering forever, until i press stop button,
sometimes i saw 100% and than buffering again, sometimes i dont saw buffering window at all, but
xbmc log is grow. Video is freeze all time, exept first 3-5 secs at the begining:

I pushed to branch "test" the "disable seek". To get it: 2 solutions:
1:
rm -rf test/xbmc-pvr-addons
mkdir test ; cd test
git clone -b test https://github.com/janbar/xbmc-pvr-addons.git

or

2:
cd test/xbmc-pvr-addons
git reset --hard 7f4a3db2489c06a08a18ad0dab89147d14e95715
git fetch origin test
get pull origin test