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

Joakim Plate elupus
Wed Jul 1 15:13:52 CEST 2009


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

> 
> Hello;
> 
> I figured out the changes needed for the introduction in new streams and
> stream switching, but am stuck on the best way to get dts/pts
> synchronization working both when a new chapter/vob transition happens, and
> pts wrapping occurs because of 2^31 stamps.

Don't even try to sync it over chapter/vob discontinuties. The best way for 
dvd's is to correct the pts/dts with an offset that you can find by checking 
the start/end time of the nav packets. If you do it this way the output 
timestamps from ffmpeg is always continuous nomatter how you navigate around 
in the dvd and whatever stream you are playing. You would still have to handle 
the wrapping thou.






More information about the ffmpeg-devel mailing list