Skip to content

[TeleViz] video-file replay source, XR-default display, and camera-streaming doc overhaul#766

Merged
farbod-nv merged 14 commits into
mainfrom
fm/recorded_source
Jul 14, 2026
Merged

[TeleViz] video-file replay source, XR-default display, and camera-streaming doc overhaul#766
farbod-nv merged 14 commits into
mainfrom
fm/recorded_source

Conversation

@farbod-nv

@farbod-nv farbod-nv commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Adds type: video to camera_viz — a hardware-free replay source that plays any recording through the same source → QuadLayer → Televiz path a live camera uses. A sample clip ships via Git LFS and
configs/video.yaml points at it, so the sample works straight after clone: ./camera_viz.sh run configs/video.yaml. Supports looping, FPS pacing, resizing, and side-by-side stereo splitting; also
works as camera_streamer.py's capture side to exercise the NVENC → RTP path camera-free. Covered by 7 tests (clips synthesized in tmpdir, no fixtures).

XR is now the default display mode (code default + shipped configs), with run CONFIG --mode window as the documented desktop fallback.

The camera-streaming doc is restructured for public developers: requirements/setup defer to the system-requirements and quick-start pages, a no-camera first run leads, video replay and window mode
are framed as debug aids, and split mode carries a "not recommended in most cases" warning explaining its extra encode/decode hop. Also: setup-flag reference table, troubleshooting section, clearer error when source: rtp omits width/height, and the unused dellwebcam config removed.

Summary by CodeRabbit

  • New Features

    • Added video-file replay support for camera visualization, including looping, stereo side-by-side playback, resizing, and desktop/XR display options.
    • Added a ready-to-use video replay configuration and expanded camera source documentation.
    • XR mode is now the default display mode across example configurations.
    • Added clearer validation for camera dimensions and video paths.
  • Bug Fixes

    • Relative video paths now resolve from the configuration file location.
    • Stream geometry and viewer placement now reflect the actual camera source dimensions.
  • Documentation

    • Reworked setup, usage, deployment, configuration, and troubleshooting guidance.
  • Chores

    • Video assets are tracked with Git LFS and excluded from example commits by default.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: abd471e7-fb9f-4d2e-845a-46818a4d10c7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a GPU-backed video camera source using OpenCV, with relative-path resolution, looping or terminal playback, resizing, color conversion, and stereo side-by-side splitting. Streaming and rendering now use source-derived dimensions, and XR is the default display mode. New replay configuration, dependencies, tests, ignore rules, Git LFS handling, CLI guidance, and expanded camera-streaming documentation are included.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Config as YAML configuration
  participant CameraViz as camera_viz
  participant VideoSource as VideoFileSource
  participant OpenCV
  participant GPU
  Config->>CameraViz: load video source and resolve path
  CameraViz->>VideoSource: construct source
  VideoSource->>OpenCV: probe and decode frames
  VideoSource->>GPU: upload and convert frames
  GPU-->>CameraViz: provide rendered frame
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 34.48% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: video replay support, XR-default display, and documentation updates.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fm/recorded_source

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/source/references/camera_streaming.rst`:
- Around line 237-243: Correct the stereo example by changing the `stereo` field
in the camera streaming configuration from `false` to `true`, so it matches the
documented per-eye capture and SBS output behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 88f3b110-2f84-476a-bfd9-e27270278655

📥 Commits

Reviewing files that changed from the base of the PR and between 8b53bea and 2194621.

⛔ Files ignored due to path filters (1)
  • examples/camera_viz/test_data/recording.mp4 is excluded by !**/*.mp4
📒 Files selected for processing (20)
  • .gitattributes
  • docs/source/references/camera_streaming.rst
  • examples/camera_viz/.gitignore
  • examples/camera_viz/README.md
  • examples/camera_viz/camera_streamer.py
  • examples/camera_viz/camera_viz.py
  • examples/camera_viz/camera_viz.sh
  • examples/camera_viz/configs/dellwebcam.yaml
  • examples/camera_viz/configs/multi_camera.yaml
  • examples/camera_viz/configs/oakd.yaml
  • examples/camera_viz/configs/realsense.yaml
  • examples/camera_viz/configs/synthetic.yaml
  • examples/camera_viz/configs/v4l2.yaml
  • examples/camera_viz/configs/video.yaml
  • examples/camera_viz/configs/zed.yaml
  • examples/camera_viz/pyproject.toml
  • examples/camera_viz/sources/__init__.py
  • examples/camera_viz/sources/video_file.py
  • examples/camera_viz/tests/pyproject.toml
  • examples/camera_viz/tests/test_video_file_source.py
💤 Files with no reviewable changes (1)
  • examples/camera_viz/configs/dellwebcam.yaml

Comment thread docs/source/references/camera_streaming.rst
farbod-nv added 13 commits July 10, 2026 14:14
Play a recording through the FrameSource contract so Televiz can be
tested and previewed without camera hardware. Decode via OpenCV's
FFmpeg backend on the v4l2 hot path (pinned staging, async H2D, GPU
BGR→RGBA); monotonic-deadline pacing at the file's native FPS (or a
YAML override); loops by default, holds the last frame otherwise.
stereo: true splits side-by-side recordings into per-eye halves on the
GPU (viewer-only, like SyntheticStereoSource).

width/height are optional — the file is probed at build time — so
plane aspect and encoder/sender geometry now come from the built
source's spec instead of the YAML. Relative path: values resolve
against the config's directory in both entry points.

Also works as camera_streamer's capture side (mono), exercising the
full NVENC → RTP chain camera-free; verified end-to-end offscreen
render + a 30 fps RTP send on hardware.

Signed-off-by: Farbod Motlagh <fmotlagh@nvidia.com>
…o replay

Reorder the page in test order: requirements → setup → a no-camera
first run (video replay, with the exact expected terminal output) →
real cameras → XR → split mode → configuration → troubleshooting.

Video replay is now the featured hardware-free entry point; synthetic
is demoted to a note and table row calling it a render-path debugging
tool. Split mode gains a warning that its extra NVENC/NVDEC hop adds
latency and that direct mode is preferred whenever the camera can
attach to the viewer machine.

Supporting changes: camera_viz now raises a clear error when source:
rtp entries omit width/height (previously a bare KeyError — video
configs make those keys optional); video.yaml documents where the
ffmpeg test clip lands; a camera_viz .gitignore keeps generated /
user-supplied clips out of git.

Signed-off-by: Farbod Motlagh <fmotlagh@nvidia.com>
XR is the product experience, so it becomes the default everywhere:
the code default when a config omits display.mode, and the shipped
configs' explicit value. camera_viz.sh run already forwarded extra
args to camera_viz.py — document --mode xr|window in the usage text
and examples so the desktop-window fallback is discoverable.

Reframe the camera-streaming doc for public developers (it read like
an internal QA script): soften the walkthrough framing, present the
first run with both the XR default and the --mode window fallback,
fold the XR section into a Display modes section, and add an XR-
runtime-missing troubleshooting entry.

Signed-off-by: Farbod Motlagh <fmotlagh@nvidia.com>
Device-specific duplicate of v4l2.yaml; nothing referenced it.

Signed-off-by: Farbod Motlagh <fmotlagh@nvidia.com>
configs/video.yaml now points at test_data/recording.mp4 (10 s
testsrc2 pattern, ~1 MB) so the hardware-free first run works straight
after clone — no ffmpeg step. Track *.mp4 via LFS in .gitattributes,
carve the test_data exception out of the camera_viz .gitignore, and
document the git lfs pull recovery in troubleshooting.

Signed-off-by: Farbod Motlagh <fmotlagh@nvidia.com>
…ndow as debug aids

Signed-off-by: Farbod Motlagh <fmotlagh@nvidia.com>
Point system requirements at /references/requirements and the XR
prerequisites (CloudXR server, headset connection) at the quick-start
step anchors instead of restating them. Setup now says explicitly that
the pip-install step from the quick start isn't needed — the sample's
setup script creates its own environment.

Signed-off-by: Farbod Motlagh <fmotlagh@nvidia.com>
Expand the setup flags into a table explaining what each one does
(semantics verified against _install_deps.sh). Trim the first-run
section: drop the LFS/OpenCV asides and the synthetic note, keeping
just 'set a custom path for your own video'. Drop the redundant third
requirements bullet, reword '``cameras:``' prose to 'the cameras
list', and state that loopback is a testing/debugging aid.

Signed-off-by: Farbod Motlagh <fmotlagh@nvidia.com>
…plit-mode one-liners

Signed-off-by: Farbod Motlagh <fmotlagh@nvidia.com>
… stream to where Isaac Teleop runs

Signed-off-by: Farbod Motlagh <fmotlagh@nvidia.com>
…ases

Signed-off-by: Farbod Motlagh <fmotlagh@nvidia.com>
Signed-off-by: Farbod Motlagh <fmotlagh@nvidia.com>
Signed-off-by: Farbod Motlagh <fmotlagh@nvidia.com>
Comment thread examples/camera_viz/configs/replay.yaml
Comment thread examples/camera_viz/configs/video.yaml Outdated
…test

Address MR review: 'video' was too generic a config name — rename to
replay.yaml and update all references (docs, README, camera_viz.sh).
Clarify the stereo comment/doc: side-by-side replay renders as stereo
in direct mode only (the RTP sender rejects single-source stereo).

Also fix a Windows CI failure in test_resolve_video_paths: a POSIX
'/abs' string isn't absolute on Windows and got re-anchored to the
drive. Build the absolute test input from tmp_path so it's absolute on
any OS.

Signed-off-by: Farbod Motlagh <fmotlagh@nvidia.com>
@farbod-nv farbod-nv force-pushed the fm/recorded_source branch from ca40809 to 165e77c Compare July 13, 2026 22:45
@farbod-nv farbod-nv merged commit 3b64ebe into main Jul 14, 2026
59 of 74 checks passed
@farbod-nv farbod-nv deleted the fm/recorded_source branch July 14, 2026 17:13
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.

3 participants