Skip to content

Stream cameras as H.264 video instead of per-frame JPEG#9

Draft
pablo-rerun wants to merge 1 commit into
mainfrom
video-stream-cameras
Draft

Stream cameras as H.264 video instead of per-frame JPEG#9
pablo-rerun wants to merge 1 commit into
mainfrom
video-stream-cameras

Conversation

@pablo-rerun

Copy link
Copy Markdown
Collaborator

Switches camera logging from per-frame JPEG to an H.264 rr.VideoStream (~10x smaller recordings).

Changes

  • cameras.py: new H264Encoder (PyAV) feeding rr.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-encoder flag — libx264 (default), h264_videotoolbox (Apple hardware, near-zero CPU but ~4 frames latency), or None for the old JPEG path (--jpeg-quality).
  • pyproject.toml / pixi.lock: add av dependency.
  • README: documents the flag and the viewer's ffmpeg ≥5.1 requirement for H.264 decode.

🤖 Generated with Claude Code

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant