I can confirm that the the audio stuttering has been neutralized. I've recorded successfully 20 minutes with OBS without any drops.
Current OBS settings:
/Output/
fragmented mp4
video encoder - nvidia h.264
audio encoder - ffmpeg aac
audio track 1 (only)
automatic file split - manually
Rate control: CBR
Bitrate 16000 kbps
keyframe int = 0
preset P5 - slow (good q)
tunning - high quality
multipass mode - two passes (quarter reso)
profile - High
Look-ahead - NO
Psycho visual - Yes
GPU - 0
Max b-frames 2
Audio track 1 - 256 bitrate
-
/Audio - 48hz sample rate / stereo
global audio devices: Disabled (all)
-
/Video - Full HD - 60 fps
/Advanced settings
General - Above normal
Video -
renderer - Direct3D11
Color format nv12
color space rec.709
color range - limited
sdr w. level - 300nits
hdr n.p. level - 1000nits
Audio sources:
Input - default (doesn't matter actually)
-------------------------
And the big question: WHAT WAS CAUSING THE audio stuttering?
OBS. Audio sources are asynchronous.
The number of samples provided from the audio sources is sometimes insufficient or too many,
which causes audio glitch as #4600 and audio/video desync.
Who discovered it:
https://github.com/floele from Germany & Norihiro Kamae from Japan https://github.com/norihiro
How Has This Been Tested?
The code is tested on Fedora 34 with MOTU M2 and recording a tone signal.
Also analyzed step response and frequency response of the feedback system with
my SPICE model.
How the issue has been handled:
Frequency response of the open loop transfer function. Gain curve crosses 0 dB at 5.55 mHz (inverse of 3 minutes) and shows suppression for higher frequency components to eliminate fluctuation such as USB and load of the host. At 5.55 mHz, the phase curve shows 60 degree phase margin so that the feedback system is stable.
Simulated and measured step response of the system. This figure shows step response how the compensation is applied (vc1) and another internal node in the lag-lead filter (vc2), measured with MOTU M2 with Fedora 34. It estimated roughly 4.5 samples are are missing for every second. The implementation gradually started to add samples and reached maximum compensation -5.3 samples per second after 80 seconds from the start, then goes to the steady state compensating 4.5 samples per second. The other node vc2 slowly track vc1 so that it eliminates offset at the steady state. The curves of measured and simulated model are well matched except between 100 seconds to 300 seconds. I think we can rely on the model so that the gain and phase curves are well simulated and conclude the feedback system has enough stability.
More information about the issue here:
Operating System Info Windows 10 Other OS No response OBS Studio Version 27.0.0-rc2 OBS Studio Version (Other) No response OBS Studio Log URL https://pastebin.com/WfdNU2QN OBS Studio Crash Log URL ...
github.com
Description This PR implements asynchronous sample-rate conversion by utilizing a soft compensation feature in libswresample. A digital approach of asynchronous sample-rate conversion was propose...
github.com
HOW TO FIX THE ISSUE:
Simply download the PR of norihiro on GIthub, and replace the OBS files (you can backup the entire folder if u like first) and test.
Description This PR implements asynchronous sample-rate conversion by utilizing a soft compensation feature in libswresample. A digital approach of asynchronous sample-rate conversion was propose...
github.com
Congrats to floele and norihiro for discovering and handling this thing!