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

[BUG] "Hardware encoder is not supported" on systems with multiple GPU

Open
#306 2 comments 0 reactions 1 assignee View on GitHub

@karasusan is already working on this.

Since Jan 28, 2021.

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

Description

I have a laptop with an onboard GTX1060 and an external RTX2080 connected via TB.
Whenever WebRTC.Initialize(); is triggered it throws the exception - "Couldn't use hardware encoder. - System.ArgumentException: Hardware encoder is not supported". (as reported earlier on the other closed thread but the problem still persists. I solved other problems on my side and now I am sure there's a flaw in this package.).

The value returns by Unity SystemInfo.graphicsDeviceName is "NVIDIA GeForce RTX 2080" which is correct. And the GTX1060 seems to be turned off while connected to the RTX, I can check that with the windows taskmanger. The system also has the intel HD630 as well. If I disconnect the RTX, then it uses the onboard nvidia no problem.

My guess is that when WebRTC.Initialize() is called, it tries to use the first available NVIDIA graphics card that in my case is listed but cannot be used, then it throws the exception, perhaps does not iterate to the next one nor try to use the 2nd and onwards.
Please investigate.
Additionally, I think it is better if this package catches the exception internally and use software encoder. It can be done externally, however since every software has to do that, the current throw-exception-then-stop implementation doesn't feel very elegant.

Cheers,

Takashi Watanabe

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.