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 - ubuntu-xbmc - 2013-03-01

(2013-03-01, 01:22)janbar Wrote: Yes, it look like same issue. Is it crash all the times ?

It crashes very, very frequently. 7 of the last 8 times I have tried to tune an analog channel.

Regarding the 8th time -- I am worried that maybe I tuned a digital channel by accident because some of my digital channels have very similar names to some analog channels. Actually, a nice feature might be a square with an "A" or a "D" to indicate the channel is analog or digital (or just mark analog as most people are probably 100% digital). A digital resolution would be even nicer, but I assume you can't get that without tuning every station.
Quote:You can unzip it into "/usr/local/lib/xbmc/addons/" , but just you must to know what you do Wink . So in this place (/usr/local/lib/xbmc/addons/) addon is available for all users, and then you should remove user ghost (~/.xbmc/addons/).

Will do.


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

Janbar,

Code:
sudo apt-get purge xbmc-pvr-mythtv-cmyth
responded with
Code:
E: Unable to locate package xbmc-pvr-mythtv-cmyth

So, the addon was never installed with package manager.

I checked under ~/.xbmc/addons and under /home/xbmc-user2/.xbmc/addons, and neither had a pvr.mythtv.cmyth directory. So presumably, my XBMC was always using the addon from /usr/local/lib/xbmc/addons/. Per the wiki, I downloaded the source to a separate subdirectory originally. I used ~/xbmc-pvr-addon, while the wiki recommends ~/source. But just to be safe I did this:

Code:
sudo rm -rf ~/.xbmc/addons/pvr.mythtv.cmyth/*
sudo rm -rf /home/xbmc-user2/.xbmc/addons/pvr.mythtv.cmyth/*
sudo rm -rf /usr/local/lib/xbmc/addons/pvr.mythtv.cmyth/*
sudo cp ~/xbmc-pvr-addons/addons/pvr.mythtv.cmyth-linux-x86_64.zip /usr/local/lib/xbmc/addons/
cd /usr/local/lib/xbmc/addons/
sudo unzip pvr.mythtv.cmyth-linux-x86_64.zip
mv ~/xbmc-pvr-addons ~/xbmc-pvr-addons-28FEB

The first two lines failed -- as expected -- because the addon wasn't there. I assume this should confirm that the addon is using the correct location. I still have the crashes. Per,
Quote:remove the other. If the issue persist then send me the new xbmc.log. Thanks.

I captured another log, this is the xbmc.log in /home/xbmc-user2/.xbmc/temp, not the crash log. Hopefully it will show anything that wasn't on the previous log.

Thanks,


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

(2013-03-01, 04:34)Heidi572 Wrote: How can I install this on Ubuntu. I have some linux experience, can use the command line etc, just never used git.ImageImageImageImage ImageImage

Instructions for building the addon are here:

http://wiki.xbmc.org/index.php?title=PVR/Backend/MythTV/BuildFromSource

Copy the compiled addon to to the directory /usr/lib/xbmc/addons/pvr.mythtv.cmyth.


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

Hi !

Janbar,
>>Yes, it look like same issue. Is it crash all the times ?
Yes.

>>It is weird ! It is like you spawn the channel using internal "mythtv" support of xbmc. Do you spawn the channel using PVR TV screen ?

In my case internal mythtv work fine, crash happend at PVR.
Somwhere in the forum a saw identical problem, look like conflict internal and pvr cmyth or so, recomendation was to remove internal xbmc's libcmyth-xxxx.so. Do that too - same result.


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

Quote:I captured another log, this is the xbmc.log in /home/xbmc-user2/.xbmc/temp, not the crash log. Hopefully it will show anything that wasn't on the previous log.

Thanks,

The log does not exist. I continue to search without...
Also i will make a branch in my git to add more log about this issue. I will tell you when it will be ready. Thanks.


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

@Den4t
@ubuntu-xbmc

I made a new branch to debug the issue. To do:
- Checkout my branch test:
mkdir test ; cd test
git clone -b test git://github.com/janbar/xbmc-pvr-addons.git

- Make test addon:
cd xbmc-pvr-addons
./bootstrap
./configure --enable-addons-with-dependencies
make clean
cd lib/cmyth ; make
cd ../../addons/pvr.mythtv.cmyth/ ; make zip

- Install the addon:
unzip zip file from xbmc-pvr-addons/addons/pvr.mythtv.cmyth- ... .zip to your XBMC addons folder

Extra debug is forced. Then please test it and send me the xbmc.log
Thanks.

EDIT: You will not have a segment fault. But seek operation will fail if issue occurs. The new logs are tagged with SEEK_CUR_DEBUG.


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

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.


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

Hi janbar !

Done, log here: http://xbmclogs.com/show.php?id=1687

No segfaults. In this log i try to watch two different channels and exit from xbmc.


RE: New MythTV add-on using libcmyth - MvonSchantz - 2013-03-02

(2013-02-23, 15:33)richardk Wrote:
(2013-02-20, 23:52)MvonSchantz Wrote:
(2013-02-20, 21:35)richardk Wrote: I was hoping that some other folks who've experienced the slowdowns could also test this, but that doesn't seem to be happening.
Sorry for being late to the show! I didn't notice until today, that I was having exactly the same problem...

Any results to report after several days?

After running it for 10 days now, I'm seeing a cpu usage for mythbackend hovering between 1% and 3% when playing back recordings through XBMC. That's with debug-backend-cpu, playing analog SD recordings, compared to 85%-99% with the main branch.


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

(2013-03-02, 20:10)Den4t Wrote: Hi janbar !

Done, log here: http://xbmclogs.com/show.php?id=1687

No segfaults. In this log i try to watch two different channels and exit from xbmc.

Thanks. I found the bug. I am updating to resolve it. Wink


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

(2013-03-02, 20:10)Den4t Wrote: Hi janbar !

Done, log here: http://xbmclogs.com/show.php?id=1687

No segfaults. In this log i try to watch two different channels and exit from xbmc.

@Den4t
@ubuntu-xbmc

Issue should be resolved now. To check that: go to your "test/xbmc-pvr-addons" clone gitted from my branch test then:

git fetch origin test
git pull origin test
make clean
cd lib/cmyth ; make
cd ../../addons/pvr.mythtv.cmyth ; make
cd ../..

then unzip new addon to your xbmc addons folder. Issue should be fully resolved. I wait your feedback to make the PR to Christian.
Thanks a lot.


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

Thanks Janbar, just installed it, and it is definitely not crashing 100% anymore. 3 successful analog tunes in a row. I will test it more later tonight.

My Mythbackend usage is also appears back to normal (<2% at idle). Was this fixed as well?

I do have a red "record" icon on one of my channels (that isn't being recorded). I assume that is unrelated to this fix?

BTW, using

Code:
git fetch origin test

failed for me

Code:
$ git fetch origin test
fatal: Couldn't find remote ref test

$ git fetch origin/test
fatal: 'origin/test' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

So, I followed the instructions in post 1941.


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

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


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

(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


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

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.