Your support is very much appreciated. Thanks, guys!
AI Generated·May contain errors
Video Summary
AI Generated
The speaker discusses a persistent issue with garbled audio and dropped frames when recording desktop audio in OBS on Linux. After six months of troubleshooting, the solution was found by changing the audio profile to \"Pro Audio\" in Pavucontrol, which correctly handles multi-channel USB interfaces.
For those of you that have been following my channel for a while, you probably know
that one of my biggest frustrations with Linux, one of the biggest pain points, is the audio
situation on Linux.
As a content creator, as somebody that really depends on working audio, being able to record
audio and having it actually sound good, and actually not have latency issues, not have
dropped frames, the audio situation on Linux has been a bit of a mess for a while.
I think with Pipewire, it has gotten better now that Pipewire is the default audio server.
But about six months ago, I ran into an issue where I could no longer reliably record my
desktop audio when I'm recording in OBS, which I'm recording in OBS right now.
I ended up with a situation where every video I recorded had garbled audio at times.
It wasn't a constant thing, but every two or every three minutes, there would be a one
to two second bit of audio that would have just a massive amount of dropped frames, like
three or four in a quick one second, one and a half second.
If you were in the middle of a word when that happened, the word would be completely garbled
and mangled.
You couldn't even make out what I was saying.
Again, this was happening every two, three minutes or so.
If I was recording something lengthy, like a 30 minute podcast or something, I might
have 10 of those within that 30 minute recording.
It was just frustrating as hell because I couldn't put videos or audio only out like
that because it's a problem.
People are going to be like, what in the hell is going on with the audio at times?
Then what I would have to do is I would have to go back and I would have to record single
words to go back and splice in the recordings.
It was frustrating as hell.
It was actually so frustrating that I decided I was not going to make content, if I could,
that depended on me recording the desktop audio because in OBS, what I needed to do,
this was the only fix that I could find, was, let me go ahead, I'm going to switch scenes
here, but I'm going to share my screen with you guys here.
If I switch to the desktop here, this is a second instance of OBS.
I'm recording in a different instance, but what I would do is I would go in here and
I'm right now in the audio mixer.
You can see I've got my mic audio and you see the meter running and then desktop audio.
Nothing's happening, but I am capturing desktop audio.
So if I played a video or audio file or we were on a Zoom call or a Discord call or
something like that, we could capture that audio as well.
So desktop audio is enabled, but for the last few months, what I was doing is I was disabling
desktop audio.
I would go into the settings here and I would go into audio and under desktop audio, I would
just disable it completely so I could no longer record desktop audio.
The only audio that you would get in OBS recordings was my mic audio, which greatly limited
what I could do on camera.
In fact, it also caused me a problem the other night in streaming.
I did a live stream on YouTube and it was the Haiti T live, the voice message edition
where you guys were allowed to leave me voice messages and those were the questions and
comments that I would respond to.
And of course, those voice messages had to play via desktop audio.
So I had to enable desktop audio for that live stream and it had been a few months since
I tested this out.
Would my problems be magically fixed?
No.
Going back and listening to a live stream, there were a few issues with audio.
Every few minutes, there would be some issues with some really garbled words, either my
words or the desktop audio messages, whatever was playing at the time.
If there happened to be any sound at that time, you would get that really just mangled
kind of audio for like a second, second and a half.
And you know, I can't, I can't live like that.
I had to fix it.
It had been six months and it's not like I haven't tried to fix it.
I have at least every couple of weeks tried to fix it.
I would go using something like chat GPT or Google's Gemini AI and ask questions like,
this is my issue.
What could be the problem?
What could be the solution?
And I have tried a million different things.
And then yesterday I finally figured it out because I was asking Gemini this same question
again and I got some different answers that seemed rather simple in fixing and actually
did fix my problem.
One of the things I knew was the problem, what was likely causing my issues was the
fact that I have this audio server rack behind me that way at the top of it is a mixing board.
That is the Mackie Pro FX 12 V2 mixing board.
And of course, you know, this will plug into the computer via USB.
So, you know, you've got the audio rack that's got like EQ and limiter, gate, expander.
You know, you've got several things on that.
Most of it is analog equipment, but the mixing board of course is digital because it will
plug into the computer.
And one of the issues you can run into when recording audio, when you're recording multiple
streams of audio, such as my mic and computer desktop audio, maybe you've got other things
going on as well, is they all need to be using the same sample rate.
Typically that's going to be a 48,000.
For some things they may default to 44,100 or 44.1 kilohertz or whatever it is.
Then you want to be on that 48 kilohertz range for most things.
And so I had to make sure that, you know, my Mackie mixer was actually set to the same
settings as OBS because in OBS, everything is set to that 48K range.
Well on Linux, there's a few things we can do to check things out while I'm recording
here.
I can run this command, a record dash L, and it lists the devices here.
And you know, I can see that my mixing board is going to be this here, card three codec
USB audio.
So it's obviously plugged in via USB.
So that's going to be it.
And then I can use this command here.
I can cat slash proc slash a sound slash card X, where X is the number of the card that's
listed up here.
And then, you know, yada, yada, yada, some other parameters.
So let me go and change this to card three and then cat that information.
And yeah, my rate is 48,000 on the mixer, which is what it's supposed to be.
It's what I'm recording in OBS.
So it wasn't the rate there.
So yeah, I don't know.
Could it be there's a weird rate that's going on with the desktop audio?
Maybe, maybe not.
But one of the things I was asking Gemini, you know, well, what do you think the solution
could be?
And, you know, I've been asking Gemini this for months.
And maybe it had given me this answer before, but I don't think so because I surely would
have tried this very simple fix.
But it mentioned, hey, open Pavu control and then go to configuration and make sure that
your audio mixer is set to profile pro audio, which is not what it was set to.
It was actually set to something like a digital stereo duplex or, you know, some other listing
here.
And I've played around with various profiles before, but this is the first time it ever
told me, hey, you need to go set that to pro audio.
And it works as soon as I set that.
I'm recording here in OBS and I'm not going to touch up the audio in any way if I happen
to have any weird drop frames.
I'll mention it in the show description, but I recorded a 30 minute video yesterday,
zero issues.
So, and there was no way I could have done that before.
So that fixed my problem is just go into Pavu control.
If you're using a mixing board and that's not a Mackie Pro FX problem, you could run
into this problem with any mixing board, the Sennheiser's or some of those, the Behringer's.
If you're using a, maybe a audio interface like a Scarlett Focusrite 2i2 or 4i4 or something
like that.
If you're running into any of these issues, that pro audio setting may fix your issues.
At least it fixed mine.
I felt like I needed to talk about this on camera today and actually put this out there
for others that may run into the same issue for those that are trying to actually be audio
slash video content creator using Linux.
So what exactly is that pro audio profile setting?
Because I was happy that I got the fix, but what does the fix actually do?
Well, Gemini was able to tell me that the pro audio profile setting there is good for
your class compliant USB audio interfaces and mixing boards because anything that features
more than a standard like two channel stereo input output, because Linux specifically now
with pipe wire frequently misidentifies multi-channel mixers as surround sound devices.
And that's exactly what my problem was because if it was doing like a stereo duplex or some
other profile, yeah, it wasn't doing it as a multi-channel mixer.
It was treating it as a surround sound device and that pro audio profile is what needed
to be there to treat my boards inputs and outputs as individual discrete channels.
So when I wasn't using the pro audio profile, you know, it was using one of the default
profiles, one of the other profiles there.
And those default profiles, they attempt to merge your hardware into a single stereo device.
And again, that's going to cause some issues.
So by switching to the pro audio profile and pipe wire, you bypass OS level software mixing.
So it gives you raw direct access to every single physical channel on your mixing board
and it avoids that distorted, mangled, really compressed, you know, just bad audio, right?
It just gets rid of all of that.
Now, do you need it?
Probably for most people, you may or may not need it.
If you're doing the kind of work I do, if you're using professional audio interfaces,
so again, things like the Mackie, Sennheiser, any of the Behringers, Focusrite, PreSonus,
any of those kinds of mixers slash audio interfaces, you might want to enable that, especially if
you're having audio issues, give the pro audio profile a try.
Now, before I go, I need to thank a few special people.
I need to thank the producers of this episode, Matt, Steve, George, Darloff, Lee, Mark, Methos,
Erjan, Piso Archimpedor, Realites4Less, Roland, Wargen2 and Ubuntu, and Willie.
These guys, these are my highest tier patrons over on Patreon without these guys.
This quick little episode about me finally fixing a serious audio bug that has plagued
me for six months.
I can't believe it's been that long.
I literally was pulling my hair out if I had hair, but these guys, these guys are great.
They really help support what I do on this channel.
Also, each and every one of these ladies and gentlemen as well, all these names you're
seeing on the screen right now, these are all my supporters over on Patreon because
I don't have any corporate sponsors.
I'm sponsored by you guys, the community.
If you like my work and want to see more videos about Linux and free and open source software,
subscribe to DistroTube over on Patreon.
Peace, guys.