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 在你所修改的播放器上是否可以看到文件的直播了。
總結
以上是生活随笔為你收集整理的rtmp推流直播流程的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 基于ffmpeg的流媒体服务器
- 下一篇: spring ioc加载流程