·您当前的位置:首页 > 技术教程 > Rtmp技术 >

[RTMP]RTMP协议?什么是rtmp协议?

时间:2016-01-07 09:33酷播
[RTMP]RTMP协议?什么是rtmp协议?RTMP包结构

RTMP:Real Time Messaging Protocol

默认端口:1935

RTMP是工作在TCP之上的协议(Over TCP)

RTMP包结构:

握手

RTMP协议参考:

http://www.pigg.co/rtmp-protocol-handshake.html

https://github.com/simple-rtmp-server/srs/wiki/v1_CN_RTMPHandshake

http://en.wikipedia.org/wiki/Real_Time_Messaging_Protocol

RTMP协议的使用: 

  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. <!-- HTML代码参数/Begin --> 
  11. so.addVariable("JcScpServer","rtmp://www.cuplauyer.com/vod"); //rtmp流媒体服务器地址 
  12. so.addVariable("JcScpVideoPath","mp4:test.mp4"); //文件地址 
  13. so.addVariable("JcScpImg","/player/Images/flashChangfa2.jpg"); 
  14. so.addVariable("JcScpFile","/player/CuSunV2Set.asp"); 
  15. <!-- HTML代码参数/End --> 
  16. so.write("CuPlayer"); 
  17. </script> 

酷播跨平台演示PC终端、安卓Android终端、苹果iOS终端、Windows Phone终端等主流终端

热门文章推荐

请稍候...

保利威视云平台-轻松实现点播直播视频应用

酷播云数据统计分析跨平台播放器