[FFmpeg-user] Audio out of sync -how to fix?

Fernando Cassia fcassia at gmail.com
Sat May 28 16:34:02 CEST 2011


Hi,

I´m trying to cut a segment of a Xvid (Mpeg4 part 2), into a VCD or DVD MPEG2.

If I use
ffmpeg.exe -i TheRocker.avi -f dvd -target ntsc-dvd -r 29.97 -s
720x480 -aspect 4:3 -b 8000k -mbd rd -trellis -mv0 -cmp 0 -subcmp 2
cellphones.mpg

...then the movie converts fine.

However, if I want to save an awful lot of time and proceed to skip to
the segment I want by adding

-ss 00:46:50 -t 15 before the -i, then the segment is cut and encoded
in perfect quality, but the audio is out of sync! (like 1 second out
of sync).

Is there a parameter to fix this audio sync issue and avoid this?. The
time savings are huge (think, recompressing a 15-second segment
instead of re-encoding a whole 90-min movie to mpeg2 just to be able
to extract a segment...

Thanks in advance.

FC
PS: I get the same results if I choose VCD as the output format. And
-acodec copy -vcodec copy gives me perfect image (in the original Xvid
codec) but garbled sound.


More information about the ffmpeg-user mailing list