Video stuttering after 5-10 minutes of play
#1
I am having an issue that started for no apparent reason - ie; I didn't do anything that I know of - about 1 week ago. Video starts stuttering, like it's dropping frames, freezing for part of a second, and getting way out of synch with the audio. I have not noticed any issue with the audio - it plays fine as far as I can tell.

This happens with any video - low-def DVD rips to high-def BluRay remuxes. It takes some time, usually at least 5 minutes of playing but sometimes longer, like 10 minutes. It sometimes lets me play 5-10 minutes of a video fine, but then starts stuttering on another video. This is always eventually reproducible within ~10 minutes, regardless of what TV show or movie I watch. Stopping and starting another movie/show will play fine for a bit, and then the stuttering starts again.

When the stuttering starts, I have stopped it and scrolled through the list of shows and this will be choppy, too. I can quickly scroll by 10 or 20 shows, it slows down for the next 5 or 10, then speeds up for then next 10-20 shows, and slows...

With on-screen debugging enabled, I noticed that one core, always #2, will eventually get to 100% and that's when the stuttering hits. If this core isn't at 100% then things play fine.

I mucked with various setting like passthru, sync, hardware acceleration, etc. It still happens.
I also disabled as many addons as I thought that I could disable, rebooted, and it still happens.
I recently ran the Video Database Cleaner v0.6.1 but that didn't help.

Videos play fine using gnome-mpv on the Kodi system.

If it's meaningful at all, .kodi directory is at 3.6 GB - 2.5 for userdata and 1.1 for addons, and the other dirs are quite small. Free disk space is about 4.4 GB.

The system is connected to a Synology NAS over a 100 Mbps Ethernet cable, and has been for about a year. The Synology is apparently fine, as it reports no issues and file transfers to and from my other systems are fine.
I installed Kodi on my Windows system, which has a gig connection to the NAS, and a couple videos played fine.

Hardware: 4-core i3-4010U CPU @ 1.70GHz, Chromebox, 4 GB RAM
Kodi 18.4
Lubuntu 18.04.3 LTS
Debug Log (9 MB): http://s000.tinyupload.com/index.php?fil...1347173110

In the Kodi debug log, at about line 46,330, I start seeing what *look* like errors to me, and they correspond - approximately - to when I started seeing the stuttering:

CVideoPlayerVideo::CalcDropRequirement - dropped in decoder, lateframes: 1, Bufferlevel: 2, dropped: 1
CVideoPlayerVideo::CalcDropRequirement - dropped in decoder, lateframes: 3, Bufferlevel: 2, dropped: 1
CVideoPlayerVideo::CalcDropRequirement - dropped in decoder, lateframes: 3, Bufferlevel: 2, dropped: 1
CVideoPlayerVideo::CalcDropRequirement - dropped in decoder, lateframes: 1, Bufferlevel: 1, dropped: 1
CVideoPlayerVideo::CalcDropRequirement - dropped in decoder, lateframes: 1, Bufferlevel: 0, dropped: 1
CVideoPlayerVideo::CalcDropRequirement - dropped in decoder, lateframes: 1, Bufferlevel: 2, dropped: 1

Any help would be appreciated.
Reply
#2
I managed to watch two 20-minute videos, and it happened again a minute or two into a third. I let it sit for a while while I tried some debugging, and then exited after 10 minutes

Partial, non-debug log:

2019-10-03 19:03:00.671 T:139908419938432  NOTICE: Using GL_TEXTURE_2D
2019-10-03 19:03:01.252 T:139905791416064  NOTICE: CDVDVideoCodecFFmpeg::CDropControl: calculated diff time: 41727
2019-10-03 19:03:04.198 T:139905791416064 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
2019-10-03 19:05:16.990 T:139905783023360 WARNING: Previous line repeats 25 times.
2019-10-03 19:05:16.990 T:139905783023360  NOTICE: CVideoPlayerAudio:Tonguerocess - stream stalled
2019-10-03 19:05:19.064 T:139905791416064 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
2019-10-03 19:15:45.862 T:139908419938432 WARNING: Previous line repeats 1203 times.
2019-10-03 19:15:45.862 T:139908419938432  NOTICE: CVideoPlayer::CloseFile()
2019-10-03 19:15:45.866 T:139908419938432  NOTICE: VideoPlayer: waiting for threads to exit
Reply
#3
I copied some episodes to the local drive and watching one still had the issue.
Reply
#4
Please upgrade your 4.15 kernel to a newer LTS kernel and try again.

The problem with the old LTS kernels is, that bugs from 3 years ago suddenly reappear and I need to check in the most far part of my brain to find it again. Try: 5.0.0-29 ... which is alsa available for that.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#5
Thanks. I'll look into that.

But I'm not so sure it's a kernel thing. I renamed .kodi to .kodi_old and rebooted and reconfigured a few directories. I haven't seen an issue in 3+ hours.
So it would seem to be something about the database or addons or anything else under .kodi.
This could be an easy "fix" but I'm reluctant to go through with this and lose all that configuration - primarily all the tagging I've done over the last 2 years.
Reply
#6
Updating to 5.0.0-31 kernel didn't fix the issue.
Reply
#7
Okay. Turn next step: try libreelec from an USB stick.

The error you get means, that the SW stack (mesa, drm, kernel, vaapi) is stuck for a moment.

Nothing we can do about it.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#8
Since the issue doesn't happen after renaming the .kodi directory to .kodi.old, what will using LibreElec prove?

I would think that starting with a new .kodi proves that the issue is caused by something within .kodi/, like a setting or addon or cache or something else that is stored under .kodi/
Reply
#9
Okay.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#10
Thanks for the help.
Reply

Logout Mark Read Team Forum Stats Members Help
Video stuttering after 5-10 minutes of play0