Video playback stutters on MKV files

Hello, community and support!

Please help me with solving the following issue.
On some high quality movies the playback stutters quite often. I see the seconds counter in kodi playback gui continues to increment, however sound and video stops. The only way to overcome that is to fast forward.
I noticed that these stutters appear at the same places. There’s nothing in common with processor or memory resources as I monitored it’s usage in parallel and it seems fine. If I playback this file on my computer with the Potplayer it skips chapter marks quite fine.
I’m running kodi on my Raspberry PI 2, OSMC.

The kodi.log with debugs turned on you can find here:

The mediainfo for the file you can find here:

Please advice which other troubleshooting information I can gather in order to help understand the issue better.

The mediainfo shows mkvmerge v7.8.0 was used which is from April 2015; actual version is v16.0.0 … look at .
I would give it a try to remux the video with the newest mkvtoolnix and see whether the problem is gone with that. At least you know whether this is part of your problem or not.

Thank you Jim!
I did the remux using most recent version of the program and it made a big difference! Chapters remain the same as before by the way…
Playback still stutters but just for ~500ms and not on all chapter transitions.
And more important - the playback resumes after that.

So how do you think what’s next? The video should be considered as badly crafted and there’s nothing to do with kodi?
Even though another player could play it back?

Well, hard to say but sounds like a problem with the video file or how it was created or its original source.
If you remux the file, select the video stream and look on the right side for a flag which tries to resynchronize the timestamps. Perhaps this can even improve things somewhat more.

Please take a look on another logs and mediainfo for different video file. I also attaching links to examples of how this looks like, for better understanding.
I know, mkvmerge in this example is rather outdated, but this is hardly possible to do anything with it without remuxing all the downloaded videos each time an force all the authors to use newer program version.

Also from my current understanding it seems that doesn’t freeze on the chapter changes as I initially said.


Debug logs:

Kodi playback:

PC player playback:

As you can see, on my PC player it freezes just for one second and keep playing back by itself without intervention, but on OSMC it freezes until I press skip right, for instance.

Most probably it is a video file problems, but it is still possible for other players to overcome these situations better.
I just hope this could be heard by developers or probably someone knows this is well known issue and being solved somewhere else.

So even a PC can’t properly play these files? I’d say they are are badly encoded/muxed and will need remuxing to play properly.

I can say that all of my mkv’s with chapters play just fine. No stutter or pause at chapter points.

Yes, but the playback doesn’t stop… this is the difference

It’s still a bad encode/mux if the PC has a problem. I don’t think that anyone is going to make a patch to play badly encoded/muxed files.

Agree, it’s fair.
At least I had to report in case someone else has something similar and it has introduced not so far(maybe with kodi 17.x)

It’s still a bad encode, the PC simply has an abundance of brute CPU to deal with it…

1 Like

Then it’s a bad file.
Nothing we can do unfortunately.

Remux might help but really you should just replace the file.

Remux helps indeed. Thank you.
Decided to solve it for each downloaded MKV by issuing
mkvmerge -o output.mkv input.mkv
right on OSMC. It helps