Answer the question
In order to leave comments, you need to log in
Nginx to distribute mjpeg stream?
There is a mjpeg stream from ZoneMinder (http). He is always alone (one camera), only there are many clients for him. It turns out that Zoneminder creates a separate cgi-process for each connected client, decently loading the processor.
Is it possible to distribute one thread to all clients on nginx? Or let's say - can he distribute "Content-Type: multipart/x-mixed-replace;boundary=..." without duplicating the source?
It can simply proxy the Zoneminder daemon, but it creates a thread for each client in the same way.
Answer the question
In order to leave comments, you need to log in
It definitely doesn’t natively, you need something like erlyvideo or vlc
5 years ago I wrote a server that inflates mjpeg exactly the way you want. I don't think nginx can. it's not all that trivial. Maybe there is a module.
Once I made a video server via vlc
Received rtsp, gave flv directly to the player
cvlc rtsp://192.168.0.103:554 --sout
'#transcode{vcodec=FLV1,vb=256,fps=4,scale=1,acodec=none,samplerate=22050}:http{dst=:8081/stream.flv}'
--rtsp-cahing=2400 --video --no-sout-audio --udp-caching=30000
--http-caching=5000
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question