Very interesting, but at the same time very "disturbing" something like that. I'm a little unsure to what extent this should/must be taken into account. For now I'll "just" keep it in my head and then I'll have to see to what extent it needs to be taken into account.Sherman wrote: ↑Mon Sep 02, 2024 6:41 pmRocky (who used to work on set-top box backend HW/SW) told me there is a wrinkle involved. Since presentation times are evenly spaced, it is not essential to include a time stamp in every presentation unit. Instead, time stamps can be interpolated by the decoder, but they must not be more than 700 ms apart. Now, is timestamp interpolation something for you to worry about? He says he's never seen interpolation on bluray/UHD disks, nor on audio streams, although he has seen it on broadcast video streams (e.g., DVB, presumably for bandwidth saving). It's likely that in practice for bluray/UHD disks both ways are fine. But maybe you prefer to be safe and not sorry.So the question is whether I even need to parse the durations if the duration can also be determined using the PTSs. Do you think that still makes sense?
OK, good to know.Sherman wrote: ↑Mon Sep 02, 2024 6:41 pmAnother complication is that if the video stream uses field pictures (unlikely for bluray/UHD) then the PTS difference would be halved. That would also complicate frame counting, as a frame would be made up of two field pictures. In practice it's not serious because it doesn't apply to audio and for video you can get the duration from the video frame rate. However, if you are needing to count frames you need to take this into account and not just count the PUSIs.
As far as I can tell, I don't really have to worry about the video stream. MTX does everything correctly when muxing. The subtitles should also be handled correctly, so I only have to worry about the audio and provide time stamp files for it.
Also interesting. Is the DTS always present?
Since it's only about audio, it would be good to omit the sorting of the time stamps. However, Mosu told me that TrueHD Audio also has something similar to B and P frames, and could the time stamps be "swapped" here?