OBS Studio (Browser version) doesn't record desktop audio (

I’m using obs-studio-browser from AUR to livestream my indie game development endeavors on GNOME, and while most of it seems to be working, OBS doesn’t seem to record the default “desktop audio” source. For clarity, I have a HyperX Cloud headset both as a microphone and speaker (prevents the microphone from picking up the desktop audio). OBS’ Audio Mixer does show audio playing in the desktop, and I can hear sound through it, so I get the impression it’s not due to the headset. Interestingly, I have tested running ffmpeg -f pulse -i 0 -ac 2 sample.mp3 and found that sample.mp3 is just completely silent, so it may be a pulseaudio problem.

obsAndPulseAudio

I know that’s not a whole lot of details, so lemme know what other command line outputs I can provide to help troubleshoot this issue. Thanks in advance!

Check your Configuration has the device set to Duplex, and that the microphone input is displayed under Input Devices (and is unmuted and with a sufficient volume setting).

Thanks for the response! I’ve looked up PulseAudio Volume Control’s Configuration, and it’s set to Analog Stereo Duplex. Is that the correct configuration? Here’s how the full dialog looks like:
pulseAudioSettings

Edit: I’ve also attempted to change the Output volume to 100% and record it on OBS, but found no desktop audio being recorded. Microphone is still being recorded correctly, however.

OK, got some more interesting info to share. When I run the following FFMPEG line in the terminal, I do get a proper recording of desktop’s audio:

ffmpeg -f pulse -i alsa_output.usb-Kingston_HyperX_Virtual_Surround_Sound_00000000-00.analog-stereo.monitor desktop1.mp3

It also appears like OBS does grab the desktop audio from the same source. So I dunno if it’s actually Pulseaudio’s problem or not at this point. Here’s me running OBS Studio on terminal, recording twice with an attempt to change the audio source:

➜  ~  obs
Attempted path: share/obs/obs-studio/locale/en-US.ini
Attempted path: /usr/share/obs/obs-studio/locale/en-US.ini
Attempted path: share/obs/obs-studio/locale.ini
Attempted path: /usr/share/obs/obs-studio/locale.ini
Attempted path: share/obs/obs-studio/themes/Dark.qss
Attempted path: /usr/share/obs/obs-studio/themes/Dark.qss
info: CPU Name: AMD Ryzen 7 5800X 8-Core Processor
info: CPU Speed: 3800.000MHz
info: Physical Cores: 8, Logical Cores: 16
info: Physical Memory: 32028MB Total, 27934MB Free
info: Kernel Version: Linux 5.12.15-arch1-1
info: Distribution: "EndeavourOS" Unknown
info: Session Type: x11
info: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.20.12
info: Portable mode: false
Attempted path: share/obs/obs-studio/themes/Dark/no_sources.svg
Attempted path: /usr/share/obs/obs-studio/themes/Dark/no_sources.svg
QMetaObject::connectSlotsByName: No matching signal for on_tbar_position_valueChanged(int)
QMetaObject::connectSlotsByName: No matching signal for on_actionShowTransitionProperties_triggered()
QMetaObject::connectSlotsByName: No matching signal for on_actionHideTransitionProperties_triggered()
info: OBS 27.0.1 (linux)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
	samples per sec: 48000
	speakers:        2
info: ---------------------------------
info: Initializing OpenGL...
info: Loading up OpenGL on adapter NVIDIA Corporation NVIDIA GeForce RTX 3070/PCIe/SSE2
info: OpenGL loaded successfully, version 3.3.0 NVIDIA 465.31, shading language 3.30 NVIDIA via Cg compiler
info: ---------------------------------
info: video settings reset:
	base resolution:   2560x1440
	output resolution: 1920x1080
	downscale filter:  Bicubic
	fps:               60/1
	format:            NV12
	YUV mode:          709/Partial
info: NV12 texture support not available
info: Audio monitoring device:
	name: Default
	id: default
info: ---------------------------------
warning: Failed to load 'en-US' text for module: 'decklink-captions.so'
warning: Failed to load 'en-US' text for module: 'decklink-ouput-ui.so'
libDeckLinkAPI.so: cannot open shared object file: No such file or directory
warning: A DeckLink iterator could not be created.  The DeckLink drivers may not be installed
info: No blackmagic support
warning: v4l2loopback not installed, virtual camera disabled
info: [obs-browser]: Version 2.14.3
info: [obs-browser]: CEF Version 88.2.8+ge484012+chromium-88.0.4324.150
info: NVENC supported
info: FFMPEG VAAPI supported
error: os_dlopen(/usr//lib/obs-plugins/obs-outputs.so->/usr//lib/obs-plugins/obs-outputs.so): libmbedcrypto.so.6: cannot open shared object file: No such file or directory

warning: Module '/usr//lib/obs-plugins/obs-outputs.so' not loaded
info: VLC found, VLC video source enabled
info: ---------------------------------
info:   Loaded Modules:
info:     vlc-video.so
info:     text-freetype2.so
info:     sndio.so
info:     rtmp-services.so
info:     obs-x264.so
info:     obs-vst.so
info:     obs-transitions.so
info:     obs-libfdk.so
info:     obs-filters.so
info:     obs-ffmpeg.so
info:     obs-browser.so
info:     linux-v4l2.so
info:     linux-pulseaudio.so
info:     linux-jack.so
info:     linux-decklink.so
info:     linux-capture.so
info:     linux-alsa.so
info:     image-source.so
info:     frontend-tools.so
info:     decklink-ouput-ui.so
info:     decklink-captions.so
info: ---------------------------------
info: ==== Startup complete ===============================================
info: Switched to Preview/Program mode
info: ------------------------------------------------
info: All scene data cleared
info: ------------------------------------------------
info: pulse-input: Server name: 'pulseaudio 14.2'
info: pulse-input: Audio format: s16le, 44100 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_output.usb-Kingston_HyperX_Virtual_Surround_Sound_00000000-00.analog-stereo.monitor'
info: [Loaded global audio device]: 'Desktop Audio'
info: pulse-input: Server name: 'pulseaudio 14.2'
info: pulse-input: Audio format: s16le, 44100 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_input.usb-Kingston_HyperX_Virtual_Surround_Sound_00000000-00.analog-stereo'
info: [Loaded global audio device]: 'Mic/Aux'
info:     - filter: 'Noise Suppression' (noise_suppress_filter_v2)
info: xshm-input: Geometry 2560x1440 @ 0,1120
info: Switched to scene 'Title Card - 1440'
info: ------------------------------------------------
/** Skipping scene info */
info: ------------------------------------------------
/** Skipping Media Source info */
[libvpx-vp9 @ 0x7f2c7c007dc0] v1.10.0
[libvpx-vp9 @ 0x7f2c7c007dc0] v1.10.0
Attempted path: share/obs/obs-studio/images/overflow.png
Attempted path: /usr/share/obs/obs-studio/images/overflow.png
info: adding 64 milliseconds of audio buffering, total audio buffering is now 64 milliseconds (source: Mic/Aux)

info: ---------------------------------
info: [NVENC encoder: 'simple_h264_recording'] settings:
	rate_control: CQP
	bitrate:      0
	cqp:          23
	keyint:       250
	preset:       hq
	profile:      high
	width:        1920
	height:       1080
	2-pass:       false
	b-frames:     2
	psycho-aq:    1
	GPU:          0

[h264_nvenc @ 0x55b97b6d5040] The selected preset is deprecated. Use p1 to p7 + -tune or fast/medium/slow.
[h264_nvenc @ 0x55b97b6d5040] Using global_quality with nvenc is deprecated. Use qp instead.
info: libfdk_aac encoder created
info: libfdk_aac bitrate: 192, channels: 2
info: ==== Recording Start ===============================================
info: [ffmpeg muxer: 'simple_file_output'] Writing file '/mnt/shared/test/2021-07-16 20-13-05.mkv'...
info: Output format name and long_name: matroska, Matroska
info: [ffmpeg muxer: 'simple_file_output'] Output of file '/mnt/shared/test/2021-07-16 20-13-05.mkv' stopped
info: Output 'simple_file_output': stopping
info: Output 'simple_file_output': Total frames output: 248
info: Output 'simple_file_output': Total drawn frames: 302 (411 attempted)
info: Output 'simple_file_output': Number of lagged frames due to rendering lag/stalls: 109 (26.5%)
info: Video stopped, number of skipped frames due to encoding lag: 22/292 (7.5%)
info: ==== Recording Stop ================================================
info: libfdk_aac encoder destroyed
QObject::connect: No such signal QLineEdit::editingFinished(const QString &)
QObject::connect:  (sender name:   'customServer')
QObject::connect:  (receiver name: 'OBSBasicSettings')
Attempted path: share/obs/obs-studio/locale.ini
Attempted path: /usr/share/obs/obs-studio/locale.ini
Attempted path: share/obs/obs-studio/themes/
Attempted path: /usr/share/obs/obs-studio/themes/
info: Settings changed (general, outputs)
info: ------------------------------------------------
info: Settings changed (audio)
info: ------------------------------------------------
info: pulse-input: Stopped recording from 'default'
info: pulse-input: Got 64989 packets with 14155591 frames
info: pulse-input: Server name: 'pulseaudio 14.2'
info: pulse-input: Audio format: s16le, 44100 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_output.usb-Kingston_HyperX_Virtual_Surround_Sound_00000000-00.analog-stereo.monitor'
info: Settings changed (audio)
info: ------------------------------------------------
info: Settings changed (audio)
info: ------------------------------------------------
info: pulse-input: Stopped recording from 'alsa_input.usb-Kingston_HyperX_Virtual_Surround_Sound_00000000-00.analog-stereo'
info: pulse-input: Got 34326 packets with 15089785 frames
info: ---------------------------------
info: [NVENC encoder: 'simple_h264_recording'] settings:
	rate_control: CQP
	bitrate:      0
	cqp:          23
	keyint:       250
	preset:       hq
	profile:      high
	width:        1920
	height:       1080
	2-pass:       false
	b-frames:     2
	psycho-aq:    1
	GPU:          0

[h264_nvenc @ 0x55b982881000] The selected preset is deprecated. Use p1 to p7 + -tune or fast/medium/slow.
[h264_nvenc @ 0x55b982881000] Using global_quality with nvenc is deprecated. Use qp instead.
info: libfdk_aac encoder created
info: libfdk_aac bitrate: 192, channels: 2