I'm trying to get an RTSP session to PLAY out of an AXIS camera. I'm officially stuck with a 404 Not Found. Please help! Here is what I get when I telnet to the camera and run the following commands:
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
So, what am I missing? Thanks.
Okay, I got it working. Hopefully, it will help someone else. I had to change both the SETUP and PLAY commands. This works for AXIS cameras -- not sure for other devices. Here is the setup:
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
Now it's ready to PLAY
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