Newsgroups : Borland : borland.public.delphi.internet.winsock : 2005 Aug : TIdHTTP - Live Video Streaming
| Subject: | TIdHTTP - Live Video Streaming |
| Posted by: | "Sigurjón Örn Sigurjónsson" (s..@peocon.com) |
| Date: | Tue, 30 Aug 2005 14:37:06 |
Greetings, all.
I'm using Indy 9 to receive an MJPG stream from an IP camera. (In case
someone doesn't know, an MJPG stream is basically a series of JPEG frames).
Each chunk of data the camera sends contains a JPEG plus some junk in the
beginning that I really don't need and simply disregard. On every OnWork
event, I extract the JPEG and convert it into a TBitmap for further
processing.
Now this was just some background information. The important thing here is
that there is a period of about 60-70ms between the end of one OnWork event
and the beginning of the next. This kind of kills my frame rate. I need 20
frames per second but because of this delay I'm only able to squeeze out
about 13-14 tops.
Here's what I know:
The camera isn't the problem because I know for a fact it's sending 30
frames per second. This problem is also independent of the frame extraction,
JPEG->Bitmap conversion and image processing. Even if I comment all that out
I still get this delay.
One thing I do know that can affect this is the RecvBufferSize property
which represents the number of bytes currently allocated to the default
receive buffer used for the connection. The larger the buffer, the longer
the time between OnWork events. However, the buffer obviously needs to be
large enough to contain the entire JPEG frame.
Are there any other properties of TIdHTTP that I can tweak to speed things
up? Or am I simply pushing the component's performance to its limits?
Thanks.
Sigurjón