Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- load_module /usr/local/libexec/nginx/ngx_mail_module.so;
- load_module /usr/local/libexec/nginx/ngx_stream_module.so;
- worker_processes 1;
- error_log /var/log/nginx/error.log;
- events {
- worker_connections 1024;
- }
- rtmp {
- exec_static /usr/local/bin/ffmpeg -rtsp_transport tcp -i rtsp://shitty.cam:1028/ONVIF/channel3 -vcodec copy -f flv -r 10 -s 640x480 -an rtmp://my.public.ip/live/cam1;
- server {
- listen 1935;
- application live {
- live on;
- hls on;
- hls_path /tmp/hls;
- hls_fragment 10s;
- hls_playlist_length 20s;
- hls_base_url http://my.public.ip:1953/hls;
- allow play all;
- wait_key on;
- wait_video
- }
- }
- }
- http {
- include mime.types;
- default_type application/octet-stream;
- sendfile on;
- server {
- server_name my.public.ip;
- listen 1953;
- location /hls {
- root /tmp;
- add_header Cache-Control no-cache;
- add_header Access-Control-Allow-Origin *;
- types {
- application/vnd.apple.mpegurl m3u8;
- video/mp2t ts;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement