- Home /
Camera Stream - Send unity camera video or frames
Currently I'm working on trying to output 30fps video from two unity cameras into another system. For debugging I'm trying to save the videos to the local disk. Instead of saving the video to the local disk I will be sending the unity cameras video to an encoder and then the encoder will convert and send the video to the correct broadcasting system. My question is, is it better if I send the video repeatedly with x seconds recorded in a loop and let the encoder handle the frames or is it better to send frame by frame? I will like to learn and if any of you can explain or know of any good sources that explains how video is broadcasted on most of the systems will be a big help. From I have learned is that in performance capturing frame by frame is much more expensive that recording video.
If you can work in a stream directly you can literally pass a stream of data to something like a web socket or if it's on the same device directly through CLI or https://docs.microsoft.com/en-us/dotnet/standard/io/memory-mapped-files
"capturing frame by frame is much more expensive that recording video" These are the exact same thing. To capture raw video you need frames. There's compression techniques that will batch areas out to save bandwith that don't update pixels.
Sorry for the delayed reply. When you say passing a stream of data you mean video or frame by frame? If we need to send video is it partial video with certain amount of frames? This is one of the things that gets me confused about streaming. I want to know how most cameras do it to stream video where you can see the camera view on your phone. I don't need to record video for a playback on my project is only for streaming. Later I will need to also send sound. On one example I have seen that video is sent from a camera to a raspberry pi in my case instead of a raspberry pi I will be using a decoder system and server. This is the example diagram I was talking about:
Your answer
Follow this Question
Related Questions
android display h264 byte[] stream 0 Answers
How to play a video (.mp4) in a game build for html5 0 Answers
Integrating a C++ object detection library into Hololens 2 Answers
How to make camera position relative to a specific target. 1 Answer
Record video using phone's (mobile device's) camera 1 Answer