Originally Posted by Berland
According to the guy behind OSMC (Vero 4K+), this problem occurs because the movies in question are out of specification (blu-ray and uhd blu-ray). All titles seems to be connected to Disney in one or another way. Kodi is working on solving this. Previously Kodi completely crashed, now you only get a break in audio stream, but Kodi is working according to specifications, the problem is that these movies are not.
I’ve read all of Sam Nazarkos (OSMC) posts about this issue. I believe from reading his posts and all the other posts on Kodi forums, some forums as well as the GitHub bug reports there are a few issues that combine to give similar results.
Firstly there is an issue with the way some software extracts and muxes the streams into the mkv. This issue is related to the seamless branching on the original discs and is an encoding technique theta Disney seem to use much more commonly than other studios. The problem here is that the encoding frame lengths differ between HEVC for the video and TrueHD for the audio. At the branching point there is sometimes an error in the mkv with AV sync as the ripping software doesn’t always deal wirh the frame length difference well. Some people have had success re extracting the audio with something like eac3to and then remuxing into the mkv.
The other issue seems to be separate and related to the moments when the truehd bitrate momentarily exceeds 11mbps. Sams own words on this are”That’s correct. It occurs because the isn’t able to handle this. Unfortunately there is some rationale with the bitpacking routine that we don’t understand. We reached out to the developer but didn’t get any response from them; so we are in the dark.”
He is talking about the code in Kodi. It was written in 2009 or so and no truehd bitrates were that high back then because no one had audio streams with Atmos extensions encoded on top of the base layers.
So I am not sure that the movies in question are out of spec per say but just that the code that deals with the audio was not written with content available at the higher end of the spec. It could deal with everything available at the time but not anymore.
The effects this causes in Kodi has ranged from nothing to most commonly an audio dropout where video playback continues but can also cause Kodi to crash and restart itself.
From reading the GitHub bug tracker the code that is causing the crash has been fixed ( and may even be in 18.5). But the code that deals with the packing is not fixed and so the audio dropouts still occur. This was code based of ffmpeg. The error has been fixed with other code that is present in other software players. Example the LAV filters have fixed the same issue. But the new code is significantly different to the implementation of the bitpacking routines currently in Kodi and so it is not an easy fix to simply exchange the code.
On a positive note Sam Nazarko repeatedly says they are working on it. As you know he does the development for OSMC. But he also regularly contributes code and changes for Kodi itself. So if he comes up with a solution for OSMC then I am sure he will backport it to the Kodi base.
I know this is all a bit off topic so I apologise. I do love the collective knowledge on this forum though and I know that immersive audio is a topic close to everyone on here.
Sent from my iPhone using Tapatalk