How to Play Back Recordings Using RTSP with "Range" Header in GStreamer #920
Replies: 2 comments 3 replies
-
This automatically generated reply acts as a friendly reminder. Answers to your questions will most often come from the community, from developers like yourself. You will, from time to time, find that Axis employees answers some of the questions, but this is not a guarantee. Think of the discussion forum as a complement to other support channels, not a replacement to any of them. If your question remains unanswered for a period of time, please revisit it to see whether it can be improved by following the guidelines listed in Axis support guidelines. |
Beta Was this translation helpful? Give feedback.
-
I know in ffplay -ss can seek ss seconds and playback. I tried to ask chatgpt to translate it into gst-launch-1.0, but it seems it will always play from the start in gst-launch-1.0, it is mentioned that rtspsrc does not have good support for seek. gst-launch-1.0 rtspsrc location="rtsp://root:[email protected]/axis-media/media.amp?recordingid=20250212_133419_3287_B8A44F284CF7" do-timestamp=true ! rtph264depay ! h264parse ! decodebin ! videoconvert ! autovideosink seek=true seek-time=100000000000 |
Beta Was this translation helpful? Give feedback.
-
Hello,
I am working with AXIS P1377-LE and AXIS 1467-LE cameras and need to play back recordings using RTSP with a specific start and stop time.
I initially attempted to set the "Range" parameter directly in the RTSP URL, using different formats such as:
rtsp://root:password@cameraIP/axis-media/media.amp?recordingid=ID&range=npt=10:60
rtsp://root:password@cameraIP/axis-media/media.amp?recordingid=ID&range=clock=20250205T120000Z-20250205T120100Z
rtsp://root:password@cameraIP/axis-media/media.amp?recordingid=ID&range=smpte=00:10:00-00:15:00
However, this approach did not work. Axis Support informed me that the "Range" field is an RTSP header, not a URL parameter, and needs to be set within the RTSP request itself.
I am using GStreamer in C++ to parse the RTSP stream. I successfully used the export-recording API to extract and play recordings within a custom time range, but I still need a way to play recordings directly via RTSP with a specified range.
My questions:
How can I correctly set the "Range" header in an RTSP request when using GStreamer?
Does GStreamer support setting the RTSP "Range" header, and if so, how can it be implemented?
Any guidance or example implementations would be greatly appreciated.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions