Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I want to merge them together, but the problem is that they have different length: 40:53 the audio file, 42:44 the video. How can I synchronize them? Should I save the video at a different frame rate or should I stretch (slow) the audio? Anyone has successfully done something similar? Thank you.
Audacity will let you change the speed of an audio track. This will affect the pitch, but you only need about a 5% change to balance things up.
For dialogue, it probably won't matter much, but music will sound strange, depending on your degree of "tone-deafness".
Try it: Audacity -> Effects-> Change speed
I have no idea how to slow down or speed up a video file, but as H_TeXMeX_H says avidemux can probably do it.
The answer will differ depending on if you need to stretch out the audio to fit the video (the audio gets progressively more off-sync as time goes on), or if it just needs to be time-shifted in order to remove a fixed delay.
For the former I usually use sox to stretch (or compress) the audio until it's the same length as the video, and/or matches the action on the screen. The man page will explain how to do it. Sometimes it takes a lot of trial and error to get it right, if you have to sync lip movements and such. You can also use audacity, as mentioned above (except use "change tempo" instead of "change speed" to keep the pitch the same).
For the latter, ffmpeg has an -itsoffset option to alter when an input file will be started, and avidemux has a similar ability in its audio options, and again there are corresponding options in avidemux and other programs.
Last edited by David the H.; 05-31-2009 at 12:52 PM.
Reason: added "change tempo" info.
Thank you all for your replies. I succeed by using Audacity and Avidemux. First I changed the speed of the audio track using Audacity -> Effects-> Change speed, as suggested by tredegar. After some attempts, I finally found out the exact percentage to get a good synchronization. Then I loaded the video in Avidemux and I added the audio track from Audio -> Main Track -> External MP3. Checked the result and saved the video.
@David the H. - I tried with Change Tempo, that actually is Audacity -> Effects -> Sliding Time Scale/Pitch Shift, but it took a much longer time to run, so I stuck with Change Speed due to the fact I had to do several attempts and the sound quality was still good after a change of speed of about -4 percent. Also I tried sox, but in that case the sound quality decreased a lot.
@H_TeXMeX_H - I tried to look for that effect in Avidemux but I didn't find it. Anyway, I think that Avidemux + Audacity together are a great tool to manage videos.
Yes, the shift feature is just below the audio selection, but it shifts the audio of some milliseconds forward or backward. In my case there is not a constant shift to correct, but the audio progressively increases the shift as playback goes on. Anyway the Change Speed effect in Audacity solved the problem. Thank you.