[MEncoder-users] AV sync issues with seperate audio and video encodeing

ilya kramer ilyail3 at gmail.com
Fri Apr 24 11:48:52 CEST 2009


On Fri, 2009-04-24 at 02:02 -0500, Andrew Berg wrote:
> ilyail3 K wrote:
> > I figured out that the best way to use b-frames and mux to mp4 is with
> > MP4Box.
> > but every time I get a bad A-V sync issue of about 30 seconds.
> >
> > I've tried everything , extracting the video with ffmpeg with -async , or
> > with mplayer  it doesn't seem to make any difference.
> >
> > can somebody please post an example of how to create .mp3(for example) files
> > and .h264 files(raw h264).
> > mux them with MP4Box and get a prefect audio-video sync.
> Add harddup to the end of your video filter chain (e.g. -vf
> scale=640:480,harddup). That should reduce sync problems dramatically.
> Once you have your raw streams, you can mux with MP4Box. For example:
> 
> mp4box -add audio.aac:fps=29.97 -add video.h264:fps=29.97:delay=200 -new
> movie.mp4
> 
> You may still have sync issues, but they shouldn't be nearly as severe,
> and you can add :delay=[delay in ms] to the audio or video in your
> MP4Box command to delay the audio or video to keep the streams in sync.
> You'll have to have to watch the new movie file to determine which
> stream to delay and by how much.
> _______________________________________________
> MEncoder-users mailing list
> MEncoder-users at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users

Thank very much for the quick reply.
I was actually hoping I could delay the audio automatically somehow.
I'm building a script that will run on computers in a cloud that should
convert movies(uploaded be the end users) automatically to mp4 so flash
players and ipods can play them.

Is there any way to know the offset of one of the channels (in this
case, the audio) from the information output of ffmpeg , mencoder or
mplayer itself?
(I will be using python to execute the script and report the progress
real time).

and one more simple question , do I need to mention the frame rate to
MP4Box if I set the same framerate at the audio and at the video
capture?

Thanks
Ilya



More information about the MEncoder-users mailing list