nginx开发(三)搭建rtmp点播系统

来源:互联网 发布:网贷大数据征信查询 编辑:程序博客网 时间:2024/06/05 17:30

1:下载并编译nginx-rtmp-module模块,

代码地址:https://github.com/arut/nginx-rtmp-module.git

编译:

进入ngnix源码根目录

./configuer.sh  --add-module=<path-to-nginx-rtmp-module>

make

make install


2:/在 /usr/local/nginx/html/ 目录下创建了multimedia/rtmp

3:拷贝文件1.flv到目录下

4:打开usr/local/nginx/conf/nginx.conf,修改如下

rtmp {
#rtmp点播配置
    server {
        listen 1935;
        chunk_size 4000;
        application  
vod {
                play /usr/local/nginx/html/multimedia/rtmp;  #点播媒体文件存放目录
        }
   }

5:重启nginx。nginx -s reload

6:播放链接:rtmp://yourserverIP:1935/vod/1.flv 

注意:此处的vod为application对应的名字,非文件路径。


7:完成

0 0