Exported MP3 off tempo

Hi all,

I have a quick, and hopefully simple, question. I did some searching and didn’t see this question anywhere else. I have Audacity 2.2.2 (just downloaded a few weeks ago) running on a Windows 10 system. I recorded the audio from a presentation directly out of the mixer and the video from a separate camera. When I imported the files into a video editor, I found that the audio file I exported from Audacity (mp3) does not sync up with the video. In short, the mp3 increased the tempo of the presentation by a small but noticeable amount, enough that after about two minutes, the mp3 file is a full word or two ahead of the speaker. By the end of the presentation (~50 minutes), it’s an entire paragraph ahead.

Any thoughts on how to get a “true” export that doesn’t change the tempo so that I can properly sync the videos?

Thanks

Exporting from Audacity does not change the tempo.

When recording on two devices at the same time, there is no guarantee that both devices will run at the exact same speed, unless they are physically synchronised together (See: https://en.wikipedia.org/wiki/Word_clock)

If you have two recordings of the same event from two devices that were not synchronised, then it is likely that the recordings will have slightly different lengths. So, to synchronise them, you need to stretch one of the recordings to match the length of the other.

Example:

Recording A = video camera
Recording B = audio recorder.

  1. Import both recordings into Audacity (importing from a video file requires FFmpeg to be installed. See: http://manual.audacityteam.org/man/faq_installation_and_plug_ins.html#ffdown)

  2. If necessary, trim each track so that both start at exactly the same event, and end at exactly the same event. (The “snap” of a clapperboard is usually used for this.)

  3. Double click on the imported “Recording A” track, then look in the “Selection Toolbar” (http://manual.audacityteam.org/man/selection_toolbar.html) to find its length to the nearest sample.

  4. Double click on the track from “Recording B” and apply the “Change Speed” effect to the same length as the “Recording A” track. (http://manual.audacityteam.org/man/change_speed.html)

  5. Delete Track A (click on the [X] in the top left corner of the track.

  6. Export the remaining track (Recording B) as a WAV file. (Do not use MP3 as MP3s have a little padding at the start). Ensure that your exported file has a new and unique file name (don’t overwrite the original).

Your newly exported file now runs at the same average speed as Recording A. Depending on what you did in step (2), it may be necessary to offset the “Recording B” in your video editor so that it matches the video.

I will try this this evening, thank you. In the meantime, to ask a follow up question (because it’s not immediately clear to me from my reading over your answer) – when I stretch the audio file out following your instructions and then import it back into the video, will it automatically line up with the speaker? As it stands now, I’m expecting to have to manually chop up the file in the video editor every ten to fifteen seconds to realign it so that the words match her mouth. :-/

Secondly, based on this line: “When recording on two devices at the same time, there is no guarantee that both devices will run at the exact same speed, unless they are physically synchronised together” – unfortunately, my camera is just old enough that it does not support USB streaming, and so my video stream is necessarily different from my audio stream (assuming I don’t want to use the camera’s microphone, and I do not). As such, does that mean that there’s no way to automatically sync them and I’ll always have to fix it in post per your instructions above, or is there a way to sync the two that I’ve missed.

Thanks again for your help.

It depends on how constant the recording speed was on each recording device. Solid state recorders are usually pretty constant, so you probably won’t need to do a lot of “split and adjust”, but you may need to do some. If you’re lucky, you may get away with just lining up one bit (clapperboards are good for this because there’s a clear and precise visual and audio cue), and then have the rest fall into place.

Professionals use a “Word Clock” that provides a synchronisation “clock” signal to each device. This type of equipment is expensive. I’ve never seen “consumer level” equipment that supports Word Clock synchronisation, so it is usually necessary to do some manual synching when using multiple devices on long recordings. The method I described in my previous post is pretty quick and easy once you get the hang of it.

So I got excited about your suggestion and went ahead and tried it. I imported both files into Audacity and then got them lined up at the very beginning dead on. Great. Then I went to the end to check to see how far it would be off before I stretched it. But the thing is, in Audacity, at the very end, 50 minutes in, they are both still dead on . . . the mp3 and mp4 are an exact match just like they were in the beginning. But when I load the mp3 and mp4 into Lightworks, the mp3 is significantly slower (per the OP). So not sure what to do with that? Could it be an issue with the project rate?

Do both of your recordings have a clear audiovisual marker near the start and end? (For example, a clapperboard or anything else that is a clear and distinct marker)

Yes. I have both playing simultaneously. In Audacity, both play in perfect unison from beginning to end once I get them lined up. In the video editor (Lightworks), they are in unison for the first minute and by the end of the video they are way off – several second delay between the two tracks.

Well, shoot. It looks like the problem is with my video vile. I opened the file properties in Windows and found the video file is 56:44 is 59:38 (just due to extra space on the audio – it got turned off a few minutes later). Thing is, when I import the audio file into Lightworks, it is, appropriately enough, 59:38 to the end of the video. But the video file is 56:37 to the end. So it’s compressed the video by 9 seconds over the course of the hour. That’s why the audio is off when I try to import it from Audacity.

So either I have to figure out how to get it to import the file correctly, or else export the audio track from the video in Lightworks to its own mp3, then use the process you mentioned above to compress the other other mp3 down into the length Lightworks is setting my video/audio track to. Then reimport the edited file back into light works. Does that sound about right? If so, I’ll find a Lightworks forum since the problem is with that program rather than Audacity.

Although two devices will never be exact, a better audio interface should be a lot closer closer. I’m assuming the clock (oscillator) in the camera is pretty good… Some cheap soundcards can be pretty bad.

But the thing is, in Audacity, at the very end, 50 minutes in, they are both still dead on . . . the mp3 and mp4 are an exact match just like they were in the beginning. But when I load the mp3 and mp4 into Lightworks, the mp3 is significantly slower

Did you actually try rendering an audio/video file?

I’m not sure why that would happen but audio/video sync can be a problem even when the audio & video come from the same camera… Sometimes they go out-of-sync after editing, especially the highly-compressed formats.

You are using the same computer & soundcard for Audacity & Lightworks, right?

unfortunately, my camera is just old enough that it does not support USB streaming,

That probably won’t make a difference.

Could it be an issue with the project rate?

No, that shouldn’t cause a problem but I assume your A/V file will be 48kHz so it would be best to keep it at 48kHz.


\

the audio file I exported from Audacity (mp3)

This is (mostly) unrelated to your problem but as you probably know, MP3 is lossy compression. When you open an MP3 in Audacity (or any “normal” audio editor) it gets decompressed. If you then re-export as MP3, that’s another generation of lossy compression. Then when you render your audio/video file, the audio is probably re-compressed again to whatever your selected A/V format.

MP3 does add a few milliseconds of silence to the beginning, but that’s constant-shift, not a drift.

So I actually found a solution within lightworks. I told it to “pre-ingest” (whatever the heck that is) the audio file from Audacity at 29.97 rather than 30. As soon as I did that, I adjusted it so that it was the same size as the video file (that it changed the size to). Odd, but it works. I’ll import a wav file next time just for a little better quality because, yes, the mp3 isn’t quite what I wanted, but it’ll work for today. Just wanted to let y’all know I’d found a solution.

Thanks!