1. Welcome to the official forum for MINIX devices!

Kodi 17.6, Freezing, Out of Sync, Stuttering

Discussion in 'Kodi/XBMC for MINIX' started by Chris Richards, Dec 22, 2017.

  1. Chris Richards

    Chris Richards New Member

    I think this might be a Minix issue as the movies play perfectly on my Mac Mini using Kodi 17.6.

    Issue:
    Kodi works perfectly for 90% of my movies, I've come across a few movies that wont play correctly.

    These movies will start playing and then freeze, go out of sync or stutter at a random point through the movie.
    However, if you press "skip" even once it will cause the above mentioned issues instantly.

    I'm not using other devices on the output, just have the HDMI output going into the TV. Very simple/standard. The movies are on
    a 4TB portable hard drive plugged into one of the USB ports.

    I've read my threads and could find nothing that matched exactly, I tried a few things that I hoped may work based on
    some of those threads.

    Tried:
    - Factory reset on NEO-U9-H
    - Deleted Kodi and reinstalled it (via Google Play Store)
    - Cleared Kodi cache in Android settings
    - Tried "Adjust display refresh rate - Always" and "Sync playback to display" in Kodi

    Details:
    Hardware: NEO-U9-H
    FW: FW007A 20171020

    Details of file that causes issue: 26230848 reference on ubuntu paste site (same logs are in the attached file)

    Kodi 17.6 Logs: 26230911 reference on ubuntu paste site (same logs are in the attached file)
    Line 921 (15:24:00.870 T:18446744073104812336): Pressed play, let it play for 60 secs
    Line 1087 (15:25:01.992 T:18446744073104812336): Pressed skip a few times after 60secs of playing (Causes stutting/freeze/sync issues immediately)

    Error snapshot: (See Kodi logs above for full details)
    15:24:03.882 T:18446744072916039984 DEBUG: CDVDClock::ErrorAdjust - CVideoPlayerAudio::OutputPacket - error:-29577.104627, adjusted:-29577.104627
    15:25:03.275 T:18446744073191663920 DEBUG: ActiveAE::SyncStream - average error of 93856.620048, start adjusting
    15:25:05.183 T:18446744072916039984 ERROR: CDVDAudio::AddPacketsRenderer - timeout adding data to renderer
    15:25:07.690 T:18446744073191663920 DEBUG: ActiveAE::SyncStream - average error of 72986.367249, start adjusting
    15:25:27.100 T:18446744073104812336 ERROR: CDVDMediaCodecInfo::ReleaseOutputBuffer ExceptionCheck index(2), render(1)

    Any help/advice is greatly appreciated.

    Thanks.

    -Chris

    Attached Files:

    Last edited: Dec 27, 2017
  2. Chris Richards

    Chris Richards New Member

    Wow... Its a nightmare to even be able to post a link but it also doesn't show the file you uploaded so I tried it three times and now I have uploaded 3 of the same file. Not a user friendly experience for a new person to the site. The file has the logs I reference above. Thanks.
    Now_What ☻ likes this.
  3. Villa

    Villa Administrator Administrator

    You can easily remove the extra uploads by editing your post! ;)

    I've done it for you. :)
    Chris Richards likes this.
  4. Chris Richards

    Chris Richards New Member

    Hi All - I've been changing various settings in kodi to try and fix this. I turned off hardware decoding and it works perfectly after that.

    The problem with that fix is that playback of H265 videos causes the CPU/s to run at 400% with a FPS of 12.

    Not sure what my next step should be at this stage, seems like a bug I guess but not sure if its software or hardware.

    Edit: I've also tried the Minix specific versions of Kodi/XBMC. MINIX XBMC V15.3 and MINIX XBMC 17.4 Beta. Both have the same issue as 17.6 from the Google Play Store.
    Aron999 likes this.
  5. Chris Richards

    Chris Richards New Member

    I tested the LibreELEC 9.x for Amlogic S912 build today and it works perfectly. Not sure if future releases of LibreELEC will support s912 but for now its the only option I've found to work.

    I remember reading in one of the many threads I've read in the past fews days that there is a licensing issue with the "Mali GPU" driver and that why the S912 doesn't have good support anywhere. Minix must have it licensed no doubt but waiting on them could take quite a while...
    Aron999 likes this.
  6. Limited1editon

    Limited1editon New Member

    Massive fix for minix u9h 4k all playing perfect! No suts no freeze no god dam problem!! Fix: uninstall kodi 17.6 install ebmc 17.3 dont touch a setting and you are flat out like a lizard drinking mind you heard here first!!!!!
    Aron999 likes this.
  7. wapvi

    wapvi Member

    Ebmc??what is that?I keep having the same issue u stated. 4k videos play fine for 15mn then start stuttering then goes out of sync I have to pause and play a lot .
  8. Chris Richards

    Chris Richards New Member

    I downloaded and tried "EBMC-17.3-Kodi.apk", it has the same issues I mentioned above. You refer to 4K playback issues, I'm only playing 720p/1080p videos and having the problem so I don't think they are related.
    Aron999 likes this.
  9. Marty

    Marty Active Member

    Try SPMC, in player settings:
    Set Adjust display refresh rate to Always
    Set Enable HQ scalers for scaling above to 100%
    Select Allow hardware acceleration - amcodec
    Deselect both MediaCodecs
    Set MPEG2, MPEG4, h264 and hevc to Always
    Restart SPMC and see if it makes a difference.
    http://download.semperpax.com/spmc/android-arm/SPMC-spmc-krypton-1f9a682-armeabi-v7a.apk

    Edit: P.S press O on the airmouse keyboard to make sure amcodec is working. Hardware decoding must show Active.
    Last edited: Dec 27, 2017
  10. Chris Richards

    Chris Richards New Member

    Thanks for helping Marty. I had high hopes... Followed your bullet points but still the same issue. Might be easier to just re-encode any movie I come across.

    Nice little trick with the "press O" too, hardware decoding (am-mpeg4 (HW)) is being used btw.
    Marty likes this.
  11. Chris Richards

    Chris Richards New Member

    I just realised SPMC allows you to enable/disable specific hw decoding codecs... Should have thought about it from reading Marty's post.

    Anyway, I just set h264 hw decoding to "never" and it works fine now. I can still get h265 hw decoding so the CPU doesn't max out when playing h265 content.

    Might be a simple workaround for now.

    Thanks again Marty!
    Last edited: Dec 27, 2017
    Aron999 and Marty like this.
  12. Chris Richards

    Chris Richards New Member

    After more troubleshooting and testing I found the issue to be with the MPEG4 decoding not H.264.

    I had to force MPEG4 to use software decoding to fix the issue.

    Settings / Player / Video / Processing:
    Allow Hardware Acceleration - amcodec: Disable
    Allow Hardware Acceleration - MediaCodec (Surface): Enable
    Allow Hardware Acceleration - MediaCodec: Enable
    Accelerate MPEG2: Always
    Accelerate MPEG4: Never
    Accelerate H264: Always
    Accelerate HEVC: Always

    Hopefully MINIX will fix the issue sometime in the future...
    Aron999 likes this.
  13. Aron999

    Aron999 New Member

    Hi I have exactly the same problem as Chris above coming from a Amazon box 4k which ran faultless will try these settings what version of spmc if it's spmc will have to install fork as my build is for 17.6 are you running them on Chris thanks for the testing and information you must the patience of a saint went back to fire till I found a work around cause was annoying me so much hopefully running libre elec isn't the only fix install instructions look a nightmare.
    Last edited: Jan 7, 2018
  14. DylanMcD

    DylanMcD New Member

    I'm very new to Android boxes. I have purchased a Minix U9-H with A3 remote.
    I have started trying to set it up for about a week.

    For playing back add-ons Kodi sometimes plays back flawlessly, but more often it stutters to the point that it is unwatchable. I have installed the 17.6 version and would prefer to use Kodi if possible, since it seems that it is the standard. I also have installed SPMC but since add-on installation instructions assume you're using Kodi I'm not sure how to install them on SPMC.

    In Kodi Playback Settings I have set Enable HQ scalers for scaling above to 100%,
    For Allow Hardware Acceleration - MediaCodec (Surface): Enable, Allow Hardware Acceleration - MediaCodec: Enable I have tried turning one on and one off and both off. At one point when I had MediaCodec (Surface): Enabled and the other disabled I had a few hours of acceptable playback, but the next day my playback was back to stuttering.

    I don't get the option of setting up any of these:

    Allow Hardware Acceleration - amcodec: Disable
    Accelerate MPEG2: Always
    Accelerate MPEG4: Never
    Accelerate H264: Always
    Accelerate HEVC: Always

    Also, when I read - "P.S press O on the airmouse keyboard to make sure amcodec is working. Hardware decoding must show Active." Please elaborate. I don't know what that means, but if my hardware decoding is off that may explain things.

    Any advice on this would be greatly appreciated.
  15. Marty

    Marty Active Member

    This topic seems to be very hit and miss depending on the box being used, the instructions I gave at first were from my X8HP but on my U1 they do not work and I have to have different settings for smooth playback.

    So, first up, here is the link for SPMC 17.6 which is exactly the same for installing addons as in Kodi:
    http://download.semperpax.com/spmc/android-arm/SPMC-spmc-krypton-1f9a682-armeabi-v7aSPMC:
    It is only in SPMC that you press O on your airmouse keyboard during playback that brings up info on the file being played, see attached.

    Secondly, attached are my settings on the U1 in SPMC, try these on the U9 and if they don't work then play around.
    Screenshot_2018-01-31-18-08-25.png Screenshot_2018-01-31-17-43-26.png
  16. Aron999

    Aron999 New Member

    Thankyou for your settings in will install spmc 17.6 and see how it runs with your settings I think spmc runs better than kodi on android devices ps do you think it will matter thst the minx older box is running 905 and the u1 is 912
    Last edited: Jan 31, 2018
  17. Marty

    Marty Active Member

    No problem, one more thing worth mentioning that is different on my U1, Adjust display refresh rate is set to On start / stop:
    Screenshot_2018-01-31-18-28-39.png
  18. Aron999

    Aron999 New Member

  19. DylanMcD

    DylanMcD New Member

    Right thanks Marty. I just realized that I had two SPMCs. One was just from somewhere on GooglePlay and not right but the other one 17.6 alpha-2 that I installed from an earlier post here. And yes the process for installation is identical for the 17.6. I applied Chris' settings and watched content on it for about three hours yesterday. I got kicked out of the playback to the menu page once, but no stuttering. I can follow up in a couple of days, but so far so good. Thanks for the info.
    Aron999 likes this.
  20. Socks

    Socks New Member

    I can't seem to get subtitles following your steps Marty