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: a cropped Media Source with show/hide transitions never plays again after it ended (upstream obsproject/obs-studio#10852) #572
Upstream OBS bug, reported by TheRealMakkus in obsproject/obs-studio#10852 (Windows 11, OBS 30.2): a Media Source with Fade show and hide transitions plays only once. After it has played to its end, hiding it and showing it again never plays it again (until OBS is restarted), and it stays in the audio mixer. RytoEX reproduced it there and found the conditions: the item must be cropped and the media must have played to its end; it also happens in 30.1.2. It is still open upstream, and the code is the same in this fork.
Location
libobs/obs-scene.crender_item(): an item drawn through a texture (item_render: cropped, scale filter, blend mode, ...) is skipped entirely while its source has no size (if (!width || !height) goto cleanup;).
A scene item's show/hide transition only runs out when it is rendered: obs_transition_video_render() notices the time is up and sends transition_stop, which obs_sceneitem_transition_stop() uses to release the item's source.
A Media Source with "Hide source when playback ends" (clear on media end) has no size once it has played to its end. Its hide transition is then never rendered, never ends, and keeps the source active. Showing the item again adds a second activation instead of a new one, so "Restart playback when source becomes active" never fires and the source never closes.
Class
Feature stops working until restart (media never plays again), source leaks its activation (stays in the mixer).
How it is reached
Media Source with "Restart playback when source becomes active" and "Hide source when playback ends", Fade (or any) show and hide transitions on its scene item, the item cropped (or drawn through a texture for another reason). Let it play to its end, hide it (eye icon, hotkey, obs-websocket SetSceneItemEnabled, Streamer.bot), show it again.
Reproduced in the current release
AppImage 33.0.0-beta6-799, headless, private config, obs-websocket; a 2 s clip, item cropped by 10 px per side, Fade show/hide transitions (300 ms) in the scene collection:
After the clip ended: three hide/show cycles, the media stays ENDED and the source stays active (GetSourceActive: videoActive true while hidden); nothing is drawn.
Same item without crop: every show restarts the clip (PLAYING at +0.8 s, 3 of 3).
Proposed fix and failing test
Fix: in render_item(), when an item drawn through a texture is skipped because its source has no size, still render its running show/hide transition; with no size it draws nothing, exactly as an item drawn directly already does in that case.
RED test (cmocka, test_item_transition_empty_source, core video under Xvfb, Linux only):
cropped item, source without size: after hiding the source must be released, and after showing it again active once (today: still active with the hide transition running, then activated twice);
controls: no crop, a cropped source with a size, an item cropped to nothing.
@TheRealMakkus you reported this in obsproject/obs-studio#10852 (a Media Source with Fade show and hide transitions plays only once: after it has played to its end, hiding and showing it never plays it again, and it stays in the audio mixer), so a heads-up: it's fixed here in obs-rust by #573, with a regression test.
Cause, building on what RytoEX found in your thread (the item has to be cropped and the media has to have played to its end): a cropped item is drawn through a texture, and libobs skipped drawing it entirely while its source had no size, which is the state of a Media Source that has cleared its frame at the end. An item's show/hide transition only ends when the item is drawn, so the hide transition never ended and kept the source active. Showing it again then counted as a second activation instead of a fresh one, so "Restart playback when source becomes active" never fired. The running transition is now still drawn in that case (with no size it draws nothing, the same as an uncropped item). In the obs-rust release, three hide/show cycles of a cropped item never restarted the clip and the source stayed active while hidden; a build with the fix restarts it on every show (3 of 3) and the source is inactive while hidden.
Workaround on stock OBS (not tested here): remove the crop from the item (crop the media with a Crop/Pad filter on the source instead), or turn off "Show nothing when playback ends" so the source keeps a frame.
Activity
rdoupe commentedon Oct 13, 2026
Claiming: this issue.
test_item_transition_empty_source(1 of 4 failing): a cropped item's hide transition never ends while its source has no size.render_item()so it can end.PR today.
libobs: Let a cropped item's transition end while its source is empty
libobs: Let a cropped item's transition end while its source is empty (…
rdoupe commentedon Oct 13, 2026
@TheRealMakkus you reported this in obsproject/obs-studio#10852 (a Media Source with Fade show and hide transitions plays only once: after it has played to its end, hiding and showing it never plays it again, and it stays in the audio mixer), so a heads-up: it's fixed here in obs-rust by #573, with a regression test.
Cause, building on what RytoEX found in your thread (the item has to be cropped and the media has to have played to its end): a cropped item is drawn through a texture, and libobs skipped drawing it entirely while its source had no size, which is the state of a Media Source that has cleared its frame at the end. An item's show/hide transition only ends when the item is drawn, so the hide transition never ended and kept the source active. Showing it again then counted as a second activation instead of a fresh one, so "Restart playback when source becomes active" never fired. The running transition is now still drawn in that case (with no size it draws nothing, the same as an uncropped item). In the obs-rust release, three hide/show cycles of a cropped item never restarted the clip and the source stayed active while hidden; a build with the fix restarts it on every show (3 of 3) and the source is inactive while hidden.
Workaround on stock OBS (not tested here): remove the crop from the item (crop the media with a Crop/Pad filter on the source instead), or turn off "Show nothing when playback ends" so the source keeps a frame.
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 clip plays again after hiding and showing it would really help.