Unity-Technologies / Unity-Technologies/com.unity.webrtc
VideoStreamTrack fails to start streaming in 3.0.0-pre.8 (worked fully stable on 3.0.0-pre.4, partial crash on pre.6)
@karasusan is already working on this.
Since Jun 16, 2025.
- Dominant language
- Assembly
- Stars
- 852
- Forks
- 238
- PR merge metrics
- No merged PRs in 30d
Description
Package version
3.0.0-pre.8
Environment
* OS:Android (HTC - Oculus VR Devices)
* Unity version:6000.0.49f1
Steps To Reproduce
1. Create a Unity project (tested with Unity 6000.0.49f1).
2. Install com.unity.webrtc package with different versions: pre.4, pre.6, and pre.8.
3. Set up a simple video streaming scenario using VideoStreamTrack to stream a RenderTexture from VR device (Oculus/HTC Vive Focus, OpenXR, Vulkan backend).
4. Start WebRTC signaling and establish peer connection successfully.
5. Once the video stream starts, observe behavior on each version.
Current Behavior
• ✅ In 3.0.0-pre.4: Streaming works fully stable, video frames are continuously streamed, no crashes or rendering issues observed.
• ⚠ In 3.0.0-pre.6: Streaming starts, first frames are correctly sent, but the application crashes after 1–5 seconds randomly. Sometimes crashes after first frame, sometimes after a few seconds.
• ❌ In 3.0.0-pre.8: Streaming never starts, VideoStreamTrack creation fails immediately or rendering crashes instantly. In some cases, encoder context is not fully initialized before first frame delivery.
All versions successfully complete peer connection, signaling, and ICE negotiation. The problem is purely at the rendering/encoder binding level after the video streaming starts.
On Unity Editor all versions successfully complete peer connection, signaling, and ICE also Video Streaming. It seems like the problem comes with the version update only affects Android devices.
Expected Behavior
• VideoStreamTrack should continue streaming frames consistently after the connection is established, without random crashes.
• Encoder binding should behave identically across all 3.x versions.
• New versions (pre.6 and later) should maintain compatibility with rendering stability that was working properly in pre.4.
Anything else?
Issue fully reproduces even when using Unity Render Streaming package (which internally uses com.unity.webrtc as its core dependency).
• Same behavior is observed on Render Streaming package:
• When Render Streaming uses WebRTC 3.0.0-pre.8 or pre.6, identical crashes occur (either immediately or a few seconds after starting the video stream).
• After downgrading Render Streaming’s internal WebRTC package to 3.0.0-pre.4, streaming works fully stable.
• This strongly suggests the root cause is inside the WebRTC package itself, and affects any downstream solution that builds on top of it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.