pingos
pingos copied to clipboard
exec_pull with http_flv error
10#10: *16 live: already publishing, client: unix:, server: 0.0.0.0:1935, session: 00007F8103473700, stream: default/cctv/test
nginx.conf
events {
use epoll;
multi_accept on;
worker_connections 65535;
multi_listen unix:/tmp/rtmp 1935;
multi_listen unix:/tmp/h8080 8080;
}
rtmp {
out_queue 4096;
out_cork 8;
max_streams 512;
timeout 15s;
drop_idle_publisher 15s;
rtmp_auto_pull on;
rtmp_auto_pull_port unix:/tmp/rtmp;
include /etc/nginx/conf.d/*.rtmp;
}
http {
include /etc/nginx/conf.d/*.conf;
}
conf.d/cctv.rtmp
server {
listen 1935;
application cctv {
live on;
exec_options on;
exec_pull ffmpeg -rtsp_transport tcp -i "HIDDEN_RTSP" -vcodec libx264 -tune zerolatency -vb 400k -pix_fmt yuv420p -acodec libfaac -ab 128k -g 5 -f flv "rtmp://127.0.0.1:1935/cctv/$name" name=test;
}
}
conf.d/8080.conf
server {
listen 8080;
location /live_proxy {
flv_live 1935;
}
}
Visit link: http://127.0.0.1:8080/live_proxy/test?app=cctv
Then using VLC Play or Web to download, the nginx log with error: 10#10: *16 live: already publishing, client: unix:, server: 0.0.0.0:1935, session: 00007F8103473700, stream: default/cctv/test