Start and stop RTP-LIVE

We want to use RTP-LIVE to prevent the cameras from streaming continuously to the server. However HLS streams have a problem with RTP-LIVE unless the streams are already published. When an HLS request comes in we can publish the stream using the REST API. Then delay a few seconds and send the command to begin streaming HLS. However when the HLS client terminates the stream continues to be published.

I would like to know how to start the stream and then have it automatically stop when all clients are disconnected. This is the way RTP-LIVE works, but the RESP command to start the stream seems to override that function. Anyone know if this is possible?

John A

Yes you can do this with RTP- live. The Wowza MediaCaster system works on-demand. When the first request is received from a player for the stream file, the source stream referenced in the file is made available to the player. When the last player stops viewing the stream, the MediaCaster system waits for a timeout period.

If no other players request the file, the stream is stopped and isn’t available for streaming until another request is made.

https://www.wowza.com/docs/how-to-use-the-wowza-streaming-engine-java-api-to-start-and-stop-mediacaster-streams

How to configure it with HLS:

— You need to create a stream file and then select HLS in this section here:

https://www.wowza.com/docs/how-to-publish-and-play-a-live-stream-apple-hls#publish-the-source-stream-to-wowza-streaming-engine

I’m not sure if my question was understood. We have RTP streams coming from our cameras. We don’t want all the streams running continuously from the cameras, so we use RTP-LIVE in our application. However, HTTP requests for a stream from the client (HLS) fail unless the stream is already running. The solution is to start the steam before sending the HTTP streaming request.

The problem is if we start the stream using the REST API then it never stops streaming from the camera even if there are no clients viewing the stream. Both RTMP and RTSP requests work ok without pre starting the cameras because they don’t require as much buffering as HLS.

It sounds as though we need to monitor how many clients are viewing the stream and use REST to turn it off if no clients are viewing after a timeout period. This is the least desirable approach,. What I was hoping for was that the RTP-LIVE stream would timeout as normal after starting the stream if no client are watching after a timeout period. I’ve already used REST to start the stream and then viewed using HTTP. But after disconnecting from the stream the server never times out and stops the stream from the camera.

John A