Kodi Community Forum

Full Version: Kodi 20 audio out of sync after resuming
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi,

I noticed something on the latest Kodi 20 running on Android TV.

When I resume a title. Any title. With any possible audio format (DTS, AC3, Opus, AAC)  that I have here on my NAS, A/V is out of sync. 

Sometimes after a minute or two after resuming the image freezes and the audio keeps going. Also, the out-of-sync issue sometimes is just by a little and sometimes for two or more seconds.

Playing a title, any title, right from the start everything is fine. The issue appears only after resuming.

The hardware I'm using is a Xiaomi Stick TV 4k, I have AC3 transcoding enabled (for Opus and AAC stuff) since my receiver is only capable of DTS and AC3.

Is there anyone else having this issue?

Please, let me know.
I had a lot of very similar issues like you describe with 19.5, but they were so intermittent and difficult to reproduce on demand that I never could trace them down.  I often saw the problems more frequently after using trick-play buttons instead of just pausing the video.  They certainly were not there every time I resumed a file.

I have not had 20.0 long enough to comment if the same problems are better or worse on my system.
(2023-01-23, 20:00)Mauser Wrote: [ -> ]I had a lot of very similar issues like you describe with 19.5, but they were so intermittent and difficult to reproduce on demand that I never could trace them down.  I often saw the problems more frequently after using trick-play buttons instead of just pausing the video.  They certainly were not there every time I resumed a file.

I have not had 20.0 long enough to comment if the same problems are better or worse on my system.
Thanks for replying it.

I tried to pick a log. But Solid Explorer is not playing well with the Android TV running on my Device (Xiaomi TV Stick 4k) to post here.

Advance a video (any) to the middle of its runtime. Close it. And then try to resume it on Kodi 20.
I am not having any problem with out-of-sync audio on resumed videos with 20.0.  I tried several different types, including .iso files and .mkv.  I would hit the stop button, then re-select them from the video list and choose resume.  Audio was always in sync.

I am still having intermittent problems with the video/audio not playing properly after jumping around with trick play, particularly if I make several jumps close together, or try to jump far with the up/down buttons.  In particular, sometimes the screen will show a blue circle with 100 in the middle, and then the playback never resumes properly unless I stop it and resume.  But these problems are not what you are complaining about.
Please post a Debug Log - also don't try a nightly for now, cause your use-case: Dolby Transcoding is currently broken there. Not in Audio side, but in FFmpeg side. Can you link you a fixed build later on, after you have posted your Debug Log.
(2023-01-26, 19:18)fritsch Wrote: [ -> ]Please post a Debug Log - also don't try a nightly for now, cause your use-case: Dolby Transcoding is currently broken there. Not in Audio side, but in FFmpeg side. Can you link you a fixed build later on, after you have posted your Debug Log.

Sorry for the late reply.

Here it is: https://paste.kodi.tv/tisakilotu

I have also stumbled upon another weird behavior.

Today, when I tried to watch a movie on Kodi that needed to transcode Opus to AC3 5.1 the audio, is in an incredibly low volume but kinda in sync 

I haven't noticed this before.

Hope that helps
Please retry with a nightly. Does it get better?

There are some issues pending to be fixed in nightly (so turn off Dolby Transcoding) for now - but A/V sync should have heavily improved.
I have tried the latest Android Nightly from here: https://mirrors.kodi.tv/nightlies/android/arm/Nexus/

I completely uninstalled Kodi.  Only then installed the nightly build. Had to set it up all over again.  I only enabled SPDIF Passthrough AC3/DTS. Didn't enable AC3 transcoding as told.

The sound is back on its normal volume again, which made this whole extra work worthwhile, but, unfortunately, the issue persists. There is still a considerate A/V sync delay

Here is the log: https://paste.kodi.tv/uxevizojip

Feel free to contact me if you see fit a test with a different build.

Hope that helps.
The log indicates an issue with writing data to the audio sink, which causes huge delay or even wrong return of the sink. Try switching the Audio Device to the non-recommended RAW as your passthrough device. This should give Android the entire control of how it wants to have its data written ... might work better. For the other effect I sadly cannot do anything.
It worked. Changing the audio sink solved the issue with the loss of A/V sync while using the spdif passthrough.

Do you think it will be possible to have a fix regarding the AC3 transcoding issue currently present on FFmpeg at some point in the future of Kodi 20 development?

Thanks.
Jep - the fix is already under the way. If you need a working version today, here is the fix that I carry in my local audio development: https://jenkins.kodi.tv/view/Android/job...bi-v7a.apk Transcode should work here. Remember to set Speakers to 2.0 else the Dolby Transcoding won't be available as LPCM is to be preferred.
Apparently, it works.

Let's hope that it stays that way until a proper build is released in the future.

Thank You.
Good call. My issue is related, I recently added a Nokia 8010 streaming box to my gear which comes with Android 11. I have one particular movie where audio gets out of sync by several seconds, with the following results:
Android 11, Kodi 20.1: out of sync
Android 11, VLC: in sync
Android 9, Kodi 20.1: in sync
Android 9, Kodi 19.x: in sync

Interestingly, other movies I tested do not show the out of sync issue. I checked codecs, settings, video resolution, etc., they are all the same between the different movies. Setting pass-through to raw solves the sync problem on Android 11.
I also bought this box recently (NOKIA 8010), I was on Nvidia Shield Pro before. Never had any problems with audio sync, pass through...nvidia is amazingly stable in that field.
Now, I just can’t find the right settings for Nokia to work without stuttering and lipsync problems. Sometimes KODI crash after I enable passthrough also, and sometimes the video starts, but with audio or subtitle delay. If I disable passthrough all is working fine but it is not ideal because I get “multi-in” on my AVR instead correct audio format. I’m not sure which Output Audio Device I should use in KODI with this device, there are many options in Android settings also: Auto, NO SURROUND, Passthrough, and then three options for Dolby: DD, DDP, Dolby Mat? What are the best settings for a Nokia device which is going through Denon AVR to TV? I'm on the latest Android OS, tried KODI 20.1 stable, and also the latest nightly.
Can you return the box? Life is too short for broken firmware.
Pages: 1 2