
Note that most players don't know how to handle this either. Leawo Blu-ray Player exhibits the same behaviour (software that specializes in physical media playback), so does mpv:
Code: Select all
Invalid video timestamp: 0.000000 -> -0.049444
# wait 15 seconds
Invalid audio PTS: 14.976000 -> -0.049444
Reset playback due to audio timestamp reset.
ffmpeg doesn't do to well either; it just wants to "fix" the problem:
Code: Select all
[vist#0:1/mpeg2video @ 0x56309c7b3d00] timestamp discontinuity (stream id=480): 14961444, new offset= 0
[aist#0:2/ac3 @ 0x56309c7b2a80] timestamp discontinuity (stream id=128): -14929444, new offset= 14929444
[vist#0:1/mpeg2video @ 0x56309c7b3d00] timestamp discontinuity (stream id=480): 14929444, new offset= 0
[aist#0:2/ac3 @ 0x56309c7b2a80] timestamp discontinuity (stream id=128): -14897444, new offset= 14897444
[vist#0:1/mpeg2video @ 0x56309c7b3d00] timestamp discontinuity (stream id=480): 14897444, new offset= 0
[aist#0:2/ac3 @ 0x56309c7b2a80] timestamp discontinuity (stream id=128): -14865444, new offset= 14865444
[vist#0:1/mpeg2video @ 0x56309c7b3d00] timestamp discontinuity (stream id=480): 14865444, new offset= 0
[aist#0:2/ac3 @ 0x56309c7b2a80] timestamp discontinuity (stream id=128): -14833444, new offset= 14833444
[aac @ 0x56309c7fa040] Queue input is backward in time
[aost#0:1/aac @ 0x56309c80ba40] Non-monotonic DTS; previous: 717824, current: 717312; changing to 717825. This may result in incorrect timestamps in the output file.
Is this out of scope for MakeMKV? The only other software I tried was DGMPGDec but that also couldn't deal with this. I'll probably check out other software at some point, although I doubt that they'll do any better; this just smells like it needs some custom code because I'm thinking that all demultiplexers will just assume that the timestamps are bad.
I also have some ideas about how to (losslessly) fix the problem: Since the timestamps in the MKV are "good" I can just extract the first frame and duplicate it to the desired length. I don't know how to access the missing audio data though so I might have to take that from another source and transcode it to AC3. But before I jump through any hoops I'd first like to get your feedback. I can also post a 12 MiB sample if a dev is interested (it'll only be ~20 seconds so it should be legal to post on here).