[Ffmpeg-devel] [Ffmpeg-devel-old] Re: avi out is buggy
Rich Felker
dalias
Mon May 9 18:38:51 CEST 2005
On Mon, May 09, 2005 at 02:31:54PM +0200, Michel Bardiaux wrote:
> Erik Slagter wrote:
> >On Mon, 2005-05-09 at 11:24 +0000, Thomas Herrmann wrote:
> >
> >>>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
> >
> >
> >How about using mp4 output container (which does understand timestamps).
> >
>
> Since the posted commands produce a desynched avi from a file that is
> said to play correctly in mplayer, one could deduce that the streams in
> it are not inherently synchronized, but the synchro is maintained by the
> timestamps themselves; in other words, as Michael wrote, at places there
> are too many or not enough audio samples. Obviously that cant be done if
> acodec=copy.
Actually it can. Just leave 0byte packets in the avi to serve in place
of timestamps. I thought lavf already did this..
Rich
More information about the ffmpeg-devel
mailing list