admin管理员组文章数量:1568309
概述
Nginx是一款轻量级的Web 服务器/反向代理服务器及电子邮件(IMAP/POP3)代理服务器。
nginx-rmtp-module是Nginx服务器的流媒体插件。
nginx通过rtmp模块提供rtmp服务, ffmpeg推送一个rtmp流到nginx, 然后客户端通过访问nginx来收看实时视频流。
先介绍一下windows下搭建nginx + rtmp
有两种方案:
(一)
1.下载nginx :http://nginx/
2.下载nginx-rmtp-module:https://github/arut/nginx-rtmp-module
3.配置nginx.conf
#nginx.conf
rtmp {
server {
listen 1935;
chunk_size 4000;
# TV mode: one publisher, many subscribers
application wstv{
# enable live streaming
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;
}
4.编译
./configure --add-module=/path/to/nginx-rtmp-module
make
make install
注意nginx版本在nginx (1.3.14 - 1.5.0)的configure 命令如下:
./configure –add-module=/path/to/nginx-rtmp-module –with-http_ssl_module
5.开启服务器&
版权声明:本文标题:ffmpeg实战教程(九)windows下ffmpeg命令+nginx + rtmp实现推流,拉流。 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dongtai/1725320621a1019288.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论