Sound is delayed by whopping 300 ms when playing heavy MKV/H264 with PCM audio
#1
I've already submitted an issue on Github, but I thouht I'd also post my issue here as well... Especially because there's no officiall support for the Xbox version on Github.

Basically, I have some high bitrate mkv videos (BDRemux) with PCM audio streams in them, and I thought the problem was perhaps the USB speed, but nope. I have them on an SSD connected through a USB 3.0 enclosure, and VLC for Xbox plays them without any sound delay whatsoever. I would keep using VLC, but I don't like it because it doesn't have an option for changing TV framerate to the video's respective framerate.

In Kodi, it absolutely doesn't matter if I enable or disable any options whatsoever (such as: change TV framerate to match the video / on the contrary, adjust video and audio framerate for TV framerate / both / enabling or disabling passthrough, et cetera). The result is always that the sound is delayed by approximately 300 ms, so I have to manually "delay" it by negative 300 ms so that everything is synchronized.

Again, I thought it was because of the external enclosure / disk / USB poor speed, but nope, VLC doesn't have any delays when playing those files at all. I just don't wanna use VLC because it only supports 60 Hz and doesn't change the TV framerate to such of the video. Again, in Kodi, it doesn't matter if I do it or not, there is always ~300 ms audio delay unless I manually set 300 ms ahead for audio.

I've no idea about how it can be fixed, but I've made sure it's not because of the supposedly low speed of my external enclosure / SSD in it / USB 3.0 as such, because the issue is not reproducing in VLC.

The Debug Log can be found here: https://drive.google.com/file/d/1219MTX_...sp=sharing

Please note, when creating the debug log, at first I played a few video files without any audio adjustments (and in that case the sound was delayed by 300 ms), then I globally switched the sound "delay" to negative 300 ms (i. e. 300 ms ahead) and also played a few videos after that (for a couple of minutes, sometimes with fast forwarding some of them). The issue of course was gone, but I don't think it's a cool solution to the problem that shouldn't exist...

The MediaInfo of the files I play:

Any tips except for manually setting a negative 300 ms delay for the audio? I don't think that's how it's supposed to work. If anything, I'm generally using the first audio track, but the issue is present in any. If you guys want a sample file, please tell me how I can send it confidentially (it's not NFSW, but yet unpublished expensive content).

Also, for the reference, I have the very first Xbox One model that I pre-ordered in 2013 (Day One).
Reply
#2
(2024-07-12, 02:31)COOLak Wrote: Especially because there's no officiall support for the Xbox version on Github.
That's news to me.

Could you provide a sample please?
Reply
#3
(2024-07-12, 10:14)Hitcher Wrote: Could you provide a sample please?
Sure thing! To the team member - absolutely. But, as I mentioned, those are confidential, I'm not willing to just publicly post a link. I think your PM is closed. Can you kindly PM me with your Google email so that I upload it to my Google Drive and give access to you only?

Sorry for double posting, please remove the message where I fogot to quote a phrase. I thought I could edit my messages.
Reply
#4
@Hitcher, can you kindly confirm that you received private access to the example file?
Reply
#5
(2024-07-12, 13:41)COOLak Wrote: I think your PM is closed.
PMing is closed for new users.

Downloading the sample now.
Reply
#6
I honestly can't tell as it's an anime with Russian/Japanese audio, sorry.
Reply
#7
(2024-07-12, 20:24)Hitcher Wrote: I honestly can't tell as it's an anime with Russian/Japanese audio, sorry.

The Russian tracks are full dubbing (paid by me), and if you see that the charachters' mouths are perfectly aligned, then everything is OK (in my case, only with audio set to 300 ms ahead). Otherwise, you can see that the voices start to sound later than the mouth opens and the other way around. It doesn't matter what language it is to notice it.
Reply
#8
(2024-07-12, 20:33)COOLak Wrote: It doesn't matter what language it is to notice it.

Especially with 300 ms delay. Honestly.
Reply
#9
Watched it a few more times with both languages and I didn't notice either being out of sync - even the footsteps seemed in sync. I then added a -300ms delay and immediately noticed it was out of sync.

This was tested on the Series X.
Reply
#10
(2024-07-13, 00:29)Hitcher Wrote: Watched it a few more times with both languages and I didn't notice either being out of sync - even the footsteps seemed in sync. I then added a -300ms delay and immediately noticed it was out of sync.

This was tested on the Series X.

Ok, thank you for your time. Then it's just specific for the old Xbox One. Or to the external enclosure (even though on VLC it's fine, but maybe not so optimized in Kodi). In any case, if none of the devs have an old Xbox One, I guess I'll just have to keep using -300 ms adjustment. I just don't have other devices other than Xbox One for comfortably watching such files. And I hate to watch from a PC. And my TV is not smart, it's very old and doesn't play these either. Unfortunate, but understood.
Reply
#11
You could add the delay to the file using something like MKVToolNix.
Reply
#12
AudioDelay is stored on Kodi database per file (settings table "AudioDelay"). This means that if only some files needs it and you set for these files the rest of files play correctly with zero delay.
Reply
#13
(2024-07-13, 11:17)jogal Wrote: AudioDelay is stored on Kodi database per file (settings table "AudioDelay"). This means that if only some files needs it and you set for these files the rest of files play correctly with zero delay.

This whole anime needs -300ms delay in Kodi (but nowhere else). I currently don't watch anything else anyway. So for now I made it a global setting.
Reply
#14
(2024-07-13, 09:30)Hitcher Wrote: You could add the delay to the file using something like MKVToolNix.

Whoa, why would I remux dozens of files again just for that, especially considering that they don't need any delay. The isssue is reproducing just in Kodi. The global -300 ms setting should be enough for the time being of watching this particular anime and possibly other similar stuff.
Reply

Logout Mark Read Team Forum Stats Members Help
Sound is delayed by whopping 300 ms when playing heavy MKV/H264 with PCM audio0