com.unity.webrtc icon indicating copy to clipboard operation
com.unity.webrtc copied to clipboard

[BUG]: AV1 is not available

Open DenizUgur opened this issue 2 years ago • 17 comments

Package version

2.4.0-exp.8

Environment

* OS: MacOS
* Unity version: 2021.3.6f1

Steps To Reproduce

I'm using the receiver sample demo and I don't seem to be able to activate AV1 codec. What are the requirements for enabling AV1 stream?

Current Behavior

AV1 does not start the stream

Expected Behavior

AV1 should start the stream

Anything else?

No response

DenizUgur avatar Aug 10 '22 19:08 DenizUgur

Have you tried the package sample? https://docs.unity3d.com/Packages/[email protected]/manual/sample.html

karasusan avatar Aug 22 '22 01:08 karasusan

I was trying the sample from renderstreaming package. The one where we were able to select codecs from a dropdown. Now that seems to be gone or changed so I can't test it anymore. Also I've imported this package's sample into a new project but there are some errors so I'm not sure how to properly test AV1. My end goal is to use AV1 in place of VP8 on renderstreaming samples

DenizUgur avatar Aug 22 '22 07:08 DenizUgur

@DenizUgur What is the combination of sender and receiver? (Unity-Browser?)

kannan-xiao4 avatar Aug 23 '22 05:08 kannan-xiao4

Here is my setup:

  • Editor: 2021.3.6f1
  • Unity Render Streaming: 3.1.0-exp.3
  • Chrome: 104.0.5112.101
  • macOS: 12.5

I've verified that player uses VP8 by chrome://webrtc-internals/. There used to be an option to select which codec I want to use but now that seems to be gone.

DenizUgur avatar Aug 29 '22 07:08 DenizUgur

@DenizUgur The feature of codec configuration is currently implemented in the develop branch of Unity Render Streaming repository.

karasusan avatar Aug 30 '22 02:08 karasusan

Okay, I have changed to develop branch and tested with the same configuration but I'm not seeing any video right now.

Screen Shot 2022-08-30 at 10 44 01

DenizUgur avatar Aug 30 '22 07:08 DenizUgur

@DenizUgur To fix this issue, we have to update the libwebrtc. The cause of issue is the mismatch of mimetype of AV1 because the old libwebrtc defines video/AV1X as the mimetype of AV1. We already have a plan to update the library near future.

karasusan avatar Sep 06 '22 02:09 karasusan

memo: WRS-97

karasusan avatar Sep 06 '22 02:09 karasusan

I'm currently modifying this repository in downstream so if it's just a matter of modifying the WEBRTC_VERSION parameter in build script related to libwebrtc then to which version should I change it?

DenizUgur avatar Sep 06 '22 16:09 DenizUgur

@DenizUgur changeset is here. But we need to fix the code because some APIs in libwebrtc are changed. https://source.chromium.org/chromium/_/webrtc/src.git/+/6b19d8273bb718833b562def87f92b9f0becb39e

karasusan avatar Sep 07 '22 02:09 karasusan

Is it possible to upgrade NVENC to 12.0 to support AV1 there?

https://developer.nvidia.com/blog/av1-encoding-and-fruc-video-performance-boosts-and-higher-fidelity-on-the-nvidia-ada-architecture/

DenizUgur avatar Sep 22 '22 17:09 DenizUgur

@DenizUgur Wow, it is good news for us. Thank for the heads-up.

karasusan avatar Sep 23 '22 05:09 karasusan

No problem 👍

@karasusan Oh and is there an ETA on when you guys will update the libwebrtc? If it's soon then I won't do it myself.

DenizUgur avatar Sep 23 '22 05:09 DenizUgur

@DenizUgur We don't have the plan for the update about NvCodec in this year. We are focusing on improving the stability for a while.

karasusan avatar Sep 26 '22 00:09 karasusan

Hi @karasusan, I was talking about updating libwebrtc for AV1 compatibility.

@DenizUgur changeset is here. But we need to fix the code because some APIs in libwebrtc are changed. https://source.chromium.org/chromium/_/webrtc/src.git/+/6b19d8273bb718833b562def87f92b9f0becb39e

DenizUgur avatar Sep 26 '22 01:09 DenizUgur

@DenizUgur We are going to start updating libwebrtc on next Jan or Feb.

karasusan avatar Sep 26 '22 02:09 karasusan

I see, thank you.

DenizUgur avatar Sep 26 '22 03:09 DenizUgur

Fixed. https://github.com/Unity-Technologies/com.unity.webrtc/pull/843

karasusan avatar Dec 06 '22 05:12 karasusan

@DenizUgur We released the new version of the package last week. This issue is fixed. Please try it and let me know if you have other issues. Thank you.

karasusan avatar Dec 12 '22 01:12 karasusan