Video Streaming Server

Samuel Rivas <>
Wed Aug 16 13:42:54 CEST 2006


lang er wrote:
> Do you mean a C program reads video stream from device and transfer
> data to Erlang server using local socket, then Erlang server streams
> video data to client?
> 
> Our server will connect to many devices(if user watch many different
> cameras installed on many different devices).By this way, C program
> also need to deal with many concurrent problems. It supposed these
> problems should be done in Erlang side, and  there will be little
> benefit to reimplement streaming server in Erlang.

  We have a system that does similar things:

  http://www.lambdastream.com/lambda/products/boxcoder

  For the video sources that can not be properly handled in erlang, it
uses a port process, normally written in C. There is no concurrency in
the C side since each source is handled by a different process.

> Another problem, In surveillance system, QoS( network delay
> especially) is very import, I think your solution may introduce some
> additional network delay.

  Well, a local socket (or using standard input/outuput of the port
process) should not introduce a significant delay. I shall suggest to
write a small prototype to check if it meet your requirements:

  Simply write a C program that reads video from one of your sources and
outputs it to the standard output. Then write an erlang program that
opens this program as port (with the stream option), reads the output
data, and sends it to a socket. You will have the complete trip 
device --> SDK port --> erlang --> network.

> I wonder if this is the standard way Erlang program use external SDK.
> I have read some posts in this list, and got a impression that Erlang
> is used in telecommunication device systems and hardware controller
> programs. Don't they need interact with SDK(dynamic linked library)?

  If the system meets the performance requirements, having all external
code running in separated processes is the safest solution. Otherwise you
may need linked drivers, but they are much more dangerous.

  Regards
-- 
	Samuel



More information about the erlang-questions mailing list