I was trying to solve the video and audio out of sync problem on one of my Divx movies converted from the DVD. In that process, I discovered that the ffmpeg that I was using had a problem that it is processing very slowly and sometime crashes. I should have noticed this early as it spew out this message when converting a movie to AVI format.
Compiler did not align stack variables. Libavcodec has been miscompiled
and may be very slow or crash. This is not a bug in libavcodec,
but in the compiler. You may try recompiling using gcc >= 4.2.
Do not report crashes to FFmpeg developers.
I upgraded my mingw gcc compiler to version 4.2.1-sjlj and recompile ffmpeg. It is now working very fast. So excited about it.
I found out that the async option can be used with ffmpeg to stretch the audio so that video and audio can be in sync.
ffmpeg -i VTS_01_1.VOB -vcodec copy -acodec libmp3lame -ab 192000 -ac 2 -async 1 -vsync 0 tmp1.mpg