第一次写日志,写不好可以联系作者
rtsp的过程相信网上已经多得不能再多了。
今天主要说一下自己再开发的时候碰到的误区。
摄像头主要用的是主流的海康和大华。
下面是VLC播放时的抓包数据。
OPTIONS rtsp://192.168.1.66:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1 RTSP/1.0
CSeq: 2
User-Agent: LibVLC/2.2.6 (LIVE555 Streaming Media v2016.02.22)
RTSP/1.0 200 OK
CSeq: 2
Public: OPTIONS, DESCRIBE, PLAY, PAUSE, SETUP, TEARDOWN, SET_PARAMETER, GET_PARAMETER
Date: Tue, Jul 10 2018 14:42:50 GMT
DESCRIBE rtsp://192.168.1.66:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1 RTSP/1.0
CSeq: 3
User-Agent: LibVLC/2.2.6 (LIVE555 Streaming Media v2016.02.22)
Accept: application/sdp
RTSP/1.0 401 Unauthorized
CSeq: 3
WWW-Authenticate: Digest realm="54c415385cae", nonce="df2fe741842227dba2da24fd297a4e0a", stale="FALSE"
WWW-Authenticate: Basic realm="54c415385cae"
Date: Tue, Jul 10 2018 14:42:50 GMT
DESCRIBE rtsp://192.168.1.66:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1 RTSP/1.0
CSeq: 4
Authorization: Digest username="admin", realm="54c415385cae", nonce="df2fe741842227dba2da24fd297a4e0a", uri="rtsp://192.168.1.66:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1", response="bc4925479850ef1e3200d850ba60d314"
User-Agent: LibVLC/2.2.6 (LIVE555 Streaming Media v2016.02.22)
Accept: application/sdp
RTSP/1.0 200 OK
CSeq: 4