How can I retrieve a video in Python by specifying start and end date via RTSP?

I was able to retrieve the live stream from a camera using the following RTSP link:

rtsp://192.168.0.130:554/live/67fbbf9f-22d5-44e1-a81d-bdc1fbf5b0c4

And I can also access the full recorded footage with:

rtsp://192.168.0.130:554/vod/67fbbf9f-22d5-44e1-a81d-bdc1fbf5b0c4

Now I’d like to know: how can I retrieve only a specific time segment of the recording, for example by specifying a startDate and endDate?

Is there any standard in the RTSP protocol for that?

Thanks in advance for any help!

Hi,

Please look into this one for how to playback video in a time range - https://developer.milestonesys.com/s/question/0D53X0000DFIi7hSQD/open-network-bridge-rtsp-url-with-time-range

Hi Svetlana Ulyanova,

thanks for the quick response.

I have a question regarding the PLAY request in RTSP.

If I send the following request:

rtsp://192.168.0.130:554/vod/67fbbf9f-22d5-44e1-a81d-bdc1fbf5b0c4

Header: Range: clock=20250511T140000.365Z-20250511T140100.365Z

Should I expect to receive only the stream corresponding to that specific time range (from 14:00:00.365 to 14:01:00.365 on May 11, 2025)?

I’m a bit confused because in some places you mention it’s not possible to request playback from a specific moment, while in others it seems like using this

Range: clock=

header makes it possible.

Could you clarify whether this kind of request is supported and under what conditions?

Thanks!

Hi,

Playback for specific time is supported via passing the parameters in the Range header.

What is not supported is passing the parameters in the url itself.

Kind regards,

Svetlana