MMAL Skipped frame or judder every few seconds

Is anyone else experiencing skipped frames or a judder every 5-10 seconds when using MMAL? Sync playback to display and resample audio are both enabled. Switching to OMXPlayer does not produce this same issue. The codec info screen does not indicate any dropped or skipped frames when this happens but it is very noticeable when watching.

I will try to get some logs posted later today.

1 Like

Yes, me too I think. Itā€™s been driving me crazy lately. Itā€™s not super obvious and I donā€™t think my wife notices but I find it very annoying. Itā€™s most obvious when playing 25fps files but that might be because I mostly watch progressive PAL HD filesā€¦

Never tried switching to OMXPlayer, will try that laterā€¦

EDIT: I have ā€œadjust display refresh rate to match videoā€ enabled and my TV switches to the right mode.

And ā€œadjust display refresh rate to match videoā€?
A sample file that shows the problem would be useful.

Yes and ā€œadjust display refresh rate to match videoā€ is enabled too.

The following are links to the log file and a sample clip of a video that exhibits this behavior. After reviewing the log file there is definitely something funny going on with the MMAL video buffer.

Iā€™ve played this file in my debug environment and have not seem a dropped frame either with omxplayer or mmmal.
Itā€™s possible there are differences between the Jarvis and Krypton code, but switching branches takes a while to rebuild so I canā€™t do that now.

I would be interested if that file plays okay locally - can you copy it to sdcard or a usb stick?
Iā€™d also be interested if you can test it with a Krypton build, in case the issue has been fixed.

BTW, what did you spot in the log? I didnā€™t see anything wrong.

This maybe as stupid ignorant question but is your debug environment based on OSMC? Since this is the OSMC forum I bet it is. Because Iā€™m having the same issue but just when using OSMC on the RPi2. Iā€™m just asking because the Kodi part is the same with both OS I guess but something with OSMC is causing this that OpenELEC doesnā€™t have.

Edit1: the stutter/drop is actually not visible in the CodecInfo but you can see it. Just as a clarification.
Edit2: I can indeed confirm that enabling OMX with OSMC removes the stutter (which I would actually describe as a hiccup in my case) on OSMC.

Iā€™m using this test file: https://dl.dropboxusercontent.com/u/789850/PendelTest.mkv

Iā€™m posting the log here when Iā€™m done in a few minutes.

And here is the log playing the whole test file posted above: https://dl.dropboxusercontent.com/u/789850/OSMC_hiccup.txt

Another one with passthrough and sync playback to display (adjust PLL). One sutter at around 12 seconds into the file for example:
https://dl.dropboxusercontent.com/u/789850/OSMC_hiccup2.txt

Stuff used:
RPi2
latest OSMC build, MMAL
doesnā€™t matter if passthrough, adjust refresh rate etc is enabled or not. I always get this with OSMC on my Pi2.
I can post a log playing the same file on OpenELEC if that would help.
This is nothing new for me. The hiccup was actually the reason I switched to OpenELEC when I got my Pi2 5 month back or so.

I can confirm that the studdering exists when playing a local file and on GMCā€™s OSMC Krypton builds.

Logfile from Krypton build.

I donā€™t have this issue on Millhouseā€™s RPi2 Krypton nightly builds, only OSMC builds.

I will try using the ā€˜PendelTest.mkvā€™ file later today and see if I can replicate this issue.

Sam

No. My debug environment uses raspbian jessie running from nfs root with Kodi cross-compiled on the Ubuntu nfs server.

Hi

Iā€™ve just tested with ā€˜PendelTest.mkvā€™. I copied it to an SD card and played it back locally using MMAL and Adjust refresh rate on. I see a stutter, and a frame skip when the pendulum flips back.

Does:

touch /var/tmp/.suppress_osmc_update_checks

Improve things for you?

Sam

I would say no. Itā€™s the same as before. Having now rebooted the RPi2 multiple times and playing the same file again and again, I would even say after some reboots there is less noticeable skipping and then I reboot it again and it is more noticeable. I donā€™t know if this is helping or not or maybe itā€™s just placebo.

But the skipping is not gone after creating the (.suppress_osmc_update_checks) file in comparison to playing the mkv on OpenELEC. Curious to see what others think.

Edit: Iā€™ve tested running the RPi2 with the Fire TV power supply and the official one (just saying because this will probably be the next question)

Thanks for reporting back.

  • Can you make sure youā€™re running the Confluence skin?
  • Letā€™s also try disabling My OSMC:
sudo systemctl stop mediacenter
sudo mv /usr/share/kodi/addons/service.osmc.settings/ /home/osmc/
sudo mv /usr/share/kodi/addons/script.module.osmc* /home/osmc/
sudo systemctl start mediacenter

As a result of disabling My OSMC, some functionality (updating add-ons; profile mode) wonā€™t be functional, but this is just to test.

Thanks,

Sam

Hi

I donā€™t know if this will help, but I donā€™t see any stutter using OSMC 2016.02-4 on a RPI 2 with a Digi+, mmal and ā€˜adjust refresh rateā€™ on, playing from a NFS shareā€¦

Confluence running and disabled My OSMC. Still the sameā€¦
It would be a great help if some of the other guys that have the same problems and reported here could test this too. Just to make sure. Sometimes the stutter reminds me of when I bring up the UI mid-film. Itā€™s not always so severe though. Is there nothing in the log I posted?

Did you try the test file or a similar one that makes it easy to spot? Some people are also more susceptible to those kinds of problems. (not saying you are wrong though)

I think I solved it!

Itā€™s the lirc_rpi-module that getā€™s loaded with OSMC by default. I removed it from the config.txt and no stutter. I loaded the module in OpenELEC and now have the same stutter.

Anyone PLEASE test this out! Remove the dtoverlay line from the config.txt and reboot.

Come to think of it, that line was the first thing I noticed when I switched to OSMC but I totally forgot about it.

1 Like

Just to answer your previous post : yes, I tested the same pendeltest.mkv, on 2 RPI2 : one is using omxplayer, the other one (on which a Digi+ is plugged) is using mmal. And no slutter on both :slight_smile:

lirc_rpi_module is not loaded on my devices, maybe because Iā€™m using a cheap IR receiver ?

I think if you set up OSMC new it gets loaded by default. All my fresh installs had the lirc_rpi loaded. Iā€™m not using anything of that sort though. You not having the lirc_rpi module loaded would confirm my results. Lets see if someone else can test this.

Itā€™s set in config.txt by default, but it can be disabled from My OSMC. Itā€™s enable by default to support GPIO remotes out of the box, including the original OSMC remote.

Iā€™m now compiling a new debugging build with Kodi and was talking to @popcornmix this evening. There seems to be a thread which is created and is very short lived during playback. This sometimes correlates to my stutters.

The good thing is that I do see the stutters on PendelTest so can confirm this issue. The bad news is after watching it for 15 minutes today, I do feel slightly hypnotisedā€¦

2 Likes

How is this bad news? Just focus on the sound of my voiceā€¦ :stuck_out_tongue:

1 Like

Having watched a few episodes with OpenELEC and the lirc_rpi module enabled definitely introduced stuttering through the whole episode. Not 100% sure yet if disabling the module in OSMC removes the stutter 100% though. I have to test some more. Lets see what Sam comes up with. Would still be better if a few others could test this out. Whereā€™s @Jdiesel?!