# Limit the stream play duration in RTSP

**URL:** https://community.wowza.com/t/limit-the-stream-play-duration-in-rtsp/41065
**Category:** Wowza Streaming Engine
**Created:** [May 19, 2014, 1:25pm UTC](https://community.wowza.com/t/limit-the-stream-play-duration-in-rtsp/41065 "2014-05-19T13:25:03Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Manoj\_Kashyap](https://avatars.discourse-cdn.com/v4/letter/m/c0e974/32.png) [@Manoj\_Kashyap](https://community.wowza.com/u/Manoj_Kashyap)
#### Post date: [May 19, 2014, 1:25pm UTC](https://community.wowza.com/t/limit-the-stream-play-duration-in-rtsp/41065/1 "2014-05-19T13:25:03Z")

</div>

Hi,

Is it possible to limit the duration of RTSP stream. We have audio on-demand streaming application and want to limit play to 60 seconds. I have gone through few posts and documentation and found out that it is possible for HTTP streaming. Kindly suggest how can this be done for my audio on-demand streaming application over RTSP.

---

<div class="post-metadata">

### Author: ![Zoran](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/zoran/32/385_2.png) [@Zoran](https://community.wowza.com/u/Zoran)
#### Post date: [May 19, 2014, 11:14am UTC](https://community.wowza.com/t/limit-the-stream-play-duration-in-rtsp/41065/2 "2014-05-19T11:14:12Z")

</div>

Hi,

The feature that you described is not supported for RTSP at present. It is not possible to specify a playback duration limit for an RTSP stream.

Zoran

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [May 20, 2014, 6:33pm UTC](https://community.wowza.com/t/limit-the-stream-play-duration-in-rtsp/41065/3 "2014-05-20T18:33:14Z")

</div>

Actually the [Timed Disconnect Module](https://www.wowza.com/docs/how-to-disconnect-connected-clients-after-a-specified-time-period-moduletimeddisconnect%28ModuleTimedDisconnect%29) works with RTSP clients. You can limit by user agent (using timedDisconnectAllowedAgents setting). If you want more control you can use [onRTPSessionCreate](https://www.wowza.com/docs/how-to-control-access-to-rtsp-rtp-streams) to create a timer for each client.

Richard
