• EasyPusher安卓Android手机直播推送之RTSP流媒体协议流程


    EasyPusher移动端推送同我们平时用的RTSP直播推送流程一样,都是采用标准RTSP/RTP推送流程:ANNOUNCE->SETUP->PLAY->RTP/RTCP->TEARDOWN(或者直接直接断开推送连接),流程图如下:
    EasyPusher手机直播

    我们贴一段EasyPusher 安卓与EasyDarwin流媒体服务器之间的交互报文:

    #C->S:
    #time: ms=475350259 date=Sat, 16 Apr 2016 01:09:58 GMT
    #server: ip=192.168.1.101 port=554
    #client: ip=192.168.1.107 port=58757
    ANNOUNCE rtsp://192.168.1.101:554/live.sdp RTSP/1.0
    
    
    CSeq: 1
    
    
    User-Agent: EasyPusher v1.16.0325
    
    
    Content-Type: application/sdp
    
    
    Content-Length: 557
    
    
    
    
    
    
    
    #S->C:
    #time: ms=475350275 date=Sat, 16 Apr 2016 01:09:58 GMT
    RTSP/1.0 200 OK
    
    
    Server: EasyDarwin/7.0.4 (Build/16.0108; Platform/Win32; Release/EasyDarwin; State/Development; )
    
    
    Cseq: 1
    
    
    
    
    
    
    
    #C->S:
    #time: ms=475350290 date=Sat, 16 Apr 2016 01:09:58 GMT
    #server: ip=192.168.1.101 port=554
    #client: ip=192.168.1.107 port=58757
    SETUP rtsp://192.168.1.101:554/live.sdp/trackID=1 RTSP/1.0
    
    
    CSeq: 2
    
    
    User-Agent: EasyPusher v1.16.0325
    
    
    Transport: RTP/AVP/TCP;unicast;mode=record;interleaved=0-1
    
    
    
    
    
    
    #S->C:
    #time: ms=475350306 date=Sat, 16 Apr 2016 01:09:58 GMT
    RTSP/1.0 200 OK
    
    
    Server: EasyDarwin/7.0.4 (Build/16.0108; Platform/Win32; Release/EasyDarwin; State/Development; )
    
    
    Cseq: 2
    
    
    Cache-Control: no-cache
    
    
    Session: 127315715557739
    
    
    Date: Sat, 16 Apr 2016 01:09:58 GMT
    
    
    Expires: Sat, 16 Apr 2016 01:09:58 GMT
    
    
    Transport: RTP/AVP/TCP;unicast;mode=record;interleaved=0-1
    
    
    
    
    
    
    
    #C->S:
    #time: ms=475350337 date=Sat, 16 Apr 2016 01:09:58 GMT
    #server: ip=192.168.1.101 port=554
    #client: ip=192.168.1.107 port=58757
    SETUP rtsp://192.168.1.101:554/live.sdp/trackID=2 RTSP/1.0
    
    
    CSeq: 3
    
    
    User-Agent: EasyPusher v1.16.0325
    
    
    Transport: RTP/AVP/TCP;unicast;mode=record;interleaved=2-3
    
    
    Session: 127315715557739
    
    
    
    
    
    
    #S->C:
    #time: ms=475350368 date=Sat, 16 Apr 2016 01:09:58 GMT
    RTSP/1.0 200 OK
    
    
    Server: EasyDarwin/7.0.4 (Build/16.0108; Platform/Win32; Release/EasyDarwin; State/Development; )
    
    
    Cseq: 3
    
    
    Session: 127315715557739
    
    
    Cache-Control: no-cache
    
    
    Date: Sat, 16 Apr 2016 01:09:58 GMT
    
    
    Expires: Sat, 16 Apr 2016 01:09:58 GMT
    
    
    Transport: RTP/AVP/TCP;unicast;mode=record;interleaved=2-3
    
    
    
    
    
    
    #C->S:
    #time: ms=475350384 date=Sat, 16 Apr 2016 01:09:58 GMT
    #server: ip=192.168.1.101 port=554
    #client: ip=192.168.1.107 port=58757
    PLAY rtsp://192.168.1.101:554/live.sdp RTSP/1.0
    
    
    CSeq: 4
    
    
    User-Agent: EasyPusher v1.16.0325
    
    
    Session: 127315715557739
    
    
    Range: npt=0.000-
    
    
    
    
    
    
    #S->C:
    #time: ms=475350415 date=Sat, 16 Apr 2016 01:09:58 GMT
    RTSP/1.0 200 OK
    
    
    Server: EasyDarwin/7.0.4 (Build/16.0108; Platform/Win32; Release/EasyDarwin; State/Development; )
    
    
    Cseq: 4
    
    
    Session: 127315715557739
    
    
    RTP-Info: url=rtsp://192.168.1.101:554/live.sdp/trackID=1,url=rtsp://192.168.1.101:554/live.sdp/trackID=2
    
    
    
    
    
    
    ………………
    ……RTP……
    ………………
    

    如上流程,服务器端为:192.168.1.101:554,推送端:192.168.1.107,EasyPusher采用的是RTP over TCP的方式进行推送,所以此过程在公网手机视频直播、移动4G直播、单兵直播项目中都同样可用!

    获取更多信息

    邮件:support@easydarwin.org

    WEB:www.EasyDarwin.org

    Copyright © EasyDarwin.org 2012-2016

    EasyDarwin

  • 相关阅读:
    【OpenGL】Shader实例分析(七)- 雪花飘落效果
    BZOJ 1091([SCOI2003]分割多边形-分割直线)
    Protocol buffer序列化及其在微信蓝牙协议中的应用
    运行计划中cost计算方法
    jquery全局变量---同步请求设置
    Java split字符串中包含.的情况
    jQuery获取、设置title的值
    jQuery获取URL中所带参数的办法
    在Eclipse中提交SVN项目的时候注意提交项目信息
    马丁 福勒 Martin Fowler 关于依赖注入和反转控制的区别
  • 原文地址:https://www.cnblogs.com/babosa/p/9217936.html
Copyright © 2020-2023  润新知