Kodi crashes with a few tv shows videos if passthough is enabled

That’s a good point indeed.

I opened an issue on kodi github in the meantime : oom gets kodi killed when playing a dts-hd file · Issue #17721 · xbmc/xbmc · GitHub

Just in case, i also made an extract from an episode which doesn’t have the issue (simple mkv cut of the original video first minute : Kaamelott S01E22.mkv) :
The file is here : Alternatives to

Here’s the answer I got from kodi team :

Please post the windows crashlog and debuglog as well. Kodi’s code does not support dtshdma on your device, therefore it’s not an issue in kodi.

@darwindesign, do you have your kodi.log from your Windows test please ?

I’m not sure why you’d open an issue before you confirm it’s a problem with the bitstream (i.e. playing with passthrough on another player, like VLC).

From what I can see, it’s pretty clear that the file is borked.
We should still solve the memory issue however.

FWIW a UWP Kodi debug log playing a working DTS-MA stream and then this test file (which I manually stopped after it ate up 30gb of RAM).

https://paste.osmc.tv/agovusimur.tex

EDIT: You left out quoting that they asked for logs showing it happening in Kodi 19 (which i’m not going to do) which makes it clear to me that they are not supporting DTS-MA in Leia even on Windows.

Because of that, it should maybe refuse to read it, but it shouldn’t cause oom to kill kodi, that’s not an expected behaviour.

I will try with vlc tonight but I have a setup to do before, since I don’t output sound on hdmi and have a dp screen only.

That’s why it worked on VLC.
If you don’t play the audio, the video will of course work.

I wasn’t able to reproduce it with vlc (passthough on display port through my graphic card), same with kodi win64 (passthrough enabled but no option dts-hd).

Thanks, and indeed i forgot to say about Kodi 19.
It’s no big deal. Showing it with 18.6 should be enough.

What should i go next, borked file or not ?
Open a case with osmc ?

I know my way around linux (when i don’t miss logs …) but not really for video files and encoding.

I would suggest remuxing the file to remove the erroneous bitstream as a workaround.

If you believe it’s an OSMC specific issue, we can investigate further, but it looks like it affects other platforms, so it would be a Kodi issue. It would be good to test on Kodi v19.

Again - you won’t have a problem unless you pass through the HD audio stream.

I don’t know if it’s specific to osmc, but it seems dts-hd related, which is only available on osmc, given the return on kodi github.

Since my AV receiver can handle dts-hd, i’d rather use passthough on kodi.

I can try on kodi 19 but since i wasn’t able to reproduce it on kodi 18.6, what should i expect ?

On the other hand, i might be able to reproduce it using a live usb ubuntu, and boot it on my computer.
It’s worth a try.

DTS-HD is not specific to OSMC, or @darwindesign wouldn’t have been able to reproduce the problem on Windows.

I think you’re missing my point though.
For sure, we can fix the OOM issue, but then without a remux you will either need to disable passthrough of this specific track or have no sound.

I see - so you can’t reliably reproduce the problem on OSMC running 18.6?

I can disable passthrough for the borked files or remux them, that’s easy enough to do.
Indeed, i misread kodi post on github, they only spoken about amlogic devices.

No, i can reproduce it on osmc, but i wasn’t able to do it on my w10 x64 computer, running kodi.

When enabling passthough, outputing sound through my graphic card, i hadn’t the option to enable dts-hd like i have on osmc.

That’s why i’m creating a live ubuntu on an usb key to boot it on my computer and try to reproduce it with kodi 18.6, then 19.

I managed to do it by screen mirroring the hdmi output on my laptop which was plugged into my AVR and then in Kodi changed the passthrough output device to WASAPI, as direct sound lacked the extra options.

I tried to do it on a RPi4 with both LE and Raspbian but there was no DTS-MA passthrough option in either.

I was finally able to reproduce it thanks to you, with wasapi.
Everything is on the github issue, 18.6 and 19 crashed on my computer (w10 x64).