How to sync Audio and Video from different sources in iMovie

I recently published on my Instagram profile a couple of videos where I was playing some tunes on guitar or ukulele. Since I wanted the audio to sound as good as possible I decided to record it separately, wiring the instrument directly to the Mac via an audio interface and using the iPhone camera only for the video. The idea was to then put everything together (iPhone video + audio track recorded in GarageBand) and voilà: done.

Sounds easy right?
Well, turned out that it wasn’t.

Given the very basic video editing needs, I decided to use iMovie. So I moved to the beginning of the song, aligned the audio and video tracks and then played all together. What I noticed is that the audio was going out of sync after a few seconds. Not a big offset, but enough to be noticed and this of course was getting worse around the end of the video, which was only one minute long.

Why does that happens?
I initially thought that this was caused by the frame rate of the video or the sample rate of the audio. But after some research I figured out that the reason is that every device has its own internal clock references and these are normally not precise enough to have perfect sync across different devices. This is a very common problem even at professional levels and it’s why solutions like Timecode Sync are normally adopted.

However I’m not a pro and I just want my video and audio to be in sync without buying some more expensive gear on Amazon 😉

Here’s how I solved the issue

Step 1: Put some clap references (or in case of a guitar, some muted strumming) at the beginning and at the end of the video while shooting it.
This will make it way easier to align audio and video. The clap will be even visible in the audio waveform of the video track so aligning them will be quite straightforward.

The external audio track (green) is aligned with the original video+audio track (blue)

Step 2: After aligning the beginning of the video, go at the very end, where you should see the offset between the two tracks.

Here you can see that our ending clap references are out of sync

Step 3: Right click on the video track and click “Show Speed Editor”.

Step 4: You should now have a draggable item that you can move to adjust the tempo. In our case the video needs to be slowed down, so we will stretch it to the right.

Dragging the pin icon will allow us to time-stretch the video track

Done! The video track now is aligned with the audio track even at the end:

You can now play all the tracks together and enjoy your perfectly synced audio.

That’s all, I hope this quick tutorial was somehow helpful. Happy syncing!

Full-Stack Developer and Musician, based in Berlin. cosentino.dev