[Linux] Timeline editor video playback stutters and desyncs with audio (receiver dropped frames)#4429
Description
When recording and bringing a studio recording into the Cap desktop timeline editor, playback is severely desynced. The audio continues playing at normal speed, but the video preview crawls, stutters, and drops frames, making timeline editing and previewing impossible.
Scrubbing the timeline shows the video moving across frames, but real-time playback in the editor repeatedly drops decoded frames. Checking the local logs reveals high frame drop rates during segmented muxing and decoder receiver failures:
cap_recording::output_pipeline::core: Master clock hard reset for video source (>2s jump)cap_rendering::decoder::ffmpeg: Failed to send decoded frame: receiver dropped
Reproduction
- Open Cap Desktop on Linux (Ubuntu 26.04).
- Record a screen/studio session (1080p, 60fps).
- Bring the recording into the built-in editor.
- Press play to preview or edit.
- Audio plays continuously while video severely lags and drops frames, leading to complete desync.
Additional Context
- Cap version: 0.6.0
- Operating system, version: Ubuntu 26.04.1 LTS
- Device: Intel(R) HD Graphics 620 (KBL GT2), 16GB RAM
Relevant excerpt from ~/.local/share/so.cap.desktop/logs/cap-desktop-errors.log:
WARN screen-out:{task="mux-video"}: cap_enc_ffmpeg::video::h264: Using SOFTWARE H264 encoder (high CPU usage expected) encoder=libx264 width=1920 height=1080 fps=60.0
WARN screen-out:{task="mux-video"}: cap_recording::output_pipeline::ffmpeg: Segmented muxer frame drop rate exceeds 5% threshold frames=85 drops=52 drop_rate_pct="38.0%"
WARN screen-out:{task="mux-video"}: cap_recording::output_pipeline::core: Master clock hard reset for video source (>2s jump) source="video" hard_resets=1
WARN cap_recording::output_pipeline::ffmpeg: Recording finished with significant frame drops total_frames=2228 total_drops=230 drop_rate_pct="9.4%"
WARN cap_rendering::decoder::ffmpeg: Failed to send decoded frame 0: receiver dropped
WARN cap_rendering::decoder::ffmpeg: Failed to send decoded frame 1865: receiver dropped