Bug Report Audio Artifacts while OBS is Open Ubuntu 15.10

PurpleFrogPlays

New Member
Greetings all,

I noticed when upgrading from Ubuntu 15.04 to 15.10 the included OBS Studio has introduced audio artifacts merely by being open. These problems occur whether or not I'm streaming or recording and will distort all sound on the system, both in my headphones and for my users listening on a stream, or in the final audio of a recording. On experiment, I've started my audio player (it does this for game audio as well) and it sounds perfect. I open OBS Studio (on any of the 0.13.x series, including the latest in unstable) and the sound immediately starts crackling and warbling. I close OBS studio and the sound immediately returns to true.

I did not have this problem running 0.11.x and I believe 0.12.0 (though I can't recall exactly when I upgraded to 15.10). I've been making due with a competitor's product, but it's just not as good for streaming so I'd really like to get OBS operational. It almost seems like it's using the wrong timing protocol from pulseaudio.

Here are the attached log files for the current session (where I've only been sitting listening to my audio player as I write this post) as well as the most previous where I just opened and closed the software within a few moments.

Thanks in advance for any help you may have.

Cheers,
Frog

Current Session:
https://gist.github.com/dc34d7b37154449a1197059949bfe0fa

Last Log File:
https://gist.github.com/bf7f1b33ad975b0457aa88fc86bf5bfa
 

c3r1c3

Member
Is OBs set to the same sample rate as Pulse/Your audio subsystem?

All 3 should be running at the same sample rate. (Please note that that isn't a requirement, it really helps with eliminating potential outside issues).
 
Last edited:

PurpleFrogPlays

New Member
Thanks for the reply. I was away on holiday the last few days and unable to reply. Pulse returns this:

Code:
Server String: unix:/run/user/1000/pulse/native
Library Protocol Version: 30
Server Protocol Version: 30
Is Local: yes
Client Index: 170
Tile Size: 65472
User Name: bryanss
Host Name: ubuntuDesktop
Server Name: pulseaudio
Server Version: 6.0
Default Sample Specification: s16le 2ch 44100Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.pci-0000_00_14.2.analog-surround-51
Default Source: alsa_input.usb-Focusrite_Scarlett_2i2_USB-00.analog-stereo

The sample rate in OBS is set to 44.1khz. I'm not sure what the "3" in all three have to be set the same. The games I play and the Audacious music player are all set to use pulseaudio as the output stream, so I'm presuming they're at the same rate.
 

c3r1c3

Member
So you use a USB device for your audio...Tough to say. Could be that OBS is messing with something in Pulse land, but if that were the case we'd surely get more such reports.

Could be that the Scarlett is really a 24-bit device, and OBS is getting 24-bit audio when it's expecting 16-bit... could be a bunch of things really.

Do you have an audio device that isn't USB (and esp. a Scarlett) that you could test with?
 

PurpleFrogPlays

New Member
It appears the 2i2 does operate in 24-bit audio.

After some research I can force the default sample rate for pulseaudio to 16bit or 24bit. When launching OBS with either setting, there's still a warble and the audio is noticeably time stretched.

The 2i2 is only used for my microphone. System audio goes through the on-board AMD/ATI SB which is reporting at 16 bits, 44100hz.

All of this worked fine when I was on Ubuntu 15.04 and OBS 0.11.x (and possibly some 0.12 releases, but I can't remember exactly what the version # was before I upgraded). It seems as though OBS or pulseaudio has changed in the versions since and they're no longer speaking the same language. I'm happy to provide any other log files or traces that would help narrow it down; I just don't know where to look.
 

c3r1c3

Member
Can you file a bug report in Mantis? Also maybe try 0.12.0 or .1 (if possible) and see what happens with older versions?
 

PurpleFrogPlays

New Member
I've setup a Mantis bug report.

As for trying an older version, when I tried to make from source I got an FFmpeg not found error (even though it's installed) and it's a bit late for me to try to fix that. apt-get reports only 0.13.4 and 0.13.1 available, so I'm out of luck there, too. I'll try this first thing after dinner and report results with 0.12.4 tomorrow.
 

PurpleFrogPlays

New Member
I've now successfully compiled 0.12.4 from scratch and it experiences the same issues with my system. As soon as OBS is opened, I experience the audio issues. No problems with video, just audio. At this point, I may have to cross my fingers and hope 16.04 will magically fix things. I'm still quite happy to provide any logs or traces necessary, so long as I know what to provide.
 

PurpleFrogPlays

New Member
Turns out I had some renegade files from 13.4 still on the system last time I tried to uninstall and compile from scratch. I've now successfully done so and can confirm there are no audio artifacts in v0.12.4 on my system.

...

Until I enter a stream key. Immediately after I clicked "Apply" after I inserted my stream key, the audio artifacts began. Removing the stream key and applying does not seem to affect the issue. Removing stream key, saving and closing the program return audio to normal, until the instant I open OBS again.

Edited to add appropriate log file:
https://gist.github.com/79229a40eef1f2f6791c7f039a58bb07
 
Last edited:

PurpleFrogPlays

New Member
Have had some more time over this past week to experiment more. Deleted v0.12.4 and removed all configuration files. Reinstalled 0.13.4-46-g3ef3c6f through the unstable PPA. On launch, OBS works as expected: that is, there're no audio problems or issues.

Before configuring anything, I can start/stop recording with no audio issues being introduced. The resulting video file is, obviously, soundless (I have not defined any audio sources, yet).
I can define my Desktop Audio and Mic/Aux sources successfully, the monitors are operating as expected.
Tried to start recording: all seems fine. Stopped recording. All seems fine. No artifacts and the video is as expected (no video sources defined, yet).
Defined an X window capture. Successful. Recorded a short video, no issues.

At this point, the only default settings changed have been adding my Desktop Audio and Mic/Aux source and changing the directory to which videos are recorded.
Begin to change configurations. Output mode: advanced.
Change the theme to dark: no issues.
Change streaming output bitrate to 3500 (my goal is to stream 1080p): no issues.
Audio remains at the defaults (with Monitor of Built-in Audio Analog Surround 5.1 as desktop audio device and Scarlett 2i2 USB Analog Stero as mic/aux device.)
Video settings: Change output resolution to 1920x1080. Immediately have audio artifacts. Return output resolution to 1280x720 and no issues. Artifacts begin only at output resolution of 1920x1080.
Select US East: Chicago (closest server) and insert stream key for Twitch: no issues.
Test stream: no issues.
Adjusted sound levels of Mic and Desktop Audio during stream: no issues.
Added second video source: both on screen at same time: no issues. Turned off source 1: no issues. Turned off source 2: no issues. Turned both back on: no issues.
Tried recording a video while streaming (no separate video recording timer? bummer.): no issues. Slight audio clipping in resulting video. Resulting video is at 1280x720.

At this point, it's obvious to me that the system apparently cannot handle recording or streaming at 1080p, which is strange. With 15.04 I had no troubles recording at 1920x1080 at the least, so I'm confused why now the same system cannot handle it. There's good and bad with this: a) I can at least stream to twitch again, though only at 720p. b) I cannot record with OBS as my channel expectations are 1080p for recorded videos (not stream VODs). Has the minimum system requirements with OBS changed? If so, what could I do to upgrade this system?

AMD FX 8350 Eight-Core processor
7.8 GiB RAM
GeForce FTX 960/PCIe/SSE2
64-bit OS

Thanks for the continued help. Hopefully these reports are useful, in case it's not a systems issue.
 

c3r1c3

Member
No change in the minimum specs for OBS. Sounds like a USB driver/subsystem issue. You might want to file a bug report with the team that maintains the AMD USB drivers.

USB interrupt overload happens due to various reasons (including the CPU being overloaded, even with a minimal amount of USB stuff hanging off the computer). On AMD systems this issue seems to happens sooner/more often then Intel systems.

Looking at your last log, I can see that your CPU can't keep up with your settings. You have 33ms to render a frame at 30fps, and sometimes your CPU takes more then that (a lot more). This leads to drops somewhere, and audio is usually one area (esp. on a USB audio device) to suffer. Also your log states that sometimes your audio subsystem is having trouble keeping up at the 25ms turnaround required to keep audio from dropping out.

Have you tried using Jack?

Either way, your CPU was having trouble with the settings you were using at the time of that log... which why we ask for logs to be posted, and not excerpts. Seeing the complete log, I was instantly able to see that your CPU wasn't keeping up, and your audio subsystem was also dragging.
 
Last edited:
Top