[red5]安装red5流媒体rtmp环境服务器
1.安装red5服务器,我这里安装的是集成tomcat版,red5-1.0.0-RC2,下载后直接加压,运行red5.bat,显示下面的提示表示安装成功。
- [INFO] [Launcher:/installer] org.red5.server.service.Installer - Installer service created
2.在浏览器中输入http://localhost:5080,进入red5主页面,然后安装流媒体播放器oflaDemo,点Install a ready-made application,然后选择OFLA Demo安装。
3.提示安装成功后,会在red5主目录的webapps下产生一个oflaDemo文件夹,修改oflaDemo\WEB-INF\red5-web.properties中的端口号为5080,然后重启red5服务,显示下面代码表示安装成功
- [INFO] [Launcher:/oflaDemo] org.red5.server.Server - Add mapping global: default host: localhost:5080 context: oflaDemo
- [INFO] [Launcher:/oflaDemo] org.red5.server.Server - Add mapping global: default host: 127.0.0.1:5080 context: oflaDemo
- [INFO] [Launcher:/oflaDemo] org.red5.demos.oflaDemo.Application - oflaDemo appStart
4.在浏览器中输入http://localhost:5080/demos/ofla_demo.html,进入ofla页面,点击connect连接red5服务器,如果library框中能显示视频信息,就表示已经连接成功.
(ofla自带的视频文件存储在oflaDemo\streams文件夹中),点击视频信息,就可以看到视频了。
完成,就可以用酷播免费播放器(这是一款免费且支持rtmp流的网页播放器,官方下载 http://www.cuplayer.com/cuplayer/download.html ,下载基础应用的范例就可以了),代码参考:
- <script type="text/javascript" src="/player/images/swfobject.js"></script>
- <div class="video" id="CuPlayer"> <b> <img src="/player/images/loading.gif" />
- 网页视频播放器加载中,请稍后...</b> </div>
- <script type="text/javascript">
- var so = new SWFObject("/Player/player.swf","ply","980","460","9","#000000");
- so.addParam("allowfullscreen","true");
- so.addParam("allowscriptaccess","always");
- so.addParam("wmode","opaque");
- so.addParam("quality","high");
- so.addParam("salign","lt");
- so.addVariable("JcScpServer","rtmp://127.0.0.1/SOSample"); //服务器地址
- so.addVariable("JcScpVideoPath","mp4:test.mp4"); //发布点名称
- so.addVariable("JcScpImg","/player/Images/start.jpg");
- so.addVariable("JcScpFile","/player/CuSunV4Set.xml");
- so.write("CuPlayer");
- </script>
热门文章推荐
- [Red5]Red5之Flash流媒体服务器的安装与使用教程完整版(组图)
- [RED5]搭建RED5直播用流媒体服务(搭直播环境)
- [RED5]Red5的直播与点播的压力测试(并发数的测试)
- [RED5]red5流媒体服务器(开源免费)的安装方法
- [RED5]用red5做视频直播(red5流媒体直播)
- [RED5]Red5在线录制音视频源代码示例
- [RED5]Red5 Client 连接 Red5Server java代码
- [RED5]red5流媒体播放平台搭建环境方法