[MPlayer-users] Separating audio and video without losing sync?

Nico Sabbi nicola.sabbi at poste.it
Tue Apr 12 16:13:14 CEST 2011


Linards Ticmanis ha scritto:
> Thanks Henry! I guess by "both" you mean "both audio and video"?
> Unfortunately the tools into which I'm ultimately feeding the
> mencoder-extracted audio and video streams (mpeg2enc and twolame) accept
> either only video, or only audio. They can't deal with a muxed stream.
> Also unfortunately, I didn't find the place in the ffmpeg documentation
> (FAQ or anywhere else) that you're referring to.
>
> Regards,
>    

you simply can't. What you are trying to do is to dump separate streams 
which, by definition,
don't have timestamps AND are asynchronous: in 99.99999999% of cases 
they start from
different timestamps. Since audio streams are always preloaded by some 
hundred milliseconds
the best approximation you can get is to run some tool that drops as 
many audio frames as necessary
to resync the two streams, but you will never get to a 0.0 difference... 
let alone that the video stream
may start with a B or P frame.
And I didn't take into account DVB streams where timestamps reset often.
forget it:-)

or use the mpeg2 muxer in mencoder (with the right parameters) that does 
all that for you:-)


More information about the MPlayer-users mailing list