Log in

View Full Version : Developement Question - DTS inside Subtitles


mbcd
2nd January 2012, 02:23
Hey guys,

I am developing my first program and I need to know how to handle DTS.

When I am creating a new subtitlefile I know the PTS, but whats with the DTS-Field?

Can I set it to "zero" or do I have to calculate a value that depends on PTS?

I think that DTS is calculated and inserted by those muxersoftware that creates the final filestream, or am I wrong?

How do I have to handle DTS in new created subtitlefiles ?

Tappen
4th January 2012, 22:58
I ignore DTS when decoding, but if I were to guess at a reasonable choice I'd say make the DTS 500ms before PTS. This would probably give hardware devices time to decode without overloading their cache buffers.

The only complication is to make sure you don't change the DTS to before the start of the video or have the DTS and PTS on different sides of a chapter mark.

mbcd
5th January 2012, 12:18
Yes, I read about 730 ms maximum "preload".

But as I said, I dont know if muxers take those jobs and add DTS, I am not familiar with this stuff. I think I have to fill those bytes even with zeros, otherwise the stream may not be readable ...