Skip to content

Reduce delays in webRTC remote display.#7496

Open
ssheorey wants to merge 12 commits into
mainfrom
ss/fast-webrtc
Open

Reduce delays in webRTC remote display.#7496
ssheorey wants to merge 12 commits into
mainfrom
ss/fast-webrtc

Conversation

@ssheorey

@ssheorey ssheorey commented May 20, 2026

Copy link
Copy Markdown
Member

Type

  • Bug fix (non-breaking change which fixes an issue): Fixes #
  • New feature (non-breaking change which adds functionality). Resolves #
  • Breaking change (fix or feature that would cause existing functionality to not work as expected) Resolves #

Motivation and Context

WebRTC remote display is slow, even for local viewing. This PR reduces remote rendering latency.

Checklist:

  • I have run python util/check_style.py --apply to apply Open3D code style
    to my code.
  • This PR changes Open3D behavior or adds new functionality.
    • Both C++ (Doxygen) and Python (Sphinx / Google style) documentation is
      updated accordingly.
    • I have added or updated C++ and / or Python unit tests OR included test
      results
      (e.g. screenshots or numbers) here.
  • I will follow up and update the code if CI fails.
  • For fork PRs, I have selected Allow edits from maintainers.

Description

  • Remove duplicate redraw on input (WebRTCWindowSystem.cpp)
  • Draw coalescing (BitmapWindowSystem.cpp)
  • Input (mouse event) coalescing (BitmapWindowSystem.cpp)
  • JS requestAnimationFrame coalescing / throttling (webrtcstreamer.js)
  • Async encoder thread (PeerConnectionManager.cpp/.h)
  • Data channel low-latency mode (webrtcstreamer.js)
  • Reduced startup delay (500ms -> 250ms) (WebRTCWindowSystem.cpp)
  • VP9 codec preference over VP8 (webrtcstreamer.js)

Also: Check textures for validity before trying to write them to gltf.

ssheorey added 3 commits May 20, 2026 00:31
…code, VP9 preference

- Remove duplicate redraw on input (WebRTCWindowSystem.cpp)
- Draw coalescing (BitmapWindowSystem.cpp)
- Input (mouse event) coalescing (BitmapWindowSystem.cpp)
- JS requestAnimationFrame  coalescing / throttling (webrtcstreamer.js)
-  Async encoder thread (PeerConnectionManager.cpp/.h)
- Data channel low-latency mode (webrtcstreamer.js)
-  Reduced startup delay (500ms -> 250ms) (WebRTCWindowSystem.cpp)
-  VP9 codec preference over VP8 (webrtcstreamer.js)
@update-docs

update-docs Bot commented May 20, 2026

Copy link
Copy Markdown

Thanks for submitting this pull request! The maintainers of this repository would appreciate if you could update the CHANGELOG.md based on your changes.

ssheorey added 2 commits May 21, 2026 13:49
sends zero playout delay in every RTP packet's header extension
 when adaptation is necessary, drops resolution rather than framerate
 prevents WebRTC's autonomous resolution scaling;
 Replaced playoutDelayHint with jitterBufferTarget = 0

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR targets lower end-to-end latency for Open3D’s WebRTC-based remote visualization by reducing redundant redraws, coalescing high-frequency input/render events, and decoupling frame encoding from the render thread. It also hardens ASSIMP glTF export by skipping invalid/unsupported texture maps.

Changes:

  • Reduce render/event backlog via redraw and input/draw coalescing in the GUI/WebRTC paths.
  • Move WebRTC frame delivery/encoding work off the render thread via an asynchronous encoder thread.
  • Improve streaming responsiveness via WebRTC configuration tweaks (field trials, codec preference, jitter buffer settings), plus safer texture export validation.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
python/js/package.json Adds a Yarn resolution override for license-webpack-plugin.
cpp/open3d/visualization/webrtc_server/WebRTCWindowSystem.cpp Removes duplicate redraw scheduling on data-channel messages; reduces init-frame pacing delay.
cpp/open3d/visualization/webrtc_server/PeerConnectionManager.h Adds state needed for an asynchronous encoder thread (queue/mutex/cv/thread).
cpp/open3d/visualization/webrtc_server/PeerConnectionManager.cpp Adds WebRTC field trials/content hints, bundle policy, async encoder thread, and frame coalescing.
cpp/open3d/visualization/webrtc_server/html/webrtcstreamer.js Coalesces pointer/wheel events via rAF, prefers VP9, tweaks jitter buffer, and changes data-channel options.
cpp/open3d/visualization/gui/BitmapWindowSystem.cpp Coalesces draw events per window and merges high-rate mouse MOVE/DRAG/WHEEL events.
cpp/open3d/t/io/file_format/FileASSIMP.cpp Skips exporting empty/unsupported texture maps; logs warnings for unsupported texture dtypes.

Comment thread cpp/open3d/visualization/webrtc_server/WebRTCWindowSystem.cpp Outdated
Comment thread cpp/open3d/visualization/webrtc_server/PeerConnectionManager.cpp
Comment thread cpp/open3d/visualization/webrtc_server/html/webrtcstreamer.js
Comment thread cpp/open3d/visualization/webrtc_server/html/webrtcstreamer.js Outdated
Comment on lines +574 to +579
const auto& material = w_mesh.GetMaterial();
int n_textures = 0;
if (w_mesh.GetMaterial().HasAlbedoMap()) ++n_textures;
if (w_mesh.GetMaterial().HasNormalMap()) ++n_textures;
if (w_mesh.GetMaterial().HasAOMap()) ++n_textures;
if (w_mesh.GetMaterial().HasAORoughnessMetalMap()) {
if (HasValidTexture(material, "albedo")) ++n_textures;
if (HasValidTexture(material, "normal")) ++n_textures;
if (HasValidTexture(material, "ambient_occlusion")) ++n_textures;
if (HasValidTexture(material, "ao_rough_metal")) {
ssheorey added 6 commits May 23, 2026 15:29
- Prepend depot_tools to PATH and run win_tools.bat on Windows
- Disable protobuf constinit on Apple to fix Xcode 15.4 build
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.

2 participants