本人的PC配置:

Windows10专业版 64位

Intel(R) Core(TM)i5-7400 CPU @3.00GHz 3.00 GHz

内存: 8GB

1. 下载 Nginx

进入Nginx下载页面( http://nginx-win.ecsds.eu/download/ ),选择合适的版本下载。这里以 nginx 1.7.11.3 Gryphon 为例。下载完成后解压, 将解压后的目录重命名为“ nginx-1.7.11.3-Gryphon ”,并放到合适的路径下。

2. 下载服务器状态检查程序 stat.xsl

将nginx-rtmp-module-master.zip解压后复制到目录:nginx-1.7.11.3-Gryphon下,

保证stat.xls的目录为:

nginx-1.7.11.3-Gryphon\nginx-rtmp-module\stat.xsl

3. 创建配置文件 conf\nginx-win-rtmp.conf

在目录 nginx-1.7.11.3-Gryphon\conf下创建 nginx-win-rtmp.conf配置文件,内容如下:

#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;

# record first 1K of stream

record all;

record_path /tmp/av;

record_max_size 1K;

# append current timestamp to each flv

record_unique on;

# publish only from localhost

allow publish 127.0.0.1;

deny publish all;

#allow play all;

}

}

}

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=5;

# server 127.0.0.1:9005 weight=1 fail_timeout=5;

# server 127.0.0.1:9006 weight=1 fail_timeout=5;

# server 127.0.0.1:9007 weight=1 fail_timeout=5;

# server 127.0.0.1:9008 weight=1 fail_timeout=5;

# server 127.0.0.1:9009 weight=1 fail_timeout=5;

# server 127.0.0.1:9010 weight=1 fail_timeout=5;

# least_conn;

# }

sendfile off;

#tcp_nopush on;

server_names_hash_bucket_size 128;

## Start: Timeouts ##

client_body_timeout 10;

client_header_timeout 10;

keepalive_timeout 30;

send_timeout 10;

keepalive_requests 10;

## End: Timeouts ##

#gzip on;

server {

listen 80;

server_name localhost;

location /stat {

rtmp_stat all;

rtmp_stat_stylesheet stat.xsl;

}

location /stat.xsl {

root nginx-rtmp-module/;

}

location /control {

rtmp_control all;

}

#charset koi8-r;

#access_log logs/host.access.log main;

## Caching Static Files, put before first location

#location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {

# expires 14d;

# add_header Vary Accept-Encoding;

#}

# For Naxsi remove the single # line for learn mode, or the ## lines for full WAF mode

location / {

#include /nginx/conf/mysite.rules; # see also http block naxsi include line

##SecRulesEnabled;

##DeniedUrl "/RequestDenied";

##CheckRule "$SQL >= 8" BLOCK;

##CheckRule "$RFI >= 8" BLOCK;

##CheckRule "$TRAVERSAL >= 4" BLOCK;

##CheckRule "$XSS >= 8" BLOCK;

root html;

index index.html index.htm;

}

# For Naxsi remove the ## lines for full WAF mode, redirect location block used by naxsi

##location /RequestDenied {

## return 412;

##}

## Lua examples !

# location /robots.txt {

# rewrite_by_lua '

# if ngx.var.http_host ~= "localhost" then

# return ngx.exec("/robots_disallow.txt");

# end

# ';

# }

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html

#

error_page 500 502 503 504 /50x.html;

location = /50x.html {

root html;

}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80

#

#location ~ \.php$ {

# proxy_pass http://127.0.0.1;

#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000

#

#location ~ \.php$ {

# root html;

# fastcgi_pass 127.0.0.1:9000; # single backend process

# fastcgi_pass myLoadBalancer; # or multiple, see example above

# fastcgi_index index.php;

# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

# include fastcgi_params;

#}

# deny access to .htaccess files, if Apache's document root

# concurs with nginx's one

#

#location ~ /\.ht {

# deny all;

#}

}

# another virtual host using mix of IP-, name-, and port-based configuration

#

#server {

# listen 8000;

# listen somename:8080;

# server_name somename alias another.alias;

# location / {

# root html;

# index index.html index.htm;

# }

#}

# HTTPS server

#

#server {

# listen 443 ssl spdy;

# server_name localhost;

# ssl on;

# ssl_certificate cert.pem;

# ssl_certificate_key cert.key;

# ssl_session_timeout 5m;

# ssl_prefer_server_ciphers On;

# ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

# ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:ECDH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!eNULL:!MD5:!DSS:!EXP:!ADH:!LOW:!MEDIUM;

# location / {

# root html;

# index index.html index.htm;

# }

#}

}

4. 启动Nginx服务器

使用快捷键 【Win + R 】打开运行窗口,输入【cmd】后回车,进入windows的cmd

cd nginx-1.7.11.3-Gryphon

nginx.exe -c conf\nginx-win-rtmp.conf

5. 使用ffmpeg进行推流

使用快捷键 【Win + R 】打开运行窗口,输入【cmd】后回车,进入windows的cmd

ffmpeg -re -i aa.mp4 -vcodec libx264 -acodec aac -f flv rtmp://localhost:1935/live/home

6. 拉流验证

6.1 使用ffplay进行拉流

使用快捷键 【Win + R 】打开运行窗口,输入【cmd】后回车,进入windows的cmd

ffplay -fs rtmp://localhost:1935/live/home

6.2 使用VLC进行拉流

打开VLC,选择【媒体】 -> 【打开网络串流】,输入 rtmp://localhost:1935/live/home ,点击【播放】就可以看到流了。

win10 nginx文件服务器,Windows10下 FFmpeg + Nginx 的 rtmp 服务器搭建相关推荐

  1. windows10下配置nginx服务开机自启动

    windows10下配置nginx服务开机自启动 网站有很多教程,这里赘述一下,补充一点细节 1.下载"Windows Service Wrapper"工具 下载地址:https: ...

  2. RK3588实战:调用npu加速,yolov5识别图像、ffmpeg发送到rtmp服务器

    前言:最近在学习一些rk3588相关的东西,趁着这个项目,把学习的相关东西整合下,放到一个项目里面,巩固学习的知识. 项目名称:yolov5识别图像.ffmpeg发送到rtmp服务器 功能:1.ope ...

  3. windows10下使用nginx -s reload重启nginx失败

    nginx: [error] CreateFile() "G:\nginx\nginx-1.12.2/logs/nginx.pid" failed (2: The system c ...

  4. nginx文件服务器html美化,关于nginx:Nginx浏览目录配置及美化

    在我的项目中有一个性能须要在浏览器页面中浏览服务器的目录.服务器应用Nginx,而Nginx提供了相应的ngx_http_autoindex_module 模块,该模块提供了咱们想要的性能. Ngin ...

  5. ubuntu nginx php-fpm mysql_Ubuntu下安装Nginx,PHP5(及PHP-FPM),MySQL

    环境:Ubuntu 12.0.4 LTS nginx(发音"engine x")是一个自由,开放源码,高性能的HTTP server.Nginx以稳定性,丰富的功能集,简单的配置, ...

  6. linux裸机安装nginx,linux环境下安装nginx步骤 - 进击的乌龟 - 博客园

    开始前,请确认gcc g++开发类库是否装好,默认已经安装. ububtu平台编译环境可以使用以下指令 apt- get install build- essential apt - get inst ...

  7. 10停止nginx命令 win_Linux下配置Nginx并使用https协议

    环境 Centos7.6nginx-1.17.0 下载 官网:http://nginx.org/download/nginx-1.17.0.tar.gz 环境确认 在安装nginx前首先要确认系统中是 ...

  8. linux搭建rtmp服务器搭建,linux下利用Nginx搭建RTMP服务器

    RTMP 实时消息传递协议(RTMP)由Macromedia开发,作为为其Flash技术传输数据,音频和视频的方法.Macromedia随后被Adobe收购,因为该规范已部分发布,使第三方能够在Ado ...

  9. nginx在linux下安装,Nginx在linux下安装及简单命令

    安装环境:Centos7 创建目录及切换至目录 # mkdir /usr/local/nginx # cd /usr/local/nginx/ wget http://nginx.org/downlo ...

  10. ubuntu 编译安装nginx php mysql_ubuntu下安装nginx php mysql

    以下操作是在root下进行(为了方便自己使用) 1.安装nginx a)下载nginx.pcre.openssl.zlib库后,直接解压到/usr/local目录下. b)进入zlib目录后,执行ch ...

最新文章

  1. HttpURLConnection IllegalStateException
  2. hql 语法与详细解释转
  3. 使用简单的轻量级移动web应用开发框架 - Sidetap
  4. 【bzoj1034】[ZJOI2008]泡泡堂BNB 贪心
  5. Dubbo源码分析(三)Dubbo中的SPI和自适应扩展机制
  6. 信息系统项目管理知识--信息系统建设
  7. Ansible roles角色详解
  8. java 反射 设置属性_Java通过反射机制动态设置对象属性值的方法
  9. React Fiber 了解一下
  10. 子矩阵最大累加和(详解)
  11. 计算机网络中的基本器件(网卡,集线器,交换机,路由器)
  12. 一分钟为网站添加统计功能
  13. 大学英语综合教程二 Unit 3 课文内容英译中 中英翻译
  14. aliyun短信及短信模板操作
  15. (附源码)ssm失物招领系统 毕业设计182317
  16. android 监听耳机插拔
  17. Direct Shot Correspondence Matching
  18. Amazon推新送货无人机Prime Air
  19. 计算机与数学文化论文参考文献,数学文化论文,关于让“数学文化”的渗透于不知不觉相关参考文献资料-免费论文范文...
  20. CSDN如何收藏文章

热门文章

  1. Atitit 通信技术概要 艾提拉著 目录 1. 通信系统原理(孔英会编著的图书)_百度百科.html 2 1.1. 第1章绪论1 2 1.2. 第2章信号分析基础25 2 1.3. 第3章信道5
  2. Atitit mybatis 简化开发与提升开发效率法 目录 1.1. 使用注解模式代替xml模式 1 1.2. 使用通用mapper代替专用mapper 1 1.3. 使用js等脚本语言来输出sq
  3. Atitit 知识的来源于生产方式大总结与机器学习分类 目录 1.1. 知识来源四个渠道 dna,经验,文化交流聚会,pc互联网等 1 1.2. 未来世界上大多数知识都将被机器提取,且将留存在机器
  4. Atitit 提升开发效率使用内嵌Tomcat 内嵌webserver 于单元测试
  5. Atitit 学习方法 补充 艾龙 著 attilax著 1. Atitit 学习的方法 attilax总结 1 1.1. 2. 基于学习策略的分类 2 2 1.2. 3. 基于所获取知识的表示形
  6. Atiitt 降低财政赤字风险性实施方案
  7. Atitit Seed-Filling种子填充算法attilax总结
  8. paip.技术重要还是管理重要还是创意重要
  9. 一位区域销售经理百条经验手记
  10. 强强联手,AliOS和ACRN为物联网领域带来全新解决方案