rtmp推流直播流程

1.搭建RED5 的RTMP流服务器

2.安装好RTMP的流服务器软件,下载这个软件setup-Red5-1.0.1-java6.exe

3.安装oflaDemo,拷贝到D:\Program Files (x86)\Red5\webapps\oflaDemo下面。

 4.修改Red5安装目录下的 webapps\oflaDemo\index.html 文件,将jwplayer的 file 属性改成 “hello”。(red5 - 1.0.1 版本)

     可以利用source insight 工具修改index.html 内容; 查找 jwplayer 字符串, 将
[html] view plain copy
在CODE上查看代码片派生到我的代码片

    jwplayer('mediaspace2').setup({  
        'flashplayer': 'player.swf',  
        'file': 'hello',  
        'streamer': 'rtmpt://localhost:5080/oflaDemo',  
        'controlbar': 'bottom',  
        'width': '848',  
        'height': '360'  

中的 file :‘ *flv’,修改为 ‘file’:‘hello’; 上图是修改后的 内容;

 还有另一处也可修改: 内容同上面一样;
[html] view plain copy
在CODE上查看代码片派生到我的代码片

    jwplayer('mediaspace').setup({  
       'flashplayer': 'player.swf',  
       'file': 'hello',  
       'streamer': 'rtmp://localhost/oflaDemo',  
       'controlbar': 'bottom',  
       'width': '848',  
       'height': '360'  
     });  



5.调用ffmpeg的客户端推流命令:E:\lipy_computers\g\ffmpeg\ffmpeg-3.1.2>E:\lipy_computers\g\ffmpeg\ffmpeg-3.1.2\
ffmpeg.exe -re -i "D:\lipy_computers\d\video\高安 在心里从此永远有个你.flv" -c c
opy -f flv rtmp://localhost/oflaDemo/hello


6.访问 http://localhost:5080/oflaDemo/index.html 在你所修改的播放器上是否可以看到文件的直播了。

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值