# nginx-http-flv-module
Media streaming server based on [nginx-rtmp-module](https://github.com/arut/nginx-rtmp-module).
# Features
* HTTP-based FLV streaming (subscribe).
* GOP cache for low latency (experimental, for details, please see [BLSS](https://github.com/gnolizuh/BLSS)).
* 'Transfer-Encoding: chunked' response supported.
* Missing 'listen' directive in rtmp server block will be OK.
# Systems supported
* Linux (recommended)/FreeBSD/MacOS/Windows (limited).
# Prerequisites
* GNU make for activating compiler on Unix-like systems to compile software.
* GCC for compiling on Unix-like systems/MSVC for compiling on Windows.
* GDB for debuging on Unix-like systems.
* FFmpeg for publishing media streams.
* VLC player for playing media streams.
* PCRE for NGINX if regular expressions needed.
* OpenSSL for NGINX if encrypted access needed.
# Build
Download [NGINX](http://nginx.org) and nginx-http-flv-module.
Uncompress them.
cd to NGINX source directory & run this:
./configure --add-module=/path/to/nginx-http-flv-module
make
make install
# Usage
publish: ffmpeg -re -i example.mp4 -vcodec copy -acodec copy -f flv rtmp://example.com[:port]/appname/streamname
The appname is used to match an application block in rtmp block (see below for details).
The streamname can be specified at will.
The default port for RTMP is 1935, if some other ports were used, ':port' must be specified.
subscribe: http://example.com[:port]/dir?[srv=0&app=myapp&]stream=mystream
The dir is used to match location blocks in http block (see below for details).
The default port for HTTP is 80, if some other ports were used, ':port' must be specified.
The default server block matched is the first one in rtmp block, if the requested server block is not the first one, 'srv=index (index start from 0)' must be specified.
The default application block matched is the first one in server block, if the requested application block is not the first one, 'app=xxx' must be specified.
# Example nginx.conf
worker_processes 4;
worker_cpu_affinity 0001 0010 0100 1000;
error_log logs/error.log error;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
keepalive_timeout 65;
server {
listen 80;
location / {
root /var/www;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location /live {
flv_live on;
chunked on;
}
}
}
rtmp_auto_push on;
rtmp_auto_push_reconnect 1s;
rtmp_socket_dir /tmp;
rtmp {
out_queue 4096;
out_cork 8;
max_streams 64;
server {
listen 1935;
application myapp {
live on;
gop_cache on;
}
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
(修复bug模块)nginx-http-flv-module-master 支持flv模块直播
共85个文件
c:36个
h:21个
swf:5个
2星 需积分: 35 40 下载量 88 浏览量
2017-08-29
08:29:12
上传
评论 1
收藏 553KB ZIP 举报
温馨提示
nginx-http-flv-module-master 支持flv模块直播
资源推荐
资源详情
资源评论
收起资源包目录
(修复bug模块)nginx-http-flv-module-master.zip (85个子文件)
nginx-http-flv-module-master
ngx_rtmp_gop_cache_module.h 2KB
ngx_rtmp_stat_module.c 25KB
ngx_rtmp_netcall_module.c 19KB
ngx_rtmp_exec_module.c 41KB
ngx_rtmp_proxy_protocol.c 4KB
ngx_rtmp_record_module.h 3KB
ngx_rtmp_notify_module.c 47KB
ngx_rtmp_netcall_module.h 2KB
ngx_rtmp_control_module.c 18KB
ngx_rtmp_relay_module.h 3KB
AUTHORS 115B
ngx_rtmp_bitop.h 1KB
ngx_rtmp_bandwidth.c 589B
ngx_rtmp_eval.c 6KB
ngx_rtmp_play_module.h 2KB
ngx_rtmp_eval.h 843B
ngx_rtmp_proxy_protocol.h 311B
ngx_rtmp_cmd_module.h 5KB
ngx_rtmp_log_module.c 25KB
ngx_http_flv_live_module.c 50KB
dash
ngx_rtmp_dash_module.c 46KB
ngx_rtmp_mp4.c 23KB
ngx_rtmp_mp4.h 1KB
ngx_rtmp_gop_cache_module.c 26KB
ngx_rtmp_codec_module.h 4KB
ngx_rtmp.h 20KB
ngx_rtmp_streams.h 378B
ngx_rtmp_live_module.h 3KB
ngx_rtmp_send.c 16KB
doc
README.md 80B
ngx_rtmp.c 22KB
ngx_rtmp_handshake.c 17KB
hls
ngx_rtmp_hls_module.h 257B
ngx_rtmp_hls_module.c 70KB
ngx_rtmp_mpegts.c 10KB
ngx_rtmp_mpegts.h 1020B
config 6KB
LICENSE 1KB
ngx_rtmp_bitop.c 1KB
test
rtmp-publisher
player.html 614B
RtmpPublisher.mxml 3KB
publisher.html 505B
RtmpPlayer.mxml 2KB
RtmpPlayerLight.swf 46KB
RtmpPlayerLight.mxml 3KB
RtmpPlayer.swf 46KB
README.md 314B
RtmpPublisher.swf 46KB
swfobject.js 10KB
www
index.html 505B
bg.jpg 15KB
jwplayer
jwplayer.flash.swf 135KB
jwplayer.js 36KB
record.html 1KB
jwplayer_old
player.swf 49KB
swfobject.js 10KB
play.sh 59B
README.md 499B
nginx.conf 1KB
ffstream.sh 84B
dump.sh 49B
ngx_rtmp_handler.c 23KB
ngx_rtmp_limit_module.c 5KB
README.md 3KB
ngx_rtmp_access_module.c 11KB
ngx_rtmp_amf.c 16KB
ngx_rtmp_receive.c 11KB
ngx_rtmp_auto_push_module.h 327B
stat.xsl 11KB
ngx_rtmp_codec_module.c 35KB
ngx_rtmp_init.c 8KB
ngx_rtmp_flv_module.c 19KB
ngx_rtmp_record_module.c 35KB
ngx_rtmp_live_module.c 35KB
ngx_rtmp_amf.h 2KB
ngx_rtmp_shared.c 3KB
ngx_rtmp_auto_push_module.c 19KB
ngx_rtmp_cmd_module.c 22KB
ngx_rtmp_mp4_module.c 69KB
ngx_rtmp_bandwidth.h 584B
ngx_rtmp_core_module.c 23KB
ngx_rtmp_play_module.c 32KB
ngx_rtmp_version.h 239B
ngx_rtmp_relay_module.c 45KB
ngx_http_flv_live_module.h 3KB
共 85 条
- 1
资源评论
- 桓宣2019-09-16源码,需要编译
- yjnjiajia2018-02-08没下载成功,强制我评分...
邵阳新网hn0739
- 粉丝: 1
- 资源: 12
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功