rtmp学习(一)

rtmp播放流程:

1、客户端 和服务器握手(HandShake)、建立一个网络连接(NetConnection);

  握手  :双方分别发送三个数据块C0、C1、S0、S1、C2、S2

       C0和S0就是一个字节(version(1)),表示协议版本号,现在是03

       C1和S1长度1536个字节(time(4)、zero(4)、random(1528))

       C2和S2长度也是1536个字节(time(4)、time2(4)、random echo(1528))

  网络连接:connect->

       windows acknowledgement size<-

       set Peer Bandwidth<-

         windows acknowledgement size->

       user control message(StreamBegin)<-

       command message(_result  connect response)<- 

2、建立网络流(NetStream)通道;

       command message(CreateStream)->

       command message(_result  createStream response)

3、拉流play;

         command message(play)->

       setChunkSize<-

       userControl(StreamBegin)<-告知流ID

       command message(onStatus-play reset)<-

       command message(onStatus-play start)<-

       audio message<-

       video message<-

         

媒体流必须发布到已经在流媒体服务器上注册过的应用程序上,在服务器的Applications文件夹下新建一个"live"文件夹,即课注册一个名为"live"的应用程序,不需要编写任何代码

 

转载于:https://www.cnblogs.com/dandancheng/p/7988743.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值