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
plugins/linux-pipewire/pipewire.c:589find_latest_buffer(), used by process_video_sync() (:717, :729); drawn by obs_pipewire_stream_video_render() (:1367).
Class
Logic error: frame pacing.
Cause
The PipeWire thread replaces the texture with the newest buffer as soon as it arrives, and OBS draws whatever is current on each tick of its own 60 Hz clock. The compositor's 60 Hz and OBS's 60 Hz have an arbitrary, drifting phase. When frames land near an OBS tick, small delivery jitter makes one tick see two new frames (one never drawn) and the next see none (the previous one drawn twice): the "frame twice, then one skipped" in the report. Comments there point at Mutter 49.5 adding the jitter (GPU Screen Recorder shows it too); OBS's latest-wins logic is what turns it into dropped and doubled frames.
How it is reached
Record a 60 Hz screen at 60 fps with PipeWire screen capture on a compositor whose frame delivery jitters by a few ms.
Proposed fix and failing test
Fix: a small FIFO (at most 3 frames including the one on screen) that advances at most one frame per OBS tick. Wiring it in means holding imported pw_buffers (dmabuf + explicit-sync state) across ticks instead of requeueing immediately, and possibly more negotiated buffers. Costs up to one frame of latency; needs hardware testing.
RED test (cmocka, test_pipewire_frame_pacing), with the decision in a small obs_pw_frame_pacer: a 60 Hz source with ±2 ms jitter across 34 phase offsets, 10 s each. Fails today: 8 bad phases, 901 duplicated and 905 skipped frames. Guards that pass: nothing drawn before the first frame, the jitter-free control, bounded latency at 120 Hz, repeats at 30 Hz, every buffer released once. A 40-line prototype passes all 6.
The reproduction is simulated (the jitter model is chosen, not measured on GNOME). Not claimed: the RED test branch is available to whoever takes it.
RED: test_pipewire_frame_pacing (7 cases, pure logic, runs in CI): a compositor sending frames at a fixed rate with +-2 ms of delivery jitter against OBS's 60 fps video ticks. Fails on master: a 60 Hz source over 34 phases has 8 bad phases, 901 duplicated and 905 skipped frames; a source 1% faster than OBS (drifting clocks) has up to 27 duplicated and 33 skipped frames where only its 6 surplus frames need to go. Reproduced in the current release AppImage: a 60.05 Hz producer with +-2 ms jitter recorded at 60 fps gives 150 duplicated and 153 skipped frames in 60 s.
GREEN: frames wait in arrival order and each video tick moves on by at most one (at most three held, the oldest waiting one dropped when the source is faster). DMA-BUF frames are copied into a texture of OBS's own as they arrive, so their buffers still go back to the compositor at once.
PR today.
@debug686 you reported this in obsproject/obs-studio#13292 (recording a 60 Hz screen at 60 fps on GNOME/Wayland shows some frames twice and then skips one), so a heads-up: obs-rust has a fix for it, merged as #612, with a regression test.
Cause: the PipeWire screen capture kept only the newest frame and OBS drew whatever was newest on each video tick. When the screen's frames and OBS's ticks drift even slightly apart, or arrive with a little jitter, two frames sometimes land between ticks (one is lost) and a tick sometimes has no new frame (the old one is shown again). Frames are now queued in arrival order and each video tick takes the next one, holding at most three. In the obs-rust release, a 60.05 Hz test source recorded at 60 fps had about 20 repeated and 20 skipped frames per minute (about 150 each with ±2 ms jitter); with the fix, 0 to 2. The trade-off is that the capture can run up to one frame behind.
What I could not test: GNOME/Mutter and NVIDIA (your setup, and eclipise's), and DMA-BUF with explicit sync. So your feedback on GNOME would be especially useful.
Activity
rdoupe commentedon Oct 13, 2026
Claiming: this issue.
test_pipewire_frame_pacing(7 cases, pure logic, runs in CI): a compositor sending frames at a fixed rate with +-2 ms of delivery jitter against OBS's 60 fps video ticks. Fails on master: a 60 Hz source over 34 phases has 8 bad phases, 901 duplicated and 905 skipped frames; a source 1% faster than OBS (drifting clocks) has up to 27 duplicated and 33 skipped frames where only its 6 surplus frames need to go. Reproduced in the current release AppImage: a 60.05 Hz producer with +-2 ms jitter recorded at 60 fps gives 150 duplicated and 153 skipped frames in 60 s.PR today.
test/cmocka: Screen capture draws some frames twice and skips others
linux-pipewire: Draw each screen capture frame on its own video tick
linux-pipewire: Draw each screen capture frame on its own video tick (#…
rdoupe commentedon Oct 13, 2026
@debug686 you reported this in obsproject/obs-studio#13292 (recording a 60 Hz screen at 60 fps on GNOME/Wayland shows some frames twice and then skips one), so a heads-up: obs-rust has a fix for it, merged as #612, with a regression test.
Cause: the PipeWire screen capture kept only the newest frame and OBS drew whatever was newest on each video tick. When the screen's frames and OBS's ticks drift even slightly apart, or arrive with a little jitter, two frames sometimes land between ticks (one is lost) and a tick sometimes has no new frame (the old one is shown again). Frames are now queued in arrival order and each video tick takes the next one, holding at most three. In the obs-rust release, a 60.05 Hz test source recorded at 60 fps had about 20 repeated and 20 skipped frames per minute (about 150 each with ±2 ms jitter); with the fix, 0 to 2. The trade-off is that the capture can run up to one frame behind.
What I could not test: GNOME/Mutter and NVIDIA (your setup, and eclipise's), and DMA-BUF with explicit sync. So your feedback on GNOME would be especially useful.
It will be in the next obs-rust daily release after 0.1.0-beta.20261013: https://github.com/obs-rust/obs-studio/releases (Linux AppImage; 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 60 fps recordings are smooth now would really help.