Bug Report Audio lag in OBS-redux Linux

Maltahl

New Member
You should update the Linux Kernel... the lastest is 3.16

Also make sure you install OBS Studios via the offical PPA and not directly via GIT Forking.

Also stop using a beta GPU driver... use the lastest stable Nvidia Driver for better results
 
the official supported release is ubuntu 14.04 which gives me kernel 3.13

i am using GIT because it was my understanding per the mantis bug tracker that the pulseaudio desync issue fix was in GIT and NOT pushed out to the ppa yet.

It's not a graphics issue here so switching my nvidia driver to something other than 343.22 would improve anything

with that said I do appreciate your suggestions. there hasn't been much feedback on this thread and it's the single unresolved issue preventing me from using obs-studio for local recording and livestreaming. I will keep my eye on the GIT commits for changes and keep trying to get obs-studio to work.

one thing i did want to note is that i saw 1 of your old logs and I noticed you had varying sample rates, 1 at 44,100 and 1 at 48,000 BUT your more recent log showed them changed and both the same. I'm wondering if it's a combination of sample rates along with the pulseaudio buffer rewind bug that's really affecting me. I wish the dev's here could just incorporate a syncronizer like ssr has and all this would be solved.
 

NoXPhasma

Member
You should update the Linux Kernel... the lastest is 3.16
No, why do so many people think having the newest Kernel installed would solve all problems? The truth is, most new Kernel features are not ready to use till in a few month. If you not really need a new function of a new Kernel, like new open source drivers for your AMD/Intel Card, you just don't need it!

Also make sure you install OBS Studios via the offical PPA and not directly via GIT Forking.
Yes, because ... yeah, because why? The PPA version is just the Git version, which is updated once per week or so...
 

Maltahl

New Member
No, why do so many people think having the newest Kernel installed would solve all problems? The truth is, most new Kernel features are not ready to use till in a few month. If you not really need a new function of a new Kernel, like new open source drivers for your AMD/Intel Card, you just don't need it!


Yes, because ... yeah, because why? The PPA version is just the Git version, which is updated once per week or so...


i get updates daliy via the PPA for OBS... sometimes twice a day.

i use the newest kernel because its a very new machine i use and the "stable" kernel gave me crashes.
 
everyone that's posting in this thread, please attach your log file and a link to the video. it will make it easier for the dev's to help fix this issue. merely stating you have a desync without a log file at a minimum isn't useful in fixing this issue.
 
did a local recording only, no livestreaming. here's the results, horrible audio desync. the audio is ahead by at least 1 second. I have the locally stored .flv file located within my dropbox, i'll link it to whoever wants to see it otherwise here's the same file uploaded to youtube unlisted. Also attaching the terminal output from running pulseaudio in ultra verbose mode as well as obs-studio
https://www.youtube.com/watch?v=uoH4YwwKVUA&feature=youtu.be

pulseaudio verbose: http://pastebin.com/ng94Eukq
obs-studio terminal output: http://pastebin.com/CB2zt79G
 

vivnet

New Member
Are you using a bluetooth headset? Is it also out of sync of you use an internal/onboard card?

Some very few commits back this problem appears to be solved for me, which is why I ask.

Here's an example test stream that I did very recently: http://www.twitch.tv/vivnet/b/577707328

I've done a multitude of these over the last week using various configurations and games; all appears good.
 
Are you using a bluetooth headset? Is it also out of sync of you use an internal/onboard card?

Some very few commits back this problem appears to be solved for me, which is why I ask.

Here's an example test stream that I did very recently: http://www.twitch.tv/vivnet/b/577707328

I've done a multitude of these over the last week using various configurations and games; all appears good.
no bluetooth devices at all. i'm using the internal audio for the game and a usb webcam mic for my voice. what's your setup like, obs version, distro, kernel, etc etc? anything special about your pulseaudio setup? what's your internal audio chipset? if you make pulse NOT autospawn, kill it and then start it with the following command
Code:
pulseaudio -vvvvv
and then open obs and do a local recording and then stop the recording and then close obs could you paste the terminal output from pulseaudio please?

there's so many variables which could be the cause of my desync'ing but I also believe whatever method obs is using to sync the audio and video somehow isn't calculating timestamps correctly.
 
tested again today, still audio is about 1 second before the video. Here's the locally stored vid uploaded to youtube
https://www.youtube.com/watch?v=iE7pruc4iFg&feature=youtu.be
here's the native file if neccessary: https://dl.dropboxusercontent.com/u/3478109/2014-10-16 18-30-32.flv

here's the pulseaudio verbose messages: http://pastebin.com/VjZxns94

here's the obs log: http://pastebin.com/nxXRTBCm

I did verify I didn't have any old linux-pulseaudio.so file anywhere on my system, here's the results of a search:
Code:
ubu@saucy-haswell:~$ find / -iname linux-pulseaudio\.so -exec ls -gG {} \; 2>&-
-rwxrwxr-x 1 67838 Oct 15 18:19 /home/ubu/obs-studio/build/plugins/linux-pulseaudio/linux-pulseaudio.so
-rwxrwxr-x 1 67838 Oct 15 18:19 /home/ubu/obs-studio/build/rundir/RelWithDebInfo/obs-plugins/64bit/linux-pulseaudio.so
-rw-r--r-- 1 67838 Oct 13 18:28 /home/ubu/.local/share/Trash/files/obs-studio-portable.3/obs-plugins/64bit/linux-pulseaudio.so
-rw-r--r-- 1 67838 Oct 14 18:27 /home/ubu/.local/share/Trash/files/obs-studio-portable.4/obs-plugins/64bit/linux-pulseaudio.so
-rwxrwxr-x 1 67814 Oct  7 19:31 /home/ubu/.local/share/Trash/files/obs-studio.2/build/plugins/linux-pulseaudio/linux-pulseaudio.so
-rwxrwxr-x 1 67814 Oct  7 19:31 /home/ubu/.local/share/Trash/files/obs-studio.2/build/rundir/RelWithDebInfo/obs-plugins/64bit/linux-pulseaudio.so
-rw-r--r-- 1 67814 Oct  9 20:46 /home/ubu/.local/share/Trash/files/obs-studio-portable/obs-plugins/64bit/linux-pulseaudio.so
-rw-r--r-- 1 67814 Oct  9 20:46 /home/ubu/.local/share/Trash/files/obs-studio-portable.2/obs-plugins/64bit/linux-pulseaudio.so
-rw-r--r-- 1 67838 Oct 15 18:19 /home/ubu/obs-studio-portable/obs-plugins/64bit/linux-pulseaudio.so
 
so i've come up with a rather capable work around this obs-studio audio desync bug. I open obs-studio and set everything up as if I was going to stream with it, maximize it's window, undecorate it and fullscreen it using devilspie and then use simplescreenrecorder region capture for video and 2 loopbacks and 1 null sink for audio and stream using SSR. the region i capture with ssr is the selected region just around the preview window within obs. Problem solved but it's just a work around for now.
 
Last edited:

Osirez

New Member
I'm also having rather noticeable audio de-syncing problems. My sound meters appear to reflect the sound accurately in OBS but the video is out of sync. No matter what I do, the sound is consistently off.

I will echo the fact thought that I can use SimpleScreenRecorder without the audio de-syncing problems even if it shows sample errors or not.
 

leonhard

Developer
Thank you everybody for the reports, the information is quite valuable to us. Please excuse the lack of communication, but rest assured we are actively working on resolving the desync issues.
 

Glog78

New Member
localy recorded

https://dl.dropboxusercontent.com/u/39787677/2014-10-16 22-09-07.txt << obs log
https://dl.dropboxusercontent.com/u/39787677/2014-10-16 22-12-41.flv << recording

Linux archbox 3.14.12-rt9-1-l-pa #1 SMP PREEMPT RT Wed Jul 23 22:06:41 CEST 2014 x86_64 GNU/Linux
CPU(s): 6
01:00.0 VGA compatible controller: NVIDIA Corporation GF114 [GeForce GTX 560 Ti] (rev a1)
Subsystem: ASUSTeK Computer Inc. Device 8390
Kernel driver in use: nvidia
Kernel modules: nouveau, nvidia
00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 Azalia (Intel HDA) (rev 40)
01:00.1 Audio device: NVIDIA Corporation GF114 HDMI Audio Controller (rev a1)
MemTotal: 12237484 kB

Usb:
Bus 006 Device 003: ID 1395:1000 Sennheiser Communications

Libs:
multilib/lib32-libpulse 5.0-1 [Installiert]
extra/pulseaudio 5.0-1 [Installiert]
extra/pulseaudio-alsa 2-3 [Installiert]
multilib/lib32-libcanberra-pulse 0.30-4
 
Anyone finding this issue I've found some settings that seem to work for better sync results. Setting the stream to the following:
-remove all audio devices from main settings, just add audio per scene
-set audio to 44,100 sample rate and ensure your pulseaudio /etc/pulse/daemon.conf file has 44,100 for both default-sample-rate & alternate-sample-rate and remove semi-colon from the beginning of the line for those 2 settings. In ubuntu issue pulseaudio -k to make settings take effect
-60FPS (I know many will say they can't stream at 60FPS but for whatever reason I still had desync issues with my webcam audio/video if I used 30FPS
-advanced encoding settings enabled
-CBR enabled
-ultrafast preset (I was using medium and had audio about 1.5 seconds before the video)
-not sure if necessary but for 60FPS stream keyint=120 entered in the custom x264 box is required by twitch so that there's a keyframe every 2 seconds
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
The remaining issue that some people are having isn't due to pulseaudio but an unrelated bug dealing with the encoders. Finally figured out how to replicate and am tracking it down. Will release a new version when it's fixed.
 

NoXPhasma

Member
-set audio to 44,100 sample rate and ensure your pulseaudio /etc/pulse/daemon.conf file has 44,100 for both default-sample-rate & alternate-sample-rate and remove semi-colon from the beginning of the line for those 2 settings. In ubuntu issue pulseaudio -k to make settings take effect
It make no sense to set default-sample-rate and alternate-sample-rate to the same value, pulseaudio will not use alternate-sample-rate in that case. There is no default value for alternate-sample-rate, so you can just keep that commented out.
 
It make no sense to set default-sample-rate and alternate-sample-rate to the same value, pulseaudio will not use alternate-sample-rate in that case. There is no default value for alternate-sample-rate, so you can just keep that commented out.
depending whether or not you're running a pulseaudio version that's been patched there's this bug https://bugs.freedesktop.org/show_bug.cgi?id=66424 and setting the default and alternate sample rate to the same thing get's around the bug
 
Top