PDA

View Full Version : [all variants] ffmpeg audio sync



Nonno Bassotto
July 10th, 2010, 02:17 AM
I have a file where the audio is out of sync in the second part. It also needs to be cropped, but that is a plus.

I know I can crop a video by something like


ffmpeg -i In_Movie.avi -croptop 74 -cropbottom 74 -sameq -aspect 16:9 Out_Movie.avi

but I don't know how to shift audio, let alone shift only a part of it.

Can any ffmpeg expert help me complete the command?

andrewthomas
July 10th, 2010, 05:32 AM
I have a file where the audio is out of sync in the second part. I don't know how to shift audio, let alone shift only a part of it.

Can any ffmpeg expert help me complete the command?
I can help with a bit, but am also looking for some answers. I was having a similar problem and I used avidemux to split the video into parts where the video is synced differently. Checking the shift box and testing out different rates I was able to get all the parts in sync. Then, I just used file>append to add all the bits back together. Now the file is in sync when I play it in avidemux, yet it still in not in sync when played in totem or vlc.
Hopefully, someone with a bit more editing experience can jump in and provide a complete solution.

Nonno Bassotto
July 10th, 2010, 03:06 PM
Thank you very much for your suggestion. Still I'd need something which works in common media players. I'm quite sure some encoders are able to do this, but I don't know how.

By the way, did something change in Totem and VLC? I mean, the audio is still not in sync, but did the delay change or it is still the same?

andrewthomas
July 14th, 2010, 08:32 PM
I pretty much figured it out. Check it out in this thread. http://ubuntuforums.org/showthread.php?t=1529640

Nonno Bassotto
July 14th, 2010, 09:55 PM
Thank you very much! I will try to do it as you suggest.

andrewthomas
July 14th, 2010, 10:13 PM
You are welcome. It took a bit of work, but I have now burnt a DVD out of the file and the audio and video are properly synchronised throughout. Let me know how you came out.