[Ffmpeg-devel] [Ffmpeg-devel-old] Re: avi out is buggy

castet.matthieu at free.fr castet.matthieu
Mon May 9 15:13:36 CEST 2005


Selon Michael Niedermayer <michaelni at gmx.at>:

> Hi
>
> On Monday 09 May 2005 13:24, Thomas Herrmann wrote:
> > Michael Niedermayer <michaelni <at> gmx.at> writes:
> > > Hi
> > >
> > > On Monday 09 May 2005 12:08, Thomas Herrmann wrote:
> > > > Hi,
> > > >
> > > > it seems the avi output of ffmpeg is buggy in the way that AC3 sound
> > > > gets out of sync over time. The sound just drifts apart from the video.
> > > > This is true too with AAC coded sound, while MP2 seems to be fine.
> > > >
> > > > To reproduce this I take a MPEG sample containing a MPEG2 video stream
> > > > and an AC3 audio stream and do:
> > > >
> > > > ffmpeg -i sample_w_ac3.mpg -vcodec copy -acodec copy out.avi
> > > >
> > > > While playing this file with mplayer, the sound starts in time with the
> > > > video, but drifts away quickly.
> > >
> > > stream copy from mpeg to avi isnt synchronizable, mpeg has timestamps,
> > > avi does not, so frame drop / audio resampling might be needed but its
> > > not possible with stream copy
> > >
> > > -> bug closed / invalid
> >
> > Ok, but your answer does not help me to generate usable video file.
> >
> > I was asking what output format and/or ffmpeg options should I use to
> > transcode a MPEG file containing a MPEG2 video stream and an AC3 audio
> > stream to a video file (avi, mpg, mov, ... ???) containing a h264 video
> > stream and a ac3/aac audion stream?
> >
> > I tried:
> >
> > ffmpeg -i sample_w_ac3.mpg -vcodec h264 -acodec copy -sameq -hq out.avi
> >
> > which leads to asynchronous output, so does:
> >
> > ffmpeg -i sample_w_ac3.mpg -vcodec h264 -acodec aac -sameq -hq out.avi
>
> try -async 100 or similar, if it doesnt help upload enough of the source
> video
> so its reproduceable (to ftp://mplayerhq.hu/MPlayer/incoming and tell us the
> filename)
>
Isn't a buffer size problem ?
I remenber a guy who has the same problem when transcoding to flv, but I don't
remember the conclusion...


Matthieu





More information about the ffmpeg-devel mailing list