ESTE HILO ES PARA CONFIGURAR EL SERVIDOR RTMP CON NGINX EN DEBIAN O UBUNTU El Protocolo de mensajería en tiempo real (RTMP) fue desarrollado por Macromedia como un método para transferir datos, audio y video para su tecnología Flash. Este hilo es para configurar el servidor RTMP usando NGINX en Debian o Ubuntu. Código: apt-get install nginx-full nginx -v http://nginx.org/download/ http://ftp.debian.org/debian/pool/main/n/nginx/nginx-full_1.14.2-2+deb10u1_amd64.deb http://ftp.debian.org/debian/pool/main/n/nginx/libnginx-mod-rtmp_1.14.2-2+deb10u1_amd64.deb Configure nginx.conf: Código: rtmp_auto_push on; rtmp { server { listen 1935; application mytv { live on; } } } Configurando un Servidor HLS con NGINX Código: user www-data; worker_processes auto; pid /run/nginx.pid; include /etc/nginx/modules-enabled/*.conf; events { worker_connections 768; # multi_accept on; } #### ENVIO DE HLS EN EL PUERTO 8080 - CARPETA /MNT/HLS / http://://190.216.126.30:8080/hls/480p_test1.m3u8 http { sendfile off; tcp_nopush on; #aio on; directio 512; default_type application/octet-stream; server { listen 8080; location / { # Disable cache add_header 'Cache-Control' 'no-cache'; # CORS setup add_header 'Access-Control-Allow-Origin' '*' always; add_header 'Access-Control-Expose-Headers' 'Content-Length'; # allow CORS preflight requests if ($request_method = 'OPTIONS') { add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Max-Age' 1728000; add_header 'Content-Type' 'text/plain charset=UTF-8'; add_header 'Content-Length' 0; return 204; } types { application/dash+xml mpd; application/vnd.apple.mpegurl m3u8; video/mp2t ts; } root /mnt/; } } } ##### INGRESO EN EL PUERTO 1935 CON SALIDA PUERTO 1936 / LIVE ######### rtmp { server { listen 1935; # Listen on standard RTMP port chunk_size 4000; application cable1 { live on; meta copy; ### SOLO ACEPTA STREAM PUSH DE ESTOS IPS ##########3 allow publish 192.168.46.253; deny publish all; exec ffmpeg -i rtmp://localhost:1935/cable1/$name -c copy -f flv rtmp://localhost:1936/live/480p_$name; exec ffmpeg -i rtmp://localhost:1935/cable1/$name -c copy -f mpegts udp://239.1.1.1:1234?pkt_size=1316; } } } ###### RECIVE EN EL PUERTO 1936 EL LIVE Y TRANSFORMA A HLS############### rtmp { server { listen 1936; # Listen on standard RTMP port chunk_size 4000; application live { live on; meta copy; # Turn on HLS hls on; hls_path /mnt/hls/; hls_fragment 3; hls_playlist_length 60; # disable consuming the stream from nginx as rtmp #deny play all; } } } Fuente: https://github.com/arut/nginx-rtmp-module