天天看點

RTSP握手及會話流程抓取(RTSP over TCP)RTSP Protocol Record

RTSP Protocol Record

VLC 啟VoD服務,ffplay拉流播放

OPTIONS rtsp://192.168.1.48:8554/test.sdp RTSP/1.0

CSeq: 1

User-Agent: Lavf57.56.101

RTSP/1.0 200 OK

Server: VLC/2.2.0

Content-Length: 0

Cseq: 1

Public: DESCRIBE,SETUP,TEARDOWN,PLAY,PAUSE,GET_PARAMETER

DESCRIBE rtsp://192.168.1.48:8554/test.sdp RTSP/1.0

Accept: application/sdp

CSeq: 2

User-Agent: Lavf57.56.101

RTSP/1.0 200 OK

Server: VLC/2.2.0

Date: Thu, 14 Dec 2017 07:11:30 GMT

Content-Type: application/sdp

Content-Base: rtsp://192.168.1.48:8554/test.sdp

Content-Length: 716

Cache-Control: no-cache

Cseq: 2

RTSP/1.0 200 OK

Server: VLC/2.2.0

Date: Thu, 14 Dec 2017 07:11:30 GMT

Content-Type: application/sdp

Content-Base: rtsp://192.168.1.48:8554/test.sdp

Content-Length: 716

Cache-Control: no-cache

Cseq: 2

v=0

o=- 15986831594108587387 15986831594108587387 IN IP4 hai-virtual-pc

s=Unnamed

i=N/A

c=IN IP4 0.0.0.0

t=0 0

a=tool:vlc 2.2.0

a=recvonly

a=type:broadcast

a=charset:UTF-8

a=control:rtsp://192.168.1.48:8554/test.sdp

m=audio 0 RTP/AVP 96

b=RR:0

a=rtpmap:96 mpeg4-generic/48000/2

a=fmtp:96 streamtype=5; profile-level-id=15; mode=AAC-hbr; config=119056e500; SizeLength=13; IndexLength=3; IndexDeltaLength=3; Profile=1;

a=control:rtsp://192.168.1.48:8554/test.sdp/trackID=0

m=video 0 RTP/AVP 96

b=RR:0

a=rtpmap:96 H264/90000

a=fmtp:96 packetization-mode=1;profile-level-id=4d401e;sprop-parameter-sets=Z01AHppygWhnQgAAAwACAAADAGUeLFss,aOvvIA==;

a=control:rtsp://192.168.1.48:8554/test.sdp/trackID=1

SETUP rtsp://192.168.1.48:8554/test.sdp/trackID=0 RTSP/1.0

Transport: RTP/AVP/UDP;unicast;client_port=6396-6397

CSeq: 3

User-Agent: Lavf57.56.101

RTSP/1.0 200 OK

Server: VLC/2.2.0

Date: Thu, 14 Dec 2017 07:11:30 GMT

Transport: RTP/AVP/UDP;unicast;client_port=6396-6397;server_port=33360-33361;ssrc=2BD4D258;mode=play

Session: 18ed93e85c590ed3;timeout=60

Content-Length: 0

Cache-Control: no-cache

Cseq: 3

SETUP rtsp://192.168.1.48:8554/test.sdp/trackID=1 RTSP/1.0

Transport: RTP/AVP/UDP;unicast;client_port=6398-6399

CSeq: 4

User-Agent: Lavf57.56.101

Session: 18ed93e85c590ed3

RTSP/1.0 200 OK

Server: VLC/2.2.0

Date: Thu, 14 Dec 2017 07:11:30 GMT

Transport: RTP/AVP/UDP;unicast;client_port=6398-6399;server_port=36728-36729;ssrc=6829E87D;mode=play

Session: 18ed93e85c590ed3;timeout=60

Content-Length: 0

Cache-Control: no-cache

Cseq: 4

PLAY rtsp://192.168.1.48:8554/test.sdp RTSP/1.0

Range: npt=0.000-

CSeq: 5

User-Agent: Lavf57.56.101

Session: 18ed93e85c590ed3

RTSP/1.0 200 OK

Server: VLC/2.2.0

Date: Thu, 14 Dec 2017 07:11:30 GMT

RTP-Info: url=rtsp://192.168.1.48:8554/test.sdp/trackID=0;seq=47738;rtptime=3746362223, url=rtsp://192.168.1.48:8554/test.sdp/trackID=1;seq=4702;rtptime=2729461873

Range: npt=36.783150-

Session: 18ed93e85c590ed3;timeout=60

Content-Length: 0

Cache-Control: no-cache

Cseq: 5

ffmpeg 向 EasyDarwin 的轉發服務推流

OPTIONS rtsp://192.168.1.155:10554/test.sdp RTSP/1.0

CSeq: 1

User-Agent: Lavf57.56.101

RTSP/1.0 200 OK

Server: EasyDarwin/7.3 (Build/17.0325; Platform/Win32; Release/EasyDarwin; State/Development; )

Cseq: 1

Public: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, OPTIONS, ANNOUNCE, RECORD

ANNOUNCE rtsp://192.168.1.155:10554/test.sdp RTSP/1.0

Content-Type: application/sdp

CSeq: 2

User-Agent: Lavf57.56.101

Content-Length: 499

v=0

o=- 0 0 IN IP4 127.0.0.1

s=No Name

c=IN IP4 192.168.1.155

t=0 0

a=tool:libavformat 57.56.101

m=video 0 RTP/AVP 96

b=AS:700

a=rtpmap:96 H264/90000

a=fmtp:96 packetization-mode=1; sprop-parameter-sets=Z01AHppygWhnQgAAAwACAAADAGUeLFss,aOvvIA==; profile-level-id=4D401E

a=control:streamid=0

m=audio 0 RTP/AVP 97

b=AS:96

a=rtpmap:97 MPEG4-GENERIC/48000/2

a=fmtp:97 profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3; config=119056E500

a=control:streamid=1

RTSP/1.0 200 OK

Server: EasyDarwin/7.3 (Build/17.0325; Platform/Win32; Release/EasyDarwin; State/Development; )

Cseq: 2

SETUP rtsp://192.168.1.155:10554/test.sdp/streamid=0 RTSP/1.0

Transport: RTP/AVP/TCP;unicast;interleaved=0-1;mode=record

CSeq: 3

User-Agent: Lavf57.56.101

RTSP/1.0 200 OK

Server: EasyDarwin/7.3 (Build/17.0325; Platform/Win32; Release/EasyDarwin; State/Development; )

Cseq: 3

Cache-Control: no-cache

Session: 86363202415510

Date: Thu, 14 Dec 2017 08:27:15 GMT

Expires: Thu, 14 Dec 2017 08:27:15 GMT

Transport: RTP/AVP/TCP;unicast;mode=record;interleaved=0-1

SETUP rtsp://192.168.1.155:10554/test.sdp/streamid=1 RTSP/1.0

Transport: RTP/AVP/TCP;unicast;interleaved=2-3;mode=record

CSeq: 4

User-Agent: Lavf57.56.101

Session: 86363202415510

RTSP/1.0 200 OK

Server: EasyDarwin/7.3 (Build/17.0325; Platform/Win32; Release/EasyDarwin; State/Development; )

Cseq: 4

Session: 86363202415510

Cache-Control: no-cache

Date: Thu, 14 Dec 2017 08:27:15 GMT

Expires: Thu, 14 Dec 2017 08:27:15 GMT

Transport: RTP/AVP/TCP;unicast;mode=record;interleaved=2-3

RECORD rtsp://192.168.1.155:10554/test.sdp RTSP/1.0

Range: npt=0.000-

CSeq: 5

User-Agent: Lavf57.56.101

Session: 86363202415510

RTSP/1.0 200 OK

Server: EasyDarwin/7.3 (Build/17.0325; Platform/Win32; Release/EasyDarwin; State/Development; )

Cseq: 5

Session: 86363202415510

RTP-Info: url=rtsp://192.168.1.155:10554/test.sdp/test.sdp,url=rtsp://192.168.1.155:10554/test.sdp/test.sdp