Repository navigation
Description
Upstream OBS bug, reported by univrsal in obsproject/obs-studio#2406 (VLC 3.0.8): with an Opus file in a VLC Video Source, the source's volume meter flickers: it shows a level for a moment, then resets about every second. The audio itself plays and records fine; the same file converted to MP3 does not do it. WizardCM (OBS team) reproduced it in OBS 26.1 and again in 27.0.1 with VLC 3.0.14. CodyJung traced it: libVLC hands the Opus audio over about every 0.9 s, and the meter resets after 0.5 s without new data. kkartaltepe (OBS team) added that audio capture callbacks get an async source's audio exactly as the source delivers it. Closed as stale in 2024 with no fix.
Location
plugins/vlc-video/vlc-video-source.clines 483-502,vlcs_audio_play(): forwards every block libVLC hands to its audio callback toobs_source_output_audio()at once (line 501).- libVLC 3 decodes up to 2 s ahead of its clock and hands the audio over as soon as it is decoded. With its Ogg and MP4 demuxers that comes in bursts. Measured with libVLC 3.0.23: Opus and Vorbis in Ogg come as about 1 s of audio at once, then nothing for 0.92 s; AAC in MP4 in bursts 0.25 s apart. WAV, FLAC, MP3 and Opus in WebM/Matroska come steadily. The blocks themselves are small (20-50 ms); it is their timing that is bursty.
libobs/obs-source.cline 1719: libobs places async audio by its timestamps, so playback is right, but audio capture callbacks (the volume meter, obs-websocket's InputVolumeMeters) run when the audio is handed over, and async audio filters (line 4123) process it then too.
Class
Wrong UI state: the volume meter of a VLC Video Source jumps, then resets about every second, for Opus and Vorbis files (.opus, .ogg); it runs up to 2 s ahead of what is heard for every file type.
How it is reached
- Add a VLC Video Source with an .opus file (Opus in Ogg).
- Watch its volume meter while it plays.
Reproduced headlessly: generated files played through the built vlc-video module under a private Xvfb, with an audio capture callback recording every hand-over. On master, Opus in Ogg is handed over in bursts 920 ms apart and up to 2.07 s ahead of the program mix.
Upstream work
None. No upstream PR. Related: obsproject/obs-studio#11711 (a compressor on a VLC Video Source sidechained to a microphone ducks about a second late), which the same hand-over timing would explain, since async audio filters run when the audio is handed over.
Proposed fix and failing test
Fix (plugins/vlc-video only): vlcs_audio_play() holds each block until it is due to play in 100 ms, as an audio device's blocking write does. Timestamps are unchanged. The wait uses the drain abort event from #302, so a stop or the next playlist item cuts it short.
RED test test_vlc_audio_pacing (libVLC, needs Xvfb, skips without either like the other VLC tests): generates Opus/Ogg, Vorbis/Ogg, AAC/MP4 and Opus/WebM files with FFmpeg and a WAV file. During playback no hand-over may carry more than 50 ms, hand-overs may be at most 100 ms apart, timestamps must run on without jumps, and the whole file must reach the program mix. 3 of 6 fail today (Opus/Ogg, Vorbis/Ogg, AAC/MP4).
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
rdoupe commentedon Oct 12, 2026
Claiming: this issue.
test_vlc_audio_pacing(3 of 6 failing): Opus/Vorbis in Ogg and AAC in MP4 through the real VLC source; audio must be handed over as it plays (no bursts, gaps of at most 100 ms), with timestamps and the full file in the mix unchanged; WAV and WebM as controls and a pause/resume guard.PR today.
test/cmocka: VLC source must hand its audio over as it plays (RED)
vlc-video: Hand audio to libobs as it plays
vlc-video: Hand audio to libobs as it plays (#405)
rdoupe commentedon Oct 12, 2026
@univrsal you reported this in obsproject/obs-studio#2406, so a heads-up: it's fixed here in obs-rust by #405, merged today with a regression test.
Cause: libVLC decodes audio up to two seconds ahead and, with its Ogg and MP4 demuxers, hands it to the VLC Video Source in bursts: about a second of small blocks at once, then nothing for most of a second. The source passed each block straight to OBS. Playback and recordings were fine, because libobs places audio by its timestamps, but the volume meter, obs-websocket's meters and audio filters (a sidechain compressor, for example) see audio when it's handed over, so the meter jumped and then dropped back to nothing between bursts. CodyJung traced it to those bursts in your thread, and WizardCM confirmed it twice. Now the source hands each block over shortly before it's due to play, the way an audio device takes it, and the timestamps are unchanged. The test plays Opus and Vorbis in Ogg and AAC in MP4 through the real VLC source: before, audio arrived in bursts 0.25-0.92 s apart and ran 1-2 s ahead of playback; now it arrives steadily, under 0.2 s ahead.
Not covered: tested with libVLC 3.0.23 on Linux; Windows and macOS libVLC builds and libVLC 4 weren't tried.
Workaround on stock OBS: use a Media Source instead of a VLC Video Source for those files.
obs-rust is an AI-assisted fork of OBS; on Arch it's
obs-studio-rust-gitin the AUR.If you try it, a short reply here on whether the meter moves smoothly now would really help.
univrsal commentedon Oct 12, 2026
I installed the AUR package but obs won't start
gdb log
rdoupe commentedon Oct 14, 2026
Thanks for the log, it shows the cause.
What happens: OBS 33 (and so this fork) loads a fixed list of "core" modules from
/usr/lib/obs-modules/core/, and obs-browser is on that list when it is built. If any of them is there but can't be opened, OBS stops with "Failed to load core OBS modules". Your package installedobs-browser.sothere, but the library it needs (libcef.so, from thecefpackage) isn't installed. In OBS 32 the same thing only showed a "some plugins failed to load" message and OBS kept running. Stock OBS 33.0.0-rc1 has the same code. I reproduced it here with our latest release (v0.1.0-beta.20261014) by giving one core module a missing library: OBS refused to start the same way.The AUR package is maintained by someone else, not us. Its PKGBUILD has
cefonly as a build dependency. It points obs-browser at/usr/lib/cef/, butcefisn't a runtime dependency of the main package, so an AUR helper that removes build dependencies afterwards leavesobs-browser.sowithout its library. The current PKGBUILD still does this.Workarounds:
ceffrom the Arch repos (sudo pacman -S cef), so/usr/lib/cef/libcef.soexists. Ifcefhas been updated since you built the package, rebuild the package with it installed so the versions match. (Not tested here.)obs-studio-rust-plugin-browser-gitfrom the same AUR package, which depends oncefand so pulls it in. (Not tested here. Its own copy of obs-browser goes to/usr/lib/obs-plugins/, which OBS 33 skips, but the copy inobs-modules/core/will then load.)obs-browser.so. When a core module's file is missing, OBS stops loading every core module after it in the list and starts without them. I checked that with the same release by removing a different core module.Next: we're preparing a fix (issue and PR to follow) so that a core module that can't be loaded (like obs-browser without libcef) no longer stops OBS from starting: it is skipped with a warning, and the other core modules still load. That includes the case where its file is missing. I'll post here once it's merged and in a release.
rdoupe commentedon Oct 14, 2026
Follow-up: the fix is merged (#750, for #749). A core module that can't be opened, like
obs-browser.sowithoutlibcef.so, is now skipped with a warning, and OBS starts with the other core modules loaded. A missing core module file no longer stops the ones after it from loading either.It will be in the next obs-rust daily release after 0.1.0-beta.20261014: https://github.com/obs-rust/obs-studio/releases. The AUR
-gitpackage picks it up on its next rebuild. Withoutcefinstalled you won't have a Browser Source, but OBS will start; installingcef(not tested here) should bring it back.univrsal commentedon Oct 14, 2026
I have installed
cefand build the latest version and still get the same bug. The AppImage doesn't seem to contain the VLC source so I can't test it with that either. I tried just deleting the obs-browser.so and then it just failed withrdoupe commentedon Oct 15, 2026
Thanks for trying again. Both messages look like an OBS from before #750, not the current one.
What I tested: I built current master with the build options and install layout of the AUR
obs-studio-rust-gitPKGBUILD, withcef152.0.6 from the Arch repos. Then I started it under a headless session:cef, obs-browser loads (CEF Version 152.0.7977.83), and OBS starts and opens its main window.cef:Core module 'obs-browser' could not be opened, continuing without it. OBS still starts.obs-browser.sodeleted:Failed to load core module obs-browser. The other core modules still load,rtmp_commonis there, and OBS starts.I then rebuilt the same tree with #750 taken out and deleted
obs-browser.soagain. That gave your exact errors:Service 'rtmp_common' not found, thenFailed to initialize service. The old loader stopped at the first missing core module, and obs-browser comes before obs-ffmpeg, obs-outputs, rtmp-services and the rest, so none of those loaded. Withcefinstalled, the build without #750 also started fine here. So I can't tell yet why it still failed for you withcefinstalled.One thing that changed on 14 October (#706, merged a few hours before #750): the Rust build now installs separately from upstream OBS:
obs-studio-rust-gui, no longerobs/usr/lib/obs-studio-rust/obs-modules/core//usr/share/obs-studio-rust/If you started
obs, or if theobs-browser.soyou deleted was in/usr/lib/obs-modules/core/, that was an older build. The non-git AUR packageobs-studio-rust(0.1.0beta.20261014) is also from before #750.What you can do now:
obs-browser.sois back.obs-studio-rust-gitand start it withobs-studio-rust-gui --verbose. The log's version line should readbased on OBS 0.0.0.r1163or higher. That's the first build with libobs: Carry on when a core module cannot be loaded #750 in it.If it still won't start, please post:
obs-studio-rust-gui --verbose, up to where it exitspacman -Q obs-studio-rust-git obs-studio-rust obs-studio-rust-plugin-browser-git cefls /usr/lib/obs-studio-rust/obs-modules/core/ /usr/lib/obs-modules/core/ldd /usr/lib/obs-studio-rust/obs-modules/core/obs-browser.so | grep 'not found'VLC source: right, the AppImage is built without the VLC Video Source. The AUR PKGBUILD leaves it out too (
-DENABLE_VLC=OFF), so even a working AUR build won't have it. To test #405, change that line in the PKGBUILD to-DENABLE_VLC=ONand installvlcbefore building (not tested here).What we're fixing: nothing new in OBS for this. #750 is on master, and it will be in the next obs-rust release after 0.1.0-beta.20261014 (https://github.com/obs-rust/obs-studio/releases). The
cefruntime dependency and the VLC setting are in the AUR package, which someone else maintains. I looked at adding VLC to the AppImage, but it isn't a quick change: the AppImage ships its own copies of glibc and FFmpeg, and the VLC Video Source loads the system libVLC at runtime.