Context: I developed an NX plugin to send frames to external software that does multi-object tracking and then stores the results into a database. The end user watches the video stream and the tracking results in the browser (NX Witness => RTSP => (video remapping) => WebRTC => browser).
The end-to-end tracking process requires a few seconds. To make sure the tracking results are available (end-to-end processing = several seconds) along the video, I use this:
rtsp://nxmediaserver:7001/camera-uuid?onvif_replay=1&pos=[NOW MINUS PROCESSING DELAY]
The processing delay is not fixed. I compute it before I call the RTSP endpoint.
When PROCESSING DELAY is less than 60 seconds, I often get this error (the following error output is from ffplay):
[rtsp] method DESCRIBE failed: 503 Service Unavailable
Server returned 5XX Server Error reply
60 seconds is not a precise value. The smaller the value is, the higher the probability of the error is.
I used this command to test some values:
ffplay -i "rtsp://nxmediaserver:7001/camera-uuid?onvif_replay=1&pos=$(date -d '-15 sec' +%s%N | cut -b1-13)"
How can I get the RTSP stream for recent timestamps?
Please sign in to leave a comment.