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

本文详细介绍了使用EasyPusher进行RTSP直播推送的过程,包括从ANNOUNCE到TEARDOWN的标准流程,并展示了EasyPusher安卓客户端与EasyDarwin服务器间的交互报文实例。
摘要由CSDN通过智能技术生成

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\r\n
CSeq: 1\r\n
User-Agent: EasyPusher v1.16.0325\r\n
Content-Type: application/sdp\r\n
Content-Length: 557\r\n
\r\n


#S->C:
#time: ms=475350275 date=Sat, 16 Apr 2016 01:09:58 GMT
RTSP/1.0 200 OK\r\n
Server: EasyDarwin/7.0.4 (Build/16.0108; Platform/Win32; Release/EasyDarwin; State/Development; )\r\n
Cseq: 1\r\n
\r\n


#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\r\n
CSeq: 2\r\n
User-Agent: EasyPusher v1.16.0325\r\n
Transport: RTP/AVP/TCP;unicast;mode=record;interleaved=0-1\r\n
\r\n

#S->C:
#time: ms=475350306 date=Sat, 16 Apr 2016 01:09:58 GMT
RTSP/1.0 200 OK\r\n
Server: EasyDarwin/7.0.4 (Build/16.0108; Platform/Win32; Release/EasyDarwin; State/Development; )\r\n
Cseq: 2\r\n
Cache-Control: no-cache\r\n
Session: 127315715557739\r\n
Date: Sat, 16 Apr 2016 01:09:58 GMT\r\n
Expires: Sat, 16 Apr 2016 01:09:58 GMT\r\n
Transport: RTP/AVP/TCP;unicast;mode=record;interleaved=0-1\r\n
\r\n


#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\r\n
CSeq: 3\r\n
User-Agent: EasyPusher v1.16.0325\r\n
Transport: RTP/AVP/TCP;unicast;mode=record;interleaved=2-3\r\n
Session: 127315715557739\r\n
\r\n

#S->C:
#time: ms=475350368 date=Sat, 16 Apr 2016 01:09:58 GMT
RTSP/1.0 200 OK\r\n
Server: EasyDarwin/7.0.4 (Build/16.0108; Platform/Win32; Release/EasyDarwin; State/Development; )\r\n
Cseq: 3\r\n
Session: 127315715557739\r\n
Cache-Control: no-cache\r\n
Date: Sat, 16 Apr 2016 01:09:58 GMT\r\n
Expires: Sat, 16 Apr 2016 01:09:58 GMT\r\n
Transport: RTP/AVP/TCP;unicast;mode=record;interleaved=2-3\r\n
\r\n

#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\r\n
CSeq: 4\r\n
User-Agent: EasyPusher v1.16.0325\r\n
Session: 127315715557739\r\n
Range: npt=0.000-\r\n
\r\n

#S->C:
#time: ms=475350415 date=Sat, 16 Apr 2016 01:09:58 GMT
RTSP/1.0 200 OK\r\n
Server: EasyDarwin/7.0.4 (Build/16.0108; Platform/Win32; Release/EasyDarwin; State/Development; )\r\n
Cseq: 4\r\n
Session: 127315715557739\r\n
RTP-Info: url=rtsp://192.168.1.101:554/live.sdp/trackID=1,url=rtsp://192.168.1.101:554/live.sdp/trackID=2\r\n
\r\n

………………
……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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值