tests: regression for scene-wrapped source audio (#1493)#1724
Open
summeroff wants to merge 1 commit into
Open
Conversation
Mirrors #1493: an ffmpeg_source wrapped in a scene (with sceneItem.video deliberately left unset, so the scene item's canvas stays NULL) and set as the output source must still record non-silent audio. Before the libobs fix this recorded silence. Adds util/media_probe.ts, which reads mean_volume via ffmpeg's volumedetect filter (resolved from FFMPEG_PATH or PATH); digital silence is ~ -91 dB, so the test asserts mean_volume > -80 dB. Requires the libobs fix in streamlabs/obs-studio (branch fix/scene-audio-null-canvas-guard) to pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds an integration test reproducing #1493: an
ffmpeg_sourcewrapped in a scene (withsceneItem.videodeliberately left unset, so the scene item's canvas staysNULL) and set as the output source must still record non-silent audio.Before the libobs fix this case recorded silence; with it, the source's audio is mixed through the scene as expected.
Why it caught the bug
The existing dual-output tests pass only because they assign
sceneItem.video(which callsobs_sceneitem_set_canvas). The plainscene.add()path — and the reporter's repro — never set it, leaving the item canvasNULL. This test exercises exactly that path.How it asserts
New
tests/osn-tests/util/media_probe.tsreadsmean_volumevia ffmpeg'svolumedetectfilter (ffmpeg resolved fromFFMPEG_PATHorPATH). Digital silence reports ~-91 dB, real audio sits well above-40 dB, so the test assertsmean_volume > -80 dB. Helper logic validated locally against generated silent (-91 dB→ fails) vs tone (-21 dB→ passes) clips.Dependency
Requires the libobs fix — streamlabs/obs-studio#738 — to be present in the consumed libobs build. This PR will not go green until that fix is rolled into the osn libobs version.
Notes
tsc --noEmit, project options).ffmpegbinary; OBS bundles one, or setFFMPEG_PATH.🤖 Generated with Claude Code