Real time video streaming

I am developing a game where I want to stream the camera’s output from a server (which renders everything) to several clients. For simplicity, I am ignoring all audio data.

Currently, like shown in the image below, I record the camera to a RenderTexture with 400x300 resolution, and then I encode it to JPEG, add a time stamp and send it to the client over UDP.
3298447--255708--JPGsolution.png

With given resolution, my payload size varies from 13KB to 20KB so I am planning to stream over ffmpeg. However, it is not clear to me how I should tackle the problem. Are there any tutorials or other learning resources on that matter?

As my goal is to achieve something like Gforce Now does, what strategies are available for me to use?
Below shows what more or less I want to do:
3298447--255709--ffmpegSolution.png

I am looking for the same solution, so hope someone knows...

Hi, I am looking for the same solution too. Have you a good result ? Thx

No. not yet.

I'm still researching a solution. My current plan is to learn libavcodec(used in ffmpeg) and develop a .dll out of it but I'm getting into stuff way advanced for me.

Progress has been quite slow :smile:

Can anyone could share ideas on how to tackle the problem or have more information on real time streaming?

Your UDP idea is very close to answer but I don't think it will work correctly for multiple clients. I was also looking for similar stuff but can't find any good example at that time.
Thus, I created my own solution for my projects which are used in many public events and exhibitions. Recently, I organised all my core scripts into one single package.

Local Live Streaming for multiple clients is one of our plugin features, please check it out.
It also supports auto network discovery in local network.
FM Exhibition Tool Pack
https://assetstore.unity.com/packages/templates/packs/fm-exhibition-tool-pack-beta-143080


As RPC and Unet system will be depreciated in future, we also added custom Network Action feature in next update v1.02

PS: All Source Code written in C#, free to modify for specific case.

if you need some hints, TCP will be stable & better.