How to increase Frame Rate and Resolution in Tutorial

I’ve been following the Tutorial that uses the Third Person template here -

https://docs.unity3d.com/Packages/com.unity.renderstreaming@3.1/manual/tutorial.html

I’ve got it working but am wondering if there is a way to increase the framerate and resolution? I don’t see the option to change it anywhere.

You need to check the VideoStreamSender component on the inspector window.
https://docs.unity3d.com/Packages/com.unity.renderstreaming@3.1/manual/video-streaming.html

Thanks for the reply, when I follow the tutorial using the Third Person sample, I don’t see a VideoStreamSender component on any of the game objects. Do I need to add it to one of the game objects? I completed the next tutorial, which adds components to an empty project and I do see the VideoStreamSender component there, but was hoping to have it working on the third person sample.

I’m a little confused how the third person sample just works out of the box without adding any components? I think maybe it has to do with the Automatic Streaming flag?

I followed these steps - Developing a streaming application | Unity Render Streaming | 3.1.0-exp.7 to create a streaming application.

However, instead of using an empty project, I used the third person project. I’m able to see the video in the browser, but I can’t control with the mouse in the browser. I can control the character from the Unity Editor window and it is shown in the browser.

Also, I tried increasing resolution to 1920x1200, Framerate to 60 and Bitrate to 10000 (can’t seem to increase past 10,000) in the Video Stream Sender, but in the browser the framerate is well below 60 (under 20). Would you expect me to see a higher frame rate? Is it possibly a limitation of the machine I’m running Unity on? Or a limitation of the browser or the protocol? Or something else?

Thanks

First, you need to check the settings of Input System in Project settings window. The wizard window is helpful to resolve project setting issues.
https://docs.unity3d.com/Packages/com.unity.renderstreaming@3.1/manual/wizard.html

Second, the framerate is controled by the webrtc, if it is possible to keep the framerate with low resolution like 1280x720, this issue might be by the bitrate on your network environment.

I’m able to keep a high framerate (55 average) when I use 1280x720, but when I bump the resolution up to 1920x1080 it is usually under 20 FPS. I notice in the Video Stream Sender component, that I can’t increase the Bitrate over 10,000 kbps. Is this expected behavior? Maybe I need a higher bitrate?

I thinks 10Mbps is enough for FHD 60fps in realtime.
For example: https://riverside.fm/blog/video-bitrate

Are there any changes if you choose other codecs?

Hmm, I took a look at the article and see what you mean. Seems like 6000 should be enough, unless I’m misunderstanding.

I tested the other codecs and it seems like VP9 provides a little better framerate but not great. See video below- the recording software I used made the framerate a little lower than normal, but still without recording software it is around 20 FPS.

Unity Render Streaming Test -

As another test, I tried Unreal Pixel Streaming and I notice the bitrate is much higher (around 80,000). The Framerate is higher around 55. See video -

80,000bps? it’s so high. I thinks you can change the maxBitrate by script. Can you try that?

And how about H.264 codec? it should be better performance than VP8.

I was able to increase the bitrate via the script, but not sure how to change to H.264 codec?

You can change the video codec on the “Video Stream Sender” component.
https://docs.unity3d.com/Packages/com.unity.renderstreaming@3.1/manual/video-streaming.html

I don’t see H.264 as an option in the dropdown.
9412379--1318271--upload_2023-10-16_11-29-47.png

Please check the “Hardware acceleration codecs” in this documentation.
I predict your PC doesn’t support H264 hardware acceleration.
https://docs.unity3d.com/Packages/com.unity.webrtc@3.0/manual/videostreaming.html

Thanks, yes I think you’re right… I’m using a laptop with 2 GPUs, one integrated and another dedicated. It seems like it is not using the dedicated GPU. This is probably the root of my problem.

Update - I switched to a desktop with a dedicated GPU and I get 60FPS in the browser. However, I still don’t see an option for H.264 in the dropdown.

What GPU are you using? Is the graphic driver is latest?

The laptop has an integrated GPU (Intel Iris Xe) and a dedicated (Nvidia T500). The desktop has a
AMD Radeon RX 6700 XT.

I see that Nvidia T500 does not support NVENC hardware encoding. Intel Iris Xe has QVS hardware encoding. Would that work?