You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: libobs: Subtract blending shows black in a rescaled recording or stream (upstream obsproject/obs-studio#10746) #580
Upstream OBS bug, reported by skedgyedgy in obsproject/obs-studio#10746 (Windows 10, OBS 30.1.2; confirmed by cjmaxik with Enhanced Broadcasting): with a source set to Subtract blending, a rescaled recording or stream shows solid black where the program view shows the subtracted colour. It is still open upstream, and the code is the same in this fork.
Location
libobs/obs-video.cdraw_mix_texture(): an encoder with its own scaled size (Rescale Output, and the extra renditions of Enhanced Broadcasting) gets its own video mix, which reuses the main mix's canvas texture by drawing it with the default blending. The default blending multiplies the colour by the texture's alpha.
libobs/obs-scene.c: Subtract blending subtracts alpha as well, so where an opaque source is subtracted from an opaque background the canvas holds colour with alpha 0. The main output ignores alpha; the reusing mix turns those areas black.
Class
Wrong picture in recordings and streams (black areas) only when output is rescaled.
How it is reached
A source with Subtract blending over an opaque background, and any output with Rescale Output (Advanced output recording or streaming), or Enhanced Broadcasting renditions.
Reproduced in the current release
AppImage 33.0.0-beta6-799, headless, private config, obs-websocket; canvas 640x360, Advanced output recording (x264, mkv), a light grey background, a dark red box with Subtract blending on the left half; frame sampled from the recording:
Rescaled to 320x180: the subtracted area is (0, 0, 0), black.
Not rescaled: (149, 190, 190), the subtracted colour; the grey area is (192, 192, 192) in both.
Proposed fix and failing test
Fix: draw the reused canvas texture with blending off in draw_mix_texture(), so the reusing mix gets exactly what the main mix rendered.
RED test (cmocka, test_scaled_mix_alpha, core video under Xvfb): an opaque grey background and a darker box with Subtract blending; a raw video encoder on the main mix and one with a scaled size; their mean luma must match (today: 172 unscaled, 16 = black scaled). Control: with a normal box both see the same picture today.
@skedgyedgy you reported this in obsproject/obs-studio#10746 (with a source set to Subtract blending, a rescaled recording or stream shows solid black where the program view shows the subtracted colour), so a heads-up: it's fixed here in obs-rust by #581, with a regression test.
Cause: Subtract blending subtracts alpha as well as colour, so an opaque source subtracted from an opaque background leaves colour with an alpha of 0 on the canvas. The main output ignores alpha, so the program looked right. An encoder with its own output size (Rescale Output, or the renditions cjmaxik saw with Enhanced Broadcasting) gets a second video mix, and that mix copied the main canvas with normal blending, which multiplies the colour by its alpha of 0: black. That copy is now drawn with blending off, so the rescaled mix gets exactly what the main mix rendered. In the obs-rust release, the subtracted area recorded as (0, 0, 0) when rescaled and (149, 190, 190) without rescaling; a build with the fix records (149, 190, 190) both ways.
Workaround on stock OBS (not tested here): record and stream at the canvas size, without Rescale Output, so no second mix is involved.
Activity
rdoupe commentedon Oct 13, 2026
Claiming: this issue.
test_scaled_mix_alpha(1 of 2 failing): a scaled encoder sees black where Subtract blending left colour with alpha 0.draw_mix_texture().PR today.
test/cmocka: Add failing test for a rescaled output of a subtracted c…
libobs: Copy a reused canvas texture without blending
libobs: Copy a reused canvas texture without blending (#581)
rdoupe commentedon Oct 13, 2026
@skedgyedgy you reported this in obsproject/obs-studio#10746 (with a source set to Subtract blending, a rescaled recording or stream shows solid black where the program view shows the subtracted colour), so a heads-up: it's fixed here in obs-rust by #581, with a regression test.
Cause: Subtract blending subtracts alpha as well as colour, so an opaque source subtracted from an opaque background leaves colour with an alpha of 0 on the canvas. The main output ignores alpha, so the program looked right. An encoder with its own output size (Rescale Output, or the renditions cjmaxik saw with Enhanced Broadcasting) gets a second video mix, and that mix copied the main canvas with normal blending, which multiplies the colour by its alpha of 0: black. That copy is now drawn with blending off, so the rescaled mix gets exactly what the main mix rendered. In the obs-rust release, the subtracted area recorded as (0, 0, 0) when rescaled and (149, 190, 190) without rescaling; a build with the fix records (149, 190, 190) both ways.
Workaround on stock OBS (not tested here): record and stream at the canvas size, without Rescale Output, so no second mix is involved.
It will be in the next obs-rust daily release after 0.1.0-beta.20261012: https://github.com/obs-rust/obs-studio/releases (Windows, macOS and Linux builds; on Arch it's
obs-studio-rust-gitin the AUR). obs-rust is an AI-assisted fork of OBS.If you get a chance to try it, a reply here on whether your rescaled output now matches the program would really help.