First off I wanted to express my deep appreciation for all the hard work that goes into this project, which is just awesome. I also want to apologise in advance if I have overlooked something stupid, I’ve spent at least 50 solid hours reading and troubleshooting on my own before posting…
On any of the above boxes, running any version of coreelec (currently 9.03) I get a relatively regular video stutter when the Control4 connection is active, that is to say the frame freezes for a split second and then catches up, audio doesn’t seem to be affected.
This occurs regardless of the source material or location of the media (network via nfs, usb or local storage). If I terminate the connection of the control4 system, playback is perfect.
Nearly all of my content are 1080p or 2160p mkv films at 23.98Hz – playback issue applies to both resolutions encoded in either h264 or h265.
The log located at https://paste.ubuntu.com/p/gDVfjvmzG9/ includes playback with the issue (90 seconds without event removed due to upload constraint) – stutter occurred and I pressed stop on the video shortly afterwards.
I’m not sure whether this is an issue that relates to coreelec or Kodi, and whichever it is I’m unsure whether it will ultimately be the driver which requires fixing. However, I’m hoping someone smarter than me can have a look at the attached log and offer some insights on the cause of the problem and how it might be solved?
It looks like issue in your plugin blocking rendering. Rendering is running high priority thread and have to appear regulary for every frame (for 23.976 fps every 41 ms). To see this issue in debug log you have to enable audio/video timing specific debugging in logging settings.
Hi, I enabled audio/video timing specific debugging along with json (method of Control4 control) - this yielded a huge log. I have copied and pasted a 4 second section where the stutter occurred (video stopped immediately after to help isolate location in log): https://paste.ubuntu.com/p/tgwdBbG26F/
I have also tried to create a full log and upload via coreelec plugin, however, after I playback a video it always says failed to paste.
Does the new log offer any further insight? Thanks for your help!
I reduced your log to two threads to see issue. PollFrame is used for syncing rendering to frame rate frequency. It have to appears every 41.666 msec (1/23.976). The thread T:3601814320 JSONRPC is blocking rendering for 172 msec.
Thanks very much for this analysis, I will feed this back to the developer… is there some way to lower the priority of the JSON thread and avoiding this issue? (apologies if this make no sense, I have a very limited understanding of what’s happening here).
This isn’t a plugin… i.e. there is no plugin installed that relates to this functionality, it is simply commands sent from another linux device on the network (control4) using kodi option “allow remote control from applications on other systems” settings > services.
(The control4 system utilises this method to display this information in its own GUI) - this seems to be the only JSONRPC command that causes the video stutter. It only causes a stutter occassionally, not each time the command is issued, if someone can explain why that would be very helpful…
Today have tested the latest version of liberelec on x86 hardware which does not suffer from this issue, i then tested the latest version of libreelec for odriod C2 and the same issue is present. It is therefore definitely something specific to coreelec / libreelec on Amlogic hardware… any thoughts?
I’m sorry but I’m really confused, the issue I am describing is a video playback stutter - the reference I made to GUI was in relation to the Control4 system GUI which is interacting / controlling Kodi as described here:
However, even without the Control4 system, if you establish a telnet connection to coreelec and send
a few times eventually you get the same playback stutter. Control4 system is simply using JSONRPC on 9090 to “talk” to kodi and it is JSONRPC implementation that is causing the problem… This is only happens on coreelec s905x or s912 and libreelec odriod C2.
The issue is not present on libreelec x86 OR KODI 8.3 ARM running on AFTV3 with S905Z. Am I making sense?