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

[REQUEST]: Video codec for Meta Quest 2

Open karasusan opened this issue 3 years ago • 11 comments

Detail of the issue bellow. https://github.com/Unity-Technologies/UnityRenderStreaming/issues/716

karasusan avatar Nov 01 '22 02:11 karasusan

Just commenting to say this is an important issue for me.

shofixti244 avatar Nov 03 '22 16:11 shofixti244

Yes this is a most important issue for many developer. Eagerly waiting for this get fix.

dhruvaura avatar Nov 28 '22 13:11 dhruvaura

Waiting for this solution. This can solve performance issue of Meta Quest when we building some streaming solutions. Request to implement codec asap.

half-oval avatar Dec 15 '22 12:12 half-oval

memo: WRS-378

karasusan avatar Jan 24 '23 02:01 karasusan

Related issue #876.

karasusan avatar Jan 26 '23 09:01 karasusan

Hi @karasusan! I'm quite interested in this fix as well, and I am interested in contributing to fix this. Do you have any pointers regarding where to look or what to implement in order to mitigate this issue?

BR, Kar-re

kar-re avatar Oct 24 '23 05:10 kar-re

@kar-re The problem is that the codecs implemented by MediaCodec cannot be referenced on Meta Quest 2. Android codec factory class is implemented by AndroidCodecFactoryHelper.

This class calls the MediaCodec API via a Java class. First, it is necessary to investigate whether the information expected by this API can be obtained.

karasusan avatar Oct 24 '23 09:10 karasusan

I see, thank you for the info @karasusan! I'll give it a go and submit a PR if I manage to get it working.

kar-re avatar Oct 24 '23 11:10 kar-re

Hi everyone! Just wanted to share some findings. Unfortunately I haven't been able to solve the issue in its entirety, but I managed to build a version of the application I'm developing without the stuttering I experienced previously. I thought about writing a custom VideoEncoder for webrtc based on this repo, but too much work for initial experimentation.

The steps taken by me were:

  1. Build the native android plugin on my own
  2. Change from Vulkan to OpenGLES3 (It crashed with vulkan)

I've tried to experiment with different codecs and it seems to affect the streamed performance. For my use case it's not really dependent on the recieved fps, but it might be worth knowing. Here is my built .aar if anyone wants to experiment.

This also makes me think it has to do with vulkan compatability somehow.

kar-re avatar Oct 25 '23 08:10 kar-re