[vlc-devel] [PATCH] Discontinuities in source scr/pts/ dts break transcoding for dvdread -> mp4

Rémi Denis-Courmont remi at remlab.net
Sat Oct 17 20:04:57 CEST 2009


Le samedi 17 octobre 2009 20:55:44 Christopher Key, vous avez écrit :
> Rémi Denis-Courmont wrote:
> > Christopher Key wrote:
> >> Hello,
> >>
> >> I recently ran into problems trying to transcode dvds to mp4 format.
> >> Following any discontinuity in the scr (e.g. layer break, or skip over
> >> unreadable sectors), I would lose the audio in the output.  What was
> >> happening was that the discontinuity was causing the dts timestamps on
> >> packets to jump backwards*.  As the muxer uses two fifos (audio and
> >> video) and pulls in whichever of the packets has the lowest dts, a jump
> >> back in time causes problems.  Imagine two FIFOs, with packets with the
> >> following dts timeamps:
> >>
> >> {...,6,4,2,98,96} and {...,5,3,1,99,97}
> >
> > Shouldn't this be fixed with a roll-over carry counter rather than by
> > trying to autodetect discontinuities?
> 
> Sorry, I'm not quite sure what you mean by this.  Could you clarify.

Shouldn't the module keep a 64-bits PTS/DTS and increment the high-order bits 
whenever it the value wraps around?

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list