Non-monotonous DTS and jittering

MKV playback, recompression, remuxing, codec packs, players, howtos, etc.
Post Reply
l4p4ssword
Posts: 2
Joined: Fri May 05, 2023 12:27 pm

Non-monotonous DTS and jittering

Post by l4p4ssword »

Hello,
I am trying to rip correctly my Lady Gaga Monster Ball Tour BD because my audio receiver can't correctly decode DTS lossless formats so I usually remux my BDs with the original video stream + lpcm audio and have them stored in my NAS to stream on plex.
Usually no problems occurs, but with this rip I noticed heavy jittering in the streaming. This happens in 2 of the 3 valid BD titles ripped with makemkv on my macbook m1 pro.

I found out these 2 titles causes a ton of "Non-monotonous DTS" errors when I try to decode TrueHD tracks in ffmpeg, but I'm almost sure it's not a problem related to audio since one of the three contents on this BD with TrueHD (the behind the scenes video) works a charm without this error and it's played with no jitter by plex. The command I use to reencode the MakeMKV output for my use case is:

Code: Select all

ffmpeg -i title_00.mkv -map 0:v -map 0:a:0 -map 0:a:2 [I skip AC3 tracks] -map 0:s -c:v copy -c:s copy -c:a pcm_s24le -f matroska out.mkv
Note: if I skip every audio/subtitle track mapping video only the problems occurs as well!

Code: Select all

[matroska @ 0x7fe465feccc0] Non-monotonous DTS in output stream 0:1; previous: 6499260, current: 6499170; changing to 6499261. This may result in incorrect timestamps in the output file.
The only way I can prevent jitter to happen is if I manually extract .m2ts file from BDMV folder and "convert" them with the command

Code: Select all

ffmpeg -i 00054.m2ts -map 0:v -map 0:a -c:v copy -c:a copy out.ts
there are no DTS errors and then plex can read that with no jitter. But I can't decode to lpcm since ts format can't support it, and I loose the ability to load menus as well.

Another four interesting things:
1. VLC macos can play every MakeMKV output fine with no jitter.
2. If I copy TrueHD tracks only in m2ts when I do the m2ts -> ts conversion, DTS errors occurs as well, so I have to copy all tracks mandatory, eventually converting the AC3 tracks to whatever .ts supports, for example mp2 or mp3
4. Those DTS errors occurs even if I copy the mkv from MakeMKV with no audio/sub in a separate .ts file.
3. Reencoding solves the problem

How can I properly do this?
dcoke22
Posts: 2631
Joined: Wed Jul 22, 2020 11:25 pm

Re: Non-monotonous DTS and jittering

Post by dcoke22 »

I've never tried to do what you're doing. I did find this StackOverflow question which seems relevant. https://stackoverflow.com/questions/559 ... ing-ffmpeg

My receiver can't decode the lossless formats either. When I want to preserve that level of quality I select the FLAC profile in MakeMKV before I make a rip and MakeMKV converts the audio to FLAC (via an embedded ffmpeg) in the resulting .mkv file. In my playback setup, my player decodes the FLAC and sends LPCM to the receiver which is none-the-wiser.

On the fly audio conversion
l4p4ssword
Posts: 2
Joined: Fri May 05, 2023 12:27 pm

Re: Non-monotonous DTS and jittering

Post by l4p4ssword »

That was the plan, unfortunately in the same moment I copy the original video in m2ts in a mkv file I get this error and jittering. The ts format don't support FLAC or LPCM either so I can't decode DTS audio. As I said, the only way to prevent jittering is to play directly the .ts file with AC3 audio :/

I tried the tricks in that link and none of them worked for me
Post Reply