0

我正在尝试让一个 RTSP 会话从 AXIS 摄像机中播放。我正式陷入了 404 Not Found 问题。请帮忙!这是我远程登录到相机并运行以下命令时得到的结果:

DESCRIBE rtsp://10.0.1.201:554/axis-media/media.amp RTSP/1.0
CSeq: 1
Authorization: Basic cm9YYYGx1dG8z**

RTSP/1.0 200 OK
CSeq: 1
Content-Type: application/sdp
Content-Base: rtsp://10.0.1.201:554/axis-media/media.amp/
Server: GStreamer RTSP server
Date: Fri, 21 Apr 2017 05:14:37 GMT
Content-Length: 579

v=0
o=- 1188340656180883 1 IN IP4 10.0.1.201
s=Session streamed with GStreamer
i=rtsp-server
t=0 0
a=tool:GStreamer
a=type:broadcast
a=range:npt=now-
a=control:rtsp://10.0.1.201:554/axis-media/media.amp
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:50000
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=640029;sprop-parameter-sets=Z2QAKaw0yAUAW7AW4CAgIL04,aO48MA==
a=control:rtsp://10.0.1.201:554/axis-media/media.amp/stream=0
a=framerate:30.000000
a=transform:1.000000,0.000000,0.000000;0.000000,1.000000,0.000000;0.000000,0.000000,1.000000
SETUP rtsp://10.0.1.201:554/axis-media/media.amp/stream=0 RTSP/1.0
CSeq: 3
User-Agent:  Axis AMC
Transport:  RTP/AVP;unicast;client_port=20000-20001
Authorization: Basic cm9YYYGx1dG8z

RTSP/1.0 200 OK
CSeq: 3
Transport: RTP/AVP;unicast;client_port=20000-20001;server_port=50000-50001;ssrc=1E784D57;mode="PLAY"
Server: GStreamer RTSP server
Session: L7HW$tBS2UZq5Hz+; timeout=60
Date: Fri, 21 Apr 2017 05:15:46 GMT

PLAY rtsp://10.0.1.201:554/axis-media/media.amp/stream=0 RTSP/1.0
CSeq: 4
User-Agent:  Axis AMC
Session: L7HW$tBS2UZq5Hz+
Authorization: Basic cm9YYYGx1dG8z

RTSP/1.0 404 Not Found
CSeq: 4
Server: GStreamer RTSP server
Date: Fri, 21 Apr 2017 05:16:31 GMT

那么,我错过了什么?谢谢。

4

1 回答 1

2

好的,我得到它的工作。希望它会帮助别人。我不得不同时更改 SETUP 和 PLAY 命令。这适用于 AXIS 相机——不确定是否适用于其他设备。这是设置:

SETUP rtsp://10.0.1.201:554/axis-media/media.amp/trackID=1?videocodec=h264&resolution=640x480 RTSP/1.0
CSeq: 3
User-Agent:  Axis AMC
Transport:  RTP/AVP;unicast;client_port=20000-20001
Authorization: Basic cm9YYYGx1dG8z

RTSP/1.0 200 OK
CSeq: 3
Transport: RTP/AVP;unicast;client_port=20000-20001;server_port=50000-50001;ssrc=17344FB6;mode="PLAY"
Server: GStreamer RTSP server
Session: OHO8oC7JWIdH_4NV; timeout=60
Date: Thu, 20 Apr 2017 04:04:10 GMT

现在可以玩了

PLAY rtsp://10.0.1.201:554/axis-media/media.amp RTSP/1.0
CSeq: 4 
Range: npt=0.000-
Authorization: Basic cm9YYYGx1dG8z
Session: vwzOPQfFIUt4rusc

RTSP/1.0 200 OK
CSeq: 4
RTP-Info: url=rtsp://10.0.1.201:554/axis-media/media.amp/stream=0?videocodec=h264&resolution=640x480;seq=3767;rtptime=3098586430
Range: npt=now-
Server: GStreamer RTSP server
Session: vwzOPQfFIUt4rusc; timeout=60
Date: Tue, 25 Apr 2017 05:01:00 GMT
于 2017-04-28T19:32:26.210 回答