·您当前的位置:主页 > 技术教程 > Wowza教程 >

[Wowza流媒体]wowza直播服务器的配置-源及边缘服务器配置

时间:2016-01-17 09:16酷播
[Wowza流媒体]wowza直播服务器的配置-源及边缘服务器配置

[Wowza流媒体]wowza直播服务器的配置-源及边缘服务器配置

A:源服务器配置
1.进入配置文件 /usr/local/WowzaMediaServer-3.6.2/conf

2.创建live目录
mkdir live

3.拷贝conf目录下的Application.xml配置文件到live下
cp Application.xml live/

4.修改StreamType值为:

<StreamType>liverepeater-origin</StreamType> //配置为源服务器

5.修改该配置文件LiveStreamPacketizers

<LiveStreamPacketizers>cupertinostreamingpacketizer, smoothstreamingpacketizer, sanjosestreamingpacketizer</LiveStreamPacketizers>
6.修改配置文件HTTPStreamers
<HTTPStreamers>cupertinostreaming,smoothstreaming,sanjosestreaming</HTTPStreamers>
7.进入 /usr/local/WowzaMediaServer-3.6.2/application 新建application
mkdir live
8.重启服务
使用vlc测试工具模拟android和ios进行测试

B:边缘服务器配置
1.进入配置文件 /usr/local/WowzaMediaServer-3.6.2/conf


2.创建live目录
mkdir live

3.拷贝conf目录下的Application.xml配置文件到live下
cp Application.xml live/

4.修改StreamType值为:

<StreamType>liverepeater-edge</StreamType> //配置为边缘服务器

5.修改该配置文件LiveStreamPacketizers

<LiveStreamPacketizers>cupertinostreamingrepeater, smoothstreamingrepeater , sanjosestreamingrepeater</LiveStreamPacketizers>

6.修改该配置文件的originURL选项:

<originURL>rtmp://[wowza-address]:port(端口)/live</originURL>
7.进入 /usr/local/WowzaMediaServer-3.6.2/application 新建application
mkdir live

8.重启服务

9.应用的效果,基于支持rtmp协议的极酷阳光播放器:

极酷rtmp流媒体播放器2

极酷rtmp流媒体播放器2

 代码参考:

  1. <script type="text/javascript" src="/player/images/swfobject.js"></script> 
  2. <div class="video" id="CuPlayer"> <b> <img src="/player/images/loading.gif" /> 
    网页视频播放器加载中,请稍后...
    </b> </div> 
  3. <script type="text/javascript"> 
  4. var so = new SWFObject("/player/player.swf","ply","980","460","9","#000000"); 
  5. so.addParam("allowfullscreen","true"); 
  6. so.addParam("allowscriptaccess","always"); 
  7. so.addParam("wmode","opaque"); 
  8. so.addParam("quality","high"); 
  9. so.addParam("salign","lt"); 
  10. so.addVariable("JcScpServer","rtmp://www.cuplauyer.com/vod"); //rtmp流媒体服务器地址 
  11. so.addVariable("JcScpVideoPath","mp4:test.mp4"); //文件地址 
  12. so.addVariable("JcScpImg","/player/Images/flashChangfa2.jpg"); 
  13. so.addVariable("JcScpFile","/player/CuSunV2Set.asp"); 
  14. so.write("CuPlayer"); 
  15. </script> 

 

热门文章推荐

请稍候...
  • 锁定云视频大聚惠
  • 相约直播超值狂欢
保利威视云直播
保利威视云视频
微信付费直播
酷播云免费在线视频整体解决方案
酷播v4.0网页播放器