Answer the question
In order to leave comments, you need to log in
VLC + Nginx
I want to use Nginx as a server for distributing a stream from vlc.
I send a video stream from the local machine to the broadcast server through the ssh tunnel.
Nginx config is like this:
server {
listen 8083;
location = /stream.flv {
proxy_pass http://localhost:8082/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
ab -n 100 -c 100 -g test_data_1.txt -t 60 http://streaming-server:8083/stream.flv
Received remote port 8082 open request from 127.0.0.1:54887
Attempting to forward remote port to 127.0.0.1:8082
Forwarded port opened successfully
cvlc http://localhost:8082/ --sout '#http{mux=flv,dst=:8083/}'
Answer the question
In order to leave comments, you need to log in
The question is not entirely clear - what should nginx do when accessing the proxied address?
If we are talking about keepalive, then you can try adding proxy_connect_timeout 600;
Another small hint about the tunnel. Unfortunately, plink does not have this option , but ssh has the ability to select the stream encryption algorithm. The fastest is with arcfour.
ssh can be found in Cygwin
Yes, proxy_connect_timeout has nothing to do with it.
I'll still clarify the picture:
1. There is a "secret" server with VLC that distributes the video stream. Apparently, this is a stream from a surveillance camera.
2. There is an nginx server, which can be visited by several people at the same time and everyone needs to distribute the current video stream from the camera.
3. At the same time, I want nginx not to contact VLC for each new visitor, but to “multiply” for all viewers what it receives from the video server.
If the situation is as I described, then you must either try to do something with nginx caching (I really have little idea how nginx will cache the video stream), or look towards this module . Here is the linkto the installation instructions.
And Adobe also has an interesting free product Flash Media Live Encoder , but that's a different story.
In my face a typical XY-problem. I will assume that the initial task is to relay the video stream, I will also assume that the end user is a client with a flash player (or html5). If my two assumptions are correct, then you need flussonic (erlyvideo.ru).
VLC can transfer video from the camera via RTMP
$ vlc v4l2:// --v4l2-fps=25 --sout '#transcode{vcodec=h264,vb=300,fps=25,scale=1,acodec=mp4a,ab=64,channels=2}:std{access=rtmp,mux=ffmpeg{mux=flv},dst=rtmp://rtmp.server.com:1935/path/to/stream}'
Found here
Here, it seems that this configuration solves this problem. There, of course, without a glass, you can’t figure it out ...
By the way, if we are talking about browsers, then this player can play rtmp streams (information at the very bottom of the page). I have known him for a long time, but I did not immediately remember him ...
maybe I don't understand, but maybe this echo increases 1 to 2?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question