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

Linards Ticmanis ticmanis at gmx.de
Mon Apr 11 17:30:34 CEST 2011


(sorry if this appears twice)

Hello to you all,

What I'm trying to do is decoding a video source to separate raw video
and raw audio streams, without losing audio-video sync. i.e. when the
two streams are multiplexed together again in the end after processing,
there should be no audio delay.

Since "raw" streams by definition don't carry timing information, I
guess that what I'd need is 1.) a guarantee that the video output will
have a fixed frame rate even where the input might not, and 2.) the
ability to add either blackness at the beginning of the video or silence
at the beginning of the audio, so that any delay that exists in the
source is compensated for. This way I'd have two raw streams that match
up everywhere. Right?

The questions is if mencoder can do this? Or can it at least give me
correct and machine-readable information about any difference in the
starting points of the video and audio streams, so that I could add the
necessary blackness or silence myself? I'm currently using -ofps and the
harddup filter to ensure a fixed frame rate in the output, but I'm not
sure if this is the right way.

Probably this whole thing has been asked before; but unfortunately the
search function for this group's archive seems to be down right now.

In case somebody wants to take a look at what exactly I'm trying to do,
I'm appending the bash script I'm currently using for the whole process
(this script gives me desynchronized A/V at the moment). To understand
it you have to know that stream.yuv and stream.pcm are FIFOs, not normal
files.

Maybe you have an idea? I'd be eternally grateful (OK, at least for a
day or two...)

Thanks in advance,
-- 
Linards Ticmanis


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mkvcd.txt
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-users/attachments/20110411/c33f79e2/attachment.txt>


More information about the MPlayer-users mailing list