Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to convert a MPEG2 file to H264/AAC.

No problem about video, but when I convert Audio: ac3, 48000 Hz, stereo, s16, 255 kb/s to MP3 or AAC, with any bitrate, the sound is not synced with the video. The sound is in advanced to video when I play it. How to fix it please ?

More information : the source video is 1h30 long and 3,4 Gio.

share|improve this question
add comment

1 Answer

To sync the audio stream with video time stamps we may use the -async option:

-async samples_per_second
Audio sync method. "Stretches/squeezes" the audio stream to match the timestamps, the parameter is the maximum samples per second by which the audio is changed. -async 1 is a special case where only the start of the audio stream is corrected without any later correction. This option has been deprecated. Use the asyncts audio filter instead.
Libav documentation

Begin to try with samples per second matching your framerate and decrease until your audio is in sync:

avconv -async 30 -i <infile> <encoding options> -r 30 <outfile>
share|improve this answer
add comment

protected by fossfreedom Sep 23 '13 at 7:57

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.