MotionJPEG possible?

(Benjamin Keffer) #1


I would like access camera pictures from a server. Is it possible to keep a connection open and send binaries over a stream? Sending every picture seperately would be too slow.


Benajmin Keffer

(antonk) #2


It is possible to keep the client - server connection channel open. However binary data will be anyway sent in portions.

Let’s look at the situation from the different angle.
Why do you think that “sending every picture seperately would be too slow”? Are you worried about server connection establising time or about slow network connection speed (which will be limiting factor anyway)? Or you just need to avoid storing the image completely on the client side prior to sending it to the server and just neeed a stream-like interface to send the data directly from the source to the server?


(Benjamin Keffer) #3

I’m worried about server connection establishing time. My goal is to get about 5 frames per second. That would mean that each second the client have to connect and make a new request up to 5 times. I guess this takes a lot of time. What do you think?

(antonk) #4

It can take some time if you want to protect the data stream with SSL/TLS where SSL handshake takes its time to complete, but in general 5 connections per second is not much. Also the KeepAlive option will help you to maintain established server-client connection even for the simple Http channel, so there is no need to worry about the connection time at all.

(Benjamin Keffer) #5

Hm, I think in the future I will increase the FPS up to 30, so I would prefer a solution with a not closing channel.
But thanks anyway for the very kind offer!

Could you show me a part of implementing such request with open channel?

(antonk) #6

Whip platform do you plan to use for client and server app (ie .NET, iOS, Delphi etc)?

F.e on Desktop .NET all you need to do to keep the HTTP chennel open is to set the channel’s KeepAlive property to true

(Benjamin Keffer) #7

For the server I use Delphi and the client is iOS

(antonk) #8

Just try to create a proof of concept app. The time used to establish a server connection shouldn’t be an issue in any case.