Stream cameras as H.264 video instead of per-frame JPEG#9
Draft
pablo-rerun wants to merge 1 commit into
Draft
Conversation
Encode webcam frames with PyAV into an rr.VideoStream (~10x smaller recordings). New --video-encoder flag: libx264 (default, zerolatency), h264_videotoolbox (Apple hardware), or None for the old JPEG path. Encoder restarts on recording swaps so each take starts with SPS + a keyframe, and pipelined packets are logged at their capture times. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Switches camera logging from per-frame JPEG to an H.264
rr.VideoStream(~10x smaller recordings).Changes
cameras.py: newH264Encoder(PyAV) feedingrr.VideoStream. No B-frames (rerun#10090), libx264 runs zerolatency so packets emit per-frame; packets are logged at their wall-clock capture times even when the encoder pipelines frames. On a recording swap (take collector), the encoder drains into the old recording and restarts so the new take begins with SPS + a keyframe. JPEG remains as fallback if the encoder is unavailable.log_arms.py: new--video-encoderflag —libx264(default),h264_videotoolbox(Apple hardware, near-zero CPU but ~4 frames latency), orNonefor the old JPEG path (--jpeg-quality).pyproject.toml/pixi.lock: addavdependency.🤖 Generated with Claude Code