Resuming playback, audio momentarily muted - keyframes?

Interesting

1 Like

Great. Hopefully, the devs can test this in their nightly builds.

Paging @TheCoolest and @Ray . It is quite annoying and it would be great if this fix works and can be incorporated into the nightlies for testing.

Maybe kodi team is already aware & fixed it for Android:

CE doesn’t use AndroidMediaCodec.
Looks like that line of code clears the buffers, it’s possible that it has been put there for a reason, and may cause issues with different types of content.

Yes, I know…:roll_eyes:
But the problem there (too much flush after resume, causing side effects on decoders) could also be the rootcause for this problem.
In https://github.com/CoreELEC/xbmc/blob/master/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAmlogic.cpp, we have the same Flag handling (line 418-421), which was deleted there.
Maybe worth to make a shot in the dark and try this instead of changing core VideoPlayer.cpp, which indeed may have other side effects.
Maybe peak3d could help here, too, as this needs detailed understanding of AV processing.

4 posts were split to a new topic: Audio delay

Hi I’m still facing this issue, I think it is related to passtrough as I faced simillar issue in the past when using passtrough. Thing is if I disable eAC3 passtrough sound is all messed up.

I have here a test version including the fix from @ukmark62 included:
https://test.coreelec.org/Portisch/CoreELEC-Amlogic-ng.arm-9.2-devel-1581274869.tar

It’s not included in nightly yet!

1 Like

Thanks very much for this. Have tried this version and audio is now immediately heard upon resume.

Its good find, although not easy to pick, because DVDVideoCodecAmlogic.cpp doesnt have GetOutputPicture method.

As @umark62 tracked within opened Issue, the context for this buffer flush is here - should affect just resume point. My observations with latest Kodi@CE - video starts a bit earlier than stopped state anyway (doesnt bother me, maybe in contrary. Most important is it doesnt start later).

I think nearest keyframe before makes sense (quote from issue: “This line was not present when #11713 was first done.”)

I can confirm that big pause after resume/seek is gone with flush buffer removed. Cant comment impact on A/V sync as there is need more tests and comparations.

Please do so - we are not sure if this changes will have affect to other places in Kodi or hardware decoder.

Ill try. Although I cant make 100% statement as I change configuration from C2 to VIM3L recently, and I am still catching spot on delays (I mean for different TV modes, different sources/fps). So cant tell if some changes was just because that buffers, more like because I jumped from 3.14 to ng kernel.

So far only TV testing, no projector profile, seems to be promising…

Update: A few projector movies, still doesnt spot issues.

The patch is tomorrow in next nightly included.

unfortunately i have to highlight this thread again. strangely enough i have the bug only sporadically.

i made an entry in advancedsetting and it was good for a few days.

unfortunately i had the mistake again today and the video stuttered:

WARNING: ActiveAE - large audio sync error

strangely enough, I restart the odroid n2+ and the video runs without stuttering :confused:

any idea what I can do?

Has this problem been resolved? I get a consistent one second audio gap every time I pause. I am on 9.2.5, amlogic-ng (Odroid N2+). Thanks

Same here, on Odroid N2 with 9.2.6 I have the gap in audio after pause. Would say is less than one second, though. It appears also for software decoder.

Where can a bug report can be filled for this ? It’s very annoying and I lived with it since I got my Odroid N2 in August last year, hoping at every update it will be solved. Who tests these releases ? How come they don’t notice such an obvious issue ?

This all depends on settings. I had this issue before but I tweaked audio settings and now it’s gone. Also don’t use the auto skip back addon because it makes this issue worse.

Would you mind sharing the tweaks you made ?