Recordings mysteriously speed up

System:
Linux Mint 20.1
6 GB RAM
i7 920
GTX 970

Audacity version 3.2.3 appimage

Hello!

I have been having problems for a couple days now with audacity mysteriously speeding up recordings. These recordings should be approximately 2 hours and 15 minutes long, but they have been sped up and shortened to around 2 hours and 7 minutes. I can tell these are short because firstly I was recording video at the same time that comes out as a longer duration, and the audio is noticeably sped up and higher pitched. I could not detect when this happened, but my suspicions are that maybe the program is running slightly faster than everything else because the recording timer at the bottom of the screen matches the time of the recording itself. This was also happening with the previous version of audacity I used which was whatever was the latest in the mint repository.

I don’t even know where to start with troubleshooting this and I would appreciate any help.

Thanks!

Counter-intuitively, a speeded up show means it was recorded too slowly.

You can sometimes get a clue what’s happening by carefully measuring how long an hour, or known duration show was recorded. How long did it turn out? The two common sampling rates are 44100 and 48000. 44100 is sample rate used in Audio CDs, 48000 is the sound rate for DVD and movies. 44100 is the generic default for most of the world.

You may be capturing in one rate and playing it in the other, particularly, if you’re doing part of the show in video.

Koz

The total runtime of the audio recorded by audacity is 2:07:17, and my estimate for the intended runtime is 2:15:15, give or take ~3 seconds. The audio runtime is such even before it’s exported to .flac format, so my only guess is that it has something to do with audacity itself or some obscure pulseaudio configuration.

I was recording video at the same time that comes out as a longer duration,

It’s hard when the two performances are really close like that. That could mean it’s just making capture mistakes at random.

Audacity doesn’t Play Well With Others. Do the problems clear up if you stop recording video at the same time?

Koz

I record video on a completely separate device so I doubt that’s an issue.

I record video on a completely separate device so I doubt that’s an issue.

The clocks (oscillators) in two different devices will never match perfectly and a couple of minutes over 2-hours is not unusual for an audio device. If you are using a regular consumer soundcard it probably has a bigger error than your video camera.

Pro studios use a super-accurate and stable [u]master clock[/u] (sometimes an atomic clock) and equipment that can sync to a master clock. Perhaps more important than accuracy is that multiple devices can be locked-in to the same clock so that everything is synchronized down to the exact-sample.

This error is totally fixable in Audacity.

Select the show. Effect > Change Speed… (Not Pitch and Not Tempo).

You can tell it what the error is many different ways.

Screen Shot 2023-01-27 at 1.39.53 PM.png
The better you are at figuring out the exact error, the better the results. If you use your computer’s time, you should know where it’s getting that time from. Have you ever messed with your computer and taken it off-line for a while? Then, when you establish an internet connection, the clock in the corner of the desktop suddenly switches to a different time? The machine just went on-line for a time signal.

There’s an on-line clock, a System Clock and the clock signal from your sound card which may not match any of those.

Koz

I’m not entirely sure if you would count an audiobox usb 96 as professional or not. Maybe more enthusiast grade. The video is being recorded on a galaxy s6 and since it doesn’t have enough storage for a full 2-4 hour recording it’s being transferred periodically to a computer via scp. Hope this additional info helps a bit.

Would it assist in troubleshooting if I provided a link to the audacity project files?

I will try that and see if it works. The only issue I might have is that the speed seems to increase along with the pitch later in the audio; it’s not consistent throughout the recording.

the speed seems to increase along with the pitch later in the audio

Then you have trash. Wandering speed during a recording is deadly. I didn’t include it in the "Four Horsemen, because it’s so rare. You have a broken recorder.

Screen Shot 2023-01-27 at 16.51.25.png
Koz

I’m curious, would you be able to explain the technical aspects of this? I’m running a reel to reel recorder directly into an audiobox usb 96. Does audacity obtain a time from the audio interface?

Also, this is not a consistent issue, it happens about once every other recording. Not sure if that would be relevant.

Does audacity obtain a time from the audio interface?

No. It’s one of several reasons you can’t use Audacity as a surveillance recorder.

would you be able to explain the technical aspects of this?

– You can get this error if your tape is running at the wrong speed when it feels like it.

– You can get speed changes if the Audiobox is sick and encoding the incoming sound wrong or erratically.

– The Audiobox is powered from the computer. If that power is not reliable, the Audiobox may distort the sound.

– You can get a bad Audacity recording if all of the bits aren’t making it into Audacity. Audacity has almost no abilities to change sound during recording—so something in the computer is distorting the bitstream during the performance. Do you use Skype, Zoom, Games, or any other sound programs? Those programs like to take over the computer when they run and you don’t have anything to say about it.

I think my first step would be borrow another computer, load free Audacity, plug in the Audiobox and see if the problem is still there. Transfer your show multiple times.

Most computers still have audio connections of some sort (headset microphone??). Even if they’re not perfect, jack the reel-to-reel into a computer without the Audiobox. See if the problems vanish after several transfers. Sound quality doesn’t matter. Is the duration of the show correct and consistent?

And way down the list is equipment combination failures. Your Audiobox only fails plugged into your computer.

Koz

So far I’ve attempted three 2-hour recordings on a separate computer with the same equipment and all of them have been successful, so I guess I’ll have to look into messing with the system time or something on the previous pc. I’ll post any updates if I have another incident.

Do post back if you figure it out. We have lists of problems and solutions that we use to help others with similar problems. You are what happens when nobody has never posted with this particular problem.

Your bio claims Linux Mint. Is there any reason you’re doing production in Linux? Your cohort is tiny compared to the other two platforms. I’m a Mac forum elf, not Linux. It’s usually good to be surrounded with bunches of people on similar systems to share experiences and dig you out of troubles.

Koz

I have a tendency to have problems nobody else does lol. It’s always interesting but never convenient.

I use linux because the PC I listed with 6 gigs of ram barely runs windows, let alone any additional programs. I really liked the experience of mint on that PC and I’m trying to learn more about it in order to go into an IT role and potentially system administration one day, so I switched to mint on my main PC as well. I’m not running a major production (at least I don’t think so - just a few thousand hours of tapes lol), but you’re right about the audio focused linux userbase being small. At least most things are free :slight_smile:

I might set up a local ntp server and synchronize both devices to that; seems to be a possible next step.

That’s what I was thinking.

On Linux you can synchronise audio / video apps that are running on one machine, by using Jack Audio System. Jack provides a common clock tick for all applications that are using Jack, so the apps are locked to the same sample timer. A similar thing is available on Windows by using ASIO. It’s also possible to use Jack over a network, though this requires a high bandwidth network and can be quite tricky to set up.
(See: How do I use JACK over a network? | JACK Audio Connection Kit).

We should stop using words like “synchronize,” “master clock,” and “atomic clock.” That’s not what the problem is.

The only issue I might have is that the speed seems to increase along with the pitch later in the audio; it’s not consistent throughout the recording.

So the first hour and a half of the two hour show is fine and it only turns to trash at the end.

Also see: sometimes it doesn’t fail at all.

“It happens about once every other recording.”

I’m going with the fan on the motherboard/CPU failed and it takes that long to overheat and start dropping bits.

Another possibility is the machine is so full of Dust Bunnies that the cooling stopped working.

I have a tendency to have problems nobody else does lol. It’s always interesting but never convenient.

Do you have the machine jammed right up against the wall, or in some other restricted area so it blocks air flow?

Koz

My CPU temps are always quite good, below 70 C at max load which I get when rendering stuff. I’ve never really had a problem with that since I repasted the thing.

Can you make it worse?

Change something. Disconnect stuff. Disconnect the network.

Start a task such as viewing a long on-line video or downloading a large file. Start a sound capture and see if it still misbehaves, or misbehaves in a different way.

One fuzzy goal is to get the machine to fail earlier or faster. That would be easier to troubleshoot.

If you can’t affect or change the failure, you could trash the machine. You have a permanently unstable machine that nobody can fix.

Koz

Note that 2:07:17 = 127.283 seconds and that 2:15:15 = 135.25 seconds

and 48000/44100 = 1.08844 and 1.08844 * 127.283 = 138.54 or 2:18:32 which differs from your estimate only by your stated “~ 3” seconds

So it is entirely possible that the only issue is a clock rate mismatch somewhere along the line (44100 vs 48000).