大疆无人机rtmp推流直播到电脑(Windows版本已成功)
一、所需资源
1、nginx的Gryphon版本,它内部已经集成了rtmp的推流编译(nginx-Gryphon)
2、服务器状态检查程序stat.xsl(nginx-rtmp-module)
3、ffmpeg(ffmpeg)
4、VLC(VLC)
二、安装
1、将下载好的nginx 1.7.11.3 Gryphon解压修改文件名为nginx-1.7.11.3-Gryphon,绝对路径中不能有中文,必须全为英文!
2、在根目录中的conf文件夹中,若有nginx.conf文件,直接进入修改;若无,则创建一个。
3、在nginx文件中,将以下内容粘贴。
#user nobody;
# multiple workers works !
worker_processes 2;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 8192;
# max value 32768, nginx recycling connections+registry optimization =
# this.value * 20 = max concurrent connections currently tested with one worker
# C1000K should be possible depending there is enough ram/cpu power
# multi_accept on;
}
rtmp {
server {
listen 1935;
chunk_size 4000;
application live {
live on;
}
}
}
http {
#include /nginx/conf/naxsi_core.rules;
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr:$remote_port - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
# # loadbalancing PHP
# upstream myLoadBalancer {
# server 127.0.0.1:9001 weight=1 fail_timeout=5;
# server 127.0.0.1:9002 weight=1 fail_timeout=5;
# server 127.0.0.1:9003 weight=1 fail_timeout=5;
# server 127.0.0.1:9004 weight=1 fail_timeout