Search code examples
imageencodingvideo-streaminglivevideo-encoding

Live streaming of images in a LAN


I have a proprietary library that generates JPEG images at 10-20Hz. I'd like to stream the images as a video stream over the network, so that a remote client (VLC for example) will be able to view it.

The clients are all in a LAN and there are no restrictions on the streaming protocol and the video format. The environment is Windows 7/XP and the library DLL exports a C-only API.

Is there a recommended library that allows streaming image frames, injected in real-time? the streaming libraries I know (VLC and Live555) do not allow this AFAIK.


Solution

  • M-JPEG defines streaming over HTTP by sending individual images. This protocol is understood by VLC.

    From Wikipedia:

    M-JPEG over HTTP

    HTTP streaming separates each image into individual HTTP replies on a specified marker. RTP streaming creates packets of a sequence of JPEG images that can be received by clients such as QuickTime or VLC. The server software mentioned above streams the sequence of JPEGs over HTTP. A special mime-type content type multipart/x-mixed-replace;boundary= informs the browser to expect several parts as answer separated by a special boundary. This boundary is defined within the MIME-type. For M-JPEG streams the JPEG data is sent to the client with a correct HTTP-header. The TCP connection is not closed as long as the client wants to receive new frames and the server wants to provide new frames. Two basic implementations of such a server are test-server "cambozola" and webcam server "MJPG-Streamer".

    Client software

    Browsers such as Safari, Google Chrome and Opera stream M-JPEG natively.

    See: http://en.wikipedia.org/wiki/Motion_JPEG#M-JPEG_over_HTTP