[FFmpeg-devel] Updating initial dts when streamswitching and dts/pts wrap occurs

Erik Van Grunderbeeck erik
Wed Jul 1 17:51:13 CEST 2009

Erik Van Grunderbeeck <erik <at> arawix.com> writes:

> That's what I am working on Joakim ;)
Yea, thought I had mentioned it before.

>> Theres a few issues with the nav packets (esp in menu's, where you are
>> sure you are playing the chapter "till then end"). Issue is the dts
>> for decoding that are used in syncing audio/video. Think I have found
>> something now though, Ill see.

>Hmm, why is it a problem if you don't play it to the end? nav packets show
>alot more often than chapter points. They are there just about every half 
>second. You should be checking every navpacket against the last to spot 
>discontinuity. So worst case you get a small half a second discontinutiy in

>the pts.

I think you are talking about cell packets? I am not parsing the whole
layout myself, or rebuilding a VM, I am using libdvdread to generate the
streams and the events.

>Not sure I understand what the problem with dts is. If the demuxer never 
>outputs dts/pts that isn't continuous, how can you have any problems?
Because streams need to be closed and re-opened. Example: one audio stream
in a vob may be AC3 3 channels (the don't copy vob). The next vob has ac3 6
channels (the main feature). DTS and PTS points get reset when a new stream
is opened (in the stream).

Its not a problem when you playback. It's a problem when you regenerate
pts/dts for trancoding.


More information about the ffmpeg-devel mailing list