Change the resolution of stream interactively in Klak Syphon on Unity

226 views Asked by At

I'm very new to Unity and C#. I'm creating an application which can stream the camera output in Unity desktop to a web browser with RebRTC. I'm using this solution:

Unity camera → Syphon → CamTwist → broadcast client → smart phone.

First, I've sent a window size from smart phone to Unity (done). Then, I have to stream a video with the resolution that matches the smart phone one from Unity to Syphon.

My question is that How can I adjust a resolution of Syphon from Unity? Is there another good system? I know I have to think the way to change a resolution in CamTwist, so I'm looking forward to another system .

1

There are 1 answers

0
Kiyu On

I found a solution in Klack Syphon test project. Setting camera size in Klack Syphon is a little bit tricky than other version such as Funnel or Syphon for Unity.

If you want to set the camera size for Klack Syphon,

  1. Create Render Texture and set size
  2. Add Camera Object
  3. Set Render Texture at Target Texture field in Camera Object
  4. Add Empty, attach Syphon Server(script) component and set Render Texture at Source texture field