[FFmpeg-devel] pts/dts generation and index for mpegts (vob)

Joakim Plate elupus
Mon Apr 27 13:59:23 CEST 2009

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

> Hello all;
> I have a couple of DVD's with wrapped around (2^31) pts in the streams.
> Wrapping occurs at various places in the vob files.
> I first noticed this when working on a video-time length problem with the
> vobs. Short I found following 2 issues:
> 2) Index generation for mpegts will have problems.

mpeg-ps not mpeg-ts

Vobs aren't really meant to be read without parsing and understanding the NAV 
(pci/dsi) packtes within. It's quite common that the timestamps are 
discontinuous in the vob files (and there could be multiple angles 

It's however quite simple to make the vobs timestamps continuous if you do 
read the nav packets. You just adjust timestamps based on the diff between two 
consecutive packet's start/end times.

However it does mean that in order to allow seeks in the files, one would have 
to parse all NAV packets prior to the time you want too seek too. They do 
contain a pointer to the next nav packets within, so one could do that by 
finding the first one and jumping forward step by step. Still they are quite 
many and it would probably be quit uggly.


More information about the ffmpeg-devel mailing list