Dropped frames caused by subtitle rendering

Some sort of updating started upon editing and running command “sudo apt-get update && sudo apt-get dist-upgrade && reboot”. In some point I have been asked to accept 46MB to write down. As you reverted the driver, there is no need for trying to update again I assume. Should I wait for stable version then?


The driver might fix the issue but isn’t stable enough for other activities.


The driver update will not fix the stutter on first subtitle being displayed. This is something thas has not been solved until now. Maybe it even needs some fix in kodi itself.

That is my suspicion too.

Has this issue been fixed in Leia? Clearly rending takes too long for the subs to be made ready, hence a frame or more is dropped. I read the thread at the top from the LibrELEC Forum but it ended some time ago without any conclusion.

I tried experimenting with disabling the dirty region refresh (0</ algorithmdirtyregions>), it made the problem less severe and less uniform but it is still there on my Vero4K.

Tested with Avatar and internal PGS subs as there is nice camera movement in some scenes that allows one to instantly see the issue. It’s the only movie where I can really spot the issue 100% of the time with ease because of the camera movement.

The issue at least seemed to be present with opening random OSD elements when playing a video as well (in the same, sometimes random fashion) - showing in frame skips in the player debug overlay. We tested this on our OSMC Leia test builds and it didn’t seem to show. :+1:t2:
So, I’d expect the frame skipping of some subtitles to be gone as well, but AFAIK this wasn’t specifically tested yet… Maybe there’s someone on a Leia build who can confirm this with a sample clip (@joakim_s?).

1 Like

Well, the Avatar PGS subs are similar to overlays as they are 1920x1080 in size, which is unusual for BDs - but not uncommon. But I like them because they are stylized and I don’t want to use burned-in subs. The problem shows in similar ways with any extras (like Storyboard Graphics) that are displayed in a PGS stream and cover much of the screen on other movies. Something in the “preparing the overlay” takes too much frame time because once the elements are ready there are no dropped frames. Once the PGS is visible there are no drops - yeah, clearly a Kodi defect no doubt about that.

But if OSD element problems are reduced with Leia it is highly likely that unusual large PGS stuff will not cause frames drops as well. Well guess it comes down the bad UI element rendering of Kodi that just takes up too much frame time.

If anyone can test Avatar with PGS subs on Leia that would be nice as this would be an extreme case with 1920x1080 PGS that go on and off all the time.

@sam_nazarko also pointed out that it’s most likely an issue with the VideoPlayer’s frame rendering in Kodi v17. Picture based subtitles are the most likely candidates to produce this skipping behaviour besides OSD elements, that’s what I believe as well.
Could you make a short test clip from an Avatar scene that shows the issue quite reproducibly? Then we could test that clip and maybe get this sorted out. I’m sure, @sam_nazarko can provide a link where you can upload such a test clip for us. :+1:t2:
If it’s solved with Kodi v18, we’ll have to wait for the final release to get rid of this - or use a test build. AFAICT, backporting is not possible.

Sure, I’ll make a short Testclip later that covers a short scene where the problem is very easy to reproduce with problematic PGS found on BDs. Would be good testing material in regards to a future Leia release or any experiments.

And here is a Testclip that shows the issue: https://drive.google.com/open?id=1jbNqJ1yVUOJZmGIT9SxN0OiL3ZVXaREd

As said it’s because of 1920x1080 PGS subtitles, if you OCR them to a text format the problem does not show up of course, also not with BDs that do not use full frame PGS. So it’s very similar to dropped frames caused by OSD controls. Kodi is just wasting tons of frame time here - the location can probably be traced down in the code.

The problem is a bit more pronounced when you playback from a full encode over the network or from local media as this small sample fits completely into the cache, which seems to help a bit. But the problem is clearly visible when playing at the correct refresh rate because of the smooth camera movement in that scene during the time when the subtitles pop in. Hope that helps with testing on Leia if there is improvement in Kodi in regards to any kind of larger overlays.

If you need some more details from my end pls. let me know.

As a side-note: I can also see the skips in the PlayerProcessInfo window (activate with “o”) when playing this back on a OSMC v17 RPi3. The v18 test will be interesting :slightly_smiling_face:

Well there is skipping on Vero4k and Leia also, seems it’s not fixed in Leia

On the tested v18 build we’ve got a very strange issue now. On v17 there’s just skipping when a subtitle shows pops up. On the tested v18 build there’s pretty much constant skipping however. :thinking:
We’ll have another look at it in the team and we’ll get back to you :slightly_smiling_face:

We’ve given this another shot… Testing your clip didn’t show skipping in the second attempt on our v18 test build. It looks like it’s solved with Kodi Leia. But the test builds can still be buggy sometimes and things are still WIP. So, this might not be definitive, but it looks rather postive, if you ask me :slightly_smiling_face:

1 Like

Has anyone had any luck fixing this issue? I’m on the April 2019 update on the Vero 4K+. Still have dropped/skipped frame on Avatar each time a subtitle is rendered on the screen.

Appreciate any suggestions.

Can you post some new logs?
I don’t think this has been an issue for some time.


Sure thing… https://paste.osmc.tv/fotimofudu

Had this issue on Kodi 17 and was hopeful, based on Chillbo’s last post, that K18 would fix it for me but that that was not to be.

Thanks for taking a look at it.

2019-05-10 11:28:57.141 T:4029674208 WARNING: ActiveAE - large audio sync error: 5965.897497

A remux will probably solve the issue.


Remuxed file. Made no difference regarding the subtitle issue. logs: https://paste.osmc.tv/olekatowib


Does it play fine on pc and or other devices ?