Add video recording commands (start-video, stop-video)#4
Open
simonw wants to merge 4 commits into
Open
Conversation
Records video of Chrome sessions by capturing CDP screencast frames during each rodney command execution. No background process needed - frames are captured automatically while commands run and accumulated across invocations. - start-video: enables recording flag in state, creates frames dir - stop-video: assembles frames into MP4 via ffmpeg (with graceful fallback), cleans up frames dir - Screencast capture hooks into withPage() and cmdOpen() transparently - Variable framerate video assembly using frame timestamps - 9 new tests covering start/stop/capture/accumulation/assembly https://claude.ai/code/session_018GfJUXfG9azF393kRTQPss
GIF is now the default output format for stop-video (no ffmpeg needed). Uses Go stdlib image/gif with Plan9 palette and Floyd-Steinberg dithering. Frame deduplication: consecutive identical frames (after quantization to 256 colors) are merged into a single GIF frame with extended duration. This significantly reduces file size for sessions with static page moments between commands. Format is auto-detected from file extension: - .gif: pure Go encoding with deduplication (default) - .mp4: ffmpeg assembly with variable framerate (requires ffmpeg) 4 new tests covering GIF encoding, dedup verification, stdlib decode validation, and extension-based format detection. https://claude.ai/code/session_018GfJUXfG9azF393kRTQPss
When stop-video is called with a .mp4 extension but ffmpeg isn't installed, automatically fall back to producing a .gif instead of silently failing. Prints a message to stderr informing the user. https://claude.ai/code/session_018GfJUXfG9azF393kRTQPss
Owner
Author
cmdSleep now connects to the active page when video recording is on, so screencast frames are captured during the sleep period. Also adds a LoopCount assertion to the GIF stdlib decode test. https://claude.ai/code/session_018GfJUXfG9azF393kRTQPss
Owner
Author
|
I thought it wasn't looping but turns out it had a 25s hold on the last frame: |
Owner
Author
|
Looks like the 25s delay is because the tool was using the timestamps of when commands were run to modify GIF lengths. I said:
|
Owner
Author
alex-pezarro-portswigger
added a commit
to alex-pezarro-portswigger/rodney
that referenced
this pull request
Apr 20, 2026
Resolve conflicts by: - Combining State struct so Logs/LoggerPID/Label (existing) coexist with VideoRecording/VideoDir (new) - Keeping RODNEY_HOME + activeStateDir (--local/--global) lookup while adding stateDirOverride for test isolation used by pr-4 tests - Restoring missing closing braces on TestLogs_FormatLogLevel and TestLogs_WriteJSONLine that git's merge algorithm elided because similar section delimiters appeared on both sides - Merging imports and keeping both sides' video tests plus the existing cookie/logs/label tests Also includes the per-frame-duration cap fix from the review feedback: idle time between rodney command invocations no longer leaks into the GIF/MP4 output as a long hold on the last frame.
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.

Records video of Chrome sessions by capturing CDP screencast frames
during each rodney command execution. No background process needed -
frames are captured automatically while commands run and accumulated
across invocations.
fallback), cleans up frames dir
https://claude.ai/code/session_018GfJUXfG9azF393kRTQPss