Recorded audio and videos are different lengths

Hi. I recorded several videos with me on screen using the Logitech Capture app with the Logitech Brio camera for great video, and recorded the audio at the same time with Audacity with a much better mic for great audio. Then planned to sync them together. Sounded like a great plan.

However, when I put the audio and video together with Camtasia, I find that they are slightly different lengths. When I sync them perfectly at the beginning, after a few minutes it becomes apparent the audio track is very slightly faster, or if you prefer the video track is slightly slower. So after about five minutes the audio is coming in noticeably before my mouth moves in the video. This is just a few 30’th’s of a second, but it becomes noticeable. And for a 10 minute video, of which I have several, it is really noticeable and simply unacceptable.

I know Change Tempo can change the length of an audio track, and have found it works well without changing pitch or any other quality factors. I can play around with all my different videos with trial and error, and try to find the right percent change.

However, I am hoping someone has run into this before, and can tell me, for example, “yeah, this is a common mismatch between videos recorded with Logitech and straight audio with Audacity, and you will find the audio needs to be stretched by exactly 0.012% to match the video, and then they will sync perfectly”.

Any expert experience, and input on what the percentage mismatch would be?

It it helps, the Audacity audio was recorded just as normal, and exported as Wav 16 bit. The details on one of the videos says it has a video data rate of 3596 bps, and total bitrate of 4245 bps, at 30 fps, and that the audio bit rate is 649 kbps and an audio sample rate of 48.000 kHz.

1.088 or 0.918 are the conversion factors if one was running at 48000 sample rate and the other was at 44100. That’s the video rate and the audio CD rate. Both very common.

Do Not use Change Tempo. Use Change Speed. You can’t tell, but both the speed and pitch are off.

If that doesn’t come out right, you can make a half-hour recording where you put sync marks at both the beginning and the end.

The big kids use a slate.

Clapboard3.jpg
Right-side up for the beginning and upside down for the end. “Camera Mark” [bang] and “End Mark” [bang]. You can just clap.

Use that to calculate the value to put in Change Speed. Nobody wrote you can’t have more than one error.

The grownups spend thousands on sound recorders to work around separate sound sync problems.

And past this little glitch, I expect the sound to come out perfect. This is how you’re supposed to do this.

Koz

One other note. Do not even think of using MP3 anywhere in the production process. Use perfect quality WAV (Microsoft) 16-bit files for both live capture and safety archive.

You can go up from there if you want to try it. Sound Studios use WAV 96000 rate at 24-bit, but you will risk creating sound that the computer can’t play back. The forum is crawling with people having crackling and popping in their audio because of computer speed and quality problems.

If one of the standard conversions happens to work, record both the sound and picture at 48000, 16-bit. That’s slightly better quality than 44100.

Koz

There is one more. “Television in the US” doesn’t run at 30. NTSC broadcast runs at 29.970. If you get this one wrong, from fuzzy memory it works out to a frame off per minute. Something like that. Use the long recording and two claps to figure out the correction.

Koz

If it takes 5 minutes for lip-sync to slip unacceptably, then it’s not mismatched sample rates, (48k/44.1k)
My money is on many unnoticed tiny skips, (each <1/100th sec), where audio is missing,
their accumulated impact is only noticeable on longer recordings, (say >3 min), : the audio will run shorter than true time.

As Koz mentioned changing the speed (not tempo) of the audio to match runtime of the video can be an adequate fix,
however as the slippage is not uniform, (it’s discrete random skips), then the uniform speed change will not be a perfect fix.

[ Pro audio & video devices have a sync-signal to prevent this slippage problem ].

“Television in the US” doesn’t run at 30.

All of these normal, natural errors assume your computer is in perfect health and working correctly. It doesn’t have to. Skipping here and there is pretty common. If that’s it, sound track playback will always get to the end faster than the video, and two half-hour tests may not match.

And nobody wrote you can’t have more than one problem.

Koz

[ Pro audio & video devices have a sync-signal to prevent this slippage problem ].

Pro audio systems don’t skip.

Koz

Thanks much. Experimentation shall begin. I will report back.

In the meantime, when I import audio from the video track, the following dialogue pops up:

Capture1.PNG
The third option has no audio. The first and fourth are identical, so we can ignore the fourth. However, by zooming in on the waveform, I can see that the first and second options are very slightly different. This seems curious and interesting. Is there a reason the first and second options are slightly different, and is there a preference on which I should import if I want to work with the audio from a video?

Hmmm, the Change Speed option for me changes the pitch. The dialogue even says so, see first line in pic below. Maybe this is because I am using v 2.2.2, because of chains and legacy work I cannot afford to have affected by upgrade to newer versions?

Capture1.PNG
I don’t have the best ear, at least compared to you fellows, however cannot tell any damage from Change Tempo.

Yes, it changes the length and the pitch, which is correct. If your audio is recorded at the wrong sample rate, and that appears to be the problem, then that will have affected both the length and the pitch, but because it is only slightly off the correct speed, the pitch change is not noticeable.
The settings shown in your last post show a speed change of x1.5, which is a huge change in speed, so the change in pitch will be very noticeable.

Your video recorder appears to be capturing in AAC-Advanced Audio Coding. Maybe four channel surround? So from the top, Left-Front, Right-Front, Left-Rear and Right-Rear. That’s a little unusual. Normal is 5.1 Surround. Take those four and add Center Dialog and LFE/Sub-Woofer/Low Pitch Rumble sounds.

Screen Shot 2021-08-09 at 6.49.20 AM.png
This is where we send you back to your instructions to sort what those four channels are. All we can do is fuzzy guess. AAC supports several different formats.

This may be where your video editor rides to the rescue. Do your half-hour recording (note we keep going back to that half-hour recording) and see how far off your new sound track and the video are. That’s why you need to have a video that shows the clap board closing [bang] or your hands clapping.

All this stuff is connected and you can’t leave any parts out.

Koz

Half-Hour Test Recording.

You don’t have to be there for the whole thing. Set up looking at a blank wall. Walk into the shot and say “Camera Mark” and clap your hands. Leave it recording and go make coffee. Come back a half-hour (or more) later and say “End Mark” and clap again. That’s your test performance.

If you have a mechanical metronome or a pendulum clock, put that in the shot and you can track second-by-second how far off everything is.

https://www.youtube.com/watch?v=1tV8RZOWc7E

Koz

Yes, it changes the length and the pitch, which is correct.

Ah, I understand. In this case, the pitch of the recording is fine. The issue I am having is purely with length, so I guess Change Tempo is the right effect, since I only want to change length alone without affecting anything else.

I recorded several videos with me on screen using the Logitech Capture app with the Logitech Brio camera for great video, and recorded the audio at the same time with Audacity with a much better mic for great audio.

Each device has it’s own internal clock (oscillator) to generate the sample rate (44.1khz, etc.). They will never match exactly. (Pros use a very-accurate master clock along with equipment that accepts a master-clock input.)

You began saying: " I find that they are slightly different lengths."
A “slight” difference in pitch is difficult or impossible to hear, so I doubt that you can be sure that the pitch was exactly correct.

The “Change Tempo” effect is much more complex than “Change Speed”. Changing the tempo requires ripping the audio apart and resynthesizing it, which inevitably reduces the sound quality. Even if the pitch was “exactly correct” (which is unlikely), the sound is likely to be better with a “slight” change with “Change Speed” than with “Change Tempo”.

Most likely: The pitch of the recording was “almost fine”, but very slightly out, in which case, “Change Speed” will correct the pitch as well as the length.

You have two homework assignments: Dig in the instructions and find out what your four AAC channels are and tell us the results of your half-hour test.

Koz

The “Change Tempo” effect is much more complex than “Change Speed”. Changing the tempo requires ripping the audio apart and resynthesizing it, which inevitably reduces the sound quality. Even if the pitch was “exactly correct” (which is unlikely), the sound is likely to be better with a “slight” change with “Change Speed” than with “Change Tempo”.

I’ve discovered I have what might be the worst possible case. Camtasia is causing the problem. I imported the audio from the video into Audacity, and compared it to the audio recorded directly in Audacity. They match exactly. To the millisecond.

For some reason, Camtasia is shortening the audio. And all Camtasia versions to the latest V 2021 have this problem.

Since these recordings cannot practically be redone, and I am stuck with Camtasia, then I have to fix this with processing. The only practical solution is lengthening the audio. However, I have found that only trial and error will do this. Because when I lengthen an audio track by, say, 0.06 seconds, to approximate two thirtieths of a second for a four minute track, when I import it into Camtasia I find that… Camtasia has shortened it again, and so I have to lengthen it a couple more 30’ths of a second and try again.

So, since the audio is in fact fine, and the pitch is fine, this gets us back to suggesting that Change Tempo is best, since I want zero pitch effects. Now, I have found that the option on Change Tempo “Use high quality stretching” should be renamed “Destroy your track”, since the effects are quite damaging. Not sure what is going on with that option. Perhaps this option is the source of comments that this effect is not good?

However, if I leave that option unchecked, then Change Tempo seems to work great, producing exactly what I want, lengthening the track, with no pitch or other discernible quality effects that I can tell. Hope this makes sense?

If your editor is doing odd or unpredictable things, then that’s the end of us helping you.

We’re glad you found a solution.

Koz



https ://en.wikipedia.org/wiki/Psychoacoustics#Limits_of_perception

So if the speed change is ~0.1% even someone with perfect-pitch would not be able to notice the change.
If it did not generate artefacts, change-tempo is the logical choice, but in practice the best solution is change-speed. Try it and see if you notice the change in pitch.

Yes you are right, I can’t tell a pitch change difference using Change Speed, since as you say the adjustment is so small, a few 30’ths of a second.

However, I am reacting to past bad experience with Change Speed. I once had to change the speed of some audio by 10%, and found of course that Change Speed completely messed up the result by increasing the pitch considerably. Chipmunk time.

This is when I started defaulting to Change Tempo. Of course I believe your comments that the internal workings of this effect affect a lot of things. However, if you want to change length, but not pitch, then my own experience at least has been that Change Tempo works well. I could tell some audio effects with a bit of “roboticization” for reduction of track length more than 10%. But with reduction of length under 10%, to my (amateur) ear, the effects are very small. At least… when you make sure not to check the very misleadingly named “Use high quality stretching” box!

I’m working on fixing the third recording now. So far so good.