nginx rtmp 配置

在nginx.conf的最后加入
rtmp {
    server {
        listen 1935;
        application **rtmplive** {
            live on;
            max_connections 1024;
        }
        application zbcs {
            live on;
            record off;
        }
        application hls{
            live on;
            hls on;
            hls_path /usr/local/var/www/hls;
            hls_fragment 1s;
        }
    }
}


ffmpeg 推流命令ffmpeg -re -i E:\一仆二主_02.ts -vcodec copy -b:v 2000k -b:a 128k -acodec aac -f flv rtmp://192.168.1.191:1935/rtmplive/lvyunxiang

注意 推流路径必须以/rtmplive/开始

posted @ 2020-07-15 09:56  虾兵  阅读(3214)  评论(0编辑  收藏  举报