Repository navigation
Stop wf-recorder recordings on a still screen without force-killing them - #18551
Merged
Merged
Conversation
wf-recorder acts on SIGINT only when its next frame arrives, and by default it asks only for frames that changed, so on a still screen the stop waited 5 s, killed the recorder and warned the video may be corrupted. -D makes it capture every frame. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
[Medium impact] The change appears safe to merge. SummaryAdds
Reviews (1) · Last reviewed commit: "Record every frame with wf-recorder so a..." · Reviewed by Greptile |
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.
When Omarchy records with wf-recorder — on Apple Silicon, and wherever gpu-screen-recorder cannot start — stopping a recording while nothing on screen is changing takes over 5 seconds and ends in "Screen recording error: Recording process had to be force-killed. Video may be corrupted." The saved notification, its preview, the trim and the audio levelling are all skipped, and the video ends at the last change on screen rather than at the stop.
wf-recorder 0.6.0 acts on SIGINT only when its next frame arrives: the signal handler sets a flag, and the main loop is blocked waiting for the compositor. By default it asks only for frames that changed, and Hyprland sends none while the screen is still, so the stop never lands and
stop_screenrecordingkills it after 5 seconds.end_launched_recorder, which cancels a start, waits its 2 seconds and kills it the same way.This launches wf-recorder with
-D(--no-damage), which wf-recorder documents as continuously recording new frames, so a frame arrives on every refresh and the stop is read within one. The encoded rate stays at 60 fps through-r 60. The cost is that a still screen is captured and encoded like a moving one, which is what a moving screen already costs; gpu-screen-recorder already records at a constant rate. Once a wf-recorder that checks for the stop without waiting for a frame ships (soreau/wf-recorder#1 is one attempt),-Dcan go.On a worker built from the Omarchy ISO (wf-recorder 0.6.0, Hyprland 0.57.2, gpu-screen-recorder unable to start), a full-screen recording left still for 10 seconds and then stopped: on quattro the stop took 5589 ms, the recorder was killed and the file held 0.13 s; with this change the stop took 345 ms, the recording saved normally and the file held 13.65 s.
Not fixed here: with the monitor off (DPMS) nothing is rendered, so even
-Dgets no frame and a stop still waits for the kill. #12469 reports the same notification for a different cause, slow muxing in gpu-screen-recorder; #15122 and #12559 address that one and combine with this.Found by Prime's QA pass, whose diagnosis and approach this follows.
🤖 Generated by Opus 5.5 in Claude Code. Reviewed by Codex Medium and muse-wonder via pi, thinking high.