Unity-Technologies / Unity-Technologies/com.unity.webrtc

[BUG]: Resizing the screen causes a a long delay with a frozen picture at the start of a stream, with periodic freezes thereafter on mobile

Open
#893 11 comments 0 reactions 1 assignee View on GitHub

@karasusan is already working on this.

Since Apr 4, 2023.

bug issued
Dominant language
Assembly
Stars
852
Forks
238
PR merge metrics
No merged PRs in 30d

Description

Not related to #752, which was definitely solved by the upgrade to M107 and resolves the keyframing issue.

Package version

reproduces: ad8c3776d9d3748d893a73fd2544cdbac231e96b
reproduces: 3.0.0-pre4
does not reproduce: 2.4.0 (all versions)

Environment
* OS: Windows 2022
* Unity version: 2021.3.22f1 URP
Steps To Reproduce
  1. Use a scene with a simple button and NvCodec.
  2. Create an offer from the Unity scene.
  3. Connect a remote visitor.
  4. Try to mash the button. Observe it works.
  5. Resize the stream.
  6. Observe a 3s 10s freeze between receiving the first frame (a still picture) and the button being interactable.

The software codecs do not exhibit the issue.

Current Behavior

There is a long time between the stream starting to send picture versus the subsequent frames in the stream from the client's perspective being interactable.

Expected Behavior

No freezing.

Anything else?

Setting keyframe interval to a small number makes the scene interactable much sooner. Then, after a short period of time, switching back to infinite goplength works.

Unlike the previous issue, this hotfix no longer works since upgrading to M107.

Increasing kLimitBufferCount to 600 resolves the issue.

Reverting https://github.com/Unity-Technologies/com.unity.webrtc/commit/7481842b78a0ba55222df45d725afd0ec7fff139 resolves the issue.

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.