Welcome! Log In Create A New Profile

Advanced

streaming MJPEG via CGI or module on nginx

Posted by janesconference 
streaming MJPEG via CGI or module on nginx
February 07, 2012 04:36AM
I have some c code that takes mjpeg frames from a shared memory segment and writes them to STDOUT, inserting the correct HTTP header at the start of the first frame and the correct HTTP boundary between one frame and another. Those frames are continuously generated live (in real-time). the program compiles well and does what it should be done.

What I would like to do is use this little program as a CGI process: my web server should execute the program every time a certain HTTP request is called, then write its standard output to the client socket. All of this should be done without buffering (ie. the web server should not try to buffer the cgi answer, as it could be potentially endless - remember the frames are streamed live).

I have the choice of using nginix web server. It is already compiled for my ARM target platform.

Is there a known way to configure nginx to do what I need? Otherwise, is there a way to do that in a module?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 106
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready