Wowza Community

Wowza RTSP on-demand re-streaming not working?

I’m evaluating Wowza Streaming Engine 4.8.0 for use in an on-premise re-streaming solution using several RTSP encoders / IP cameras. Some of the video sources are on low-bandwidth network connections and we can’t have the H.264 video streams sent to Wowza constantly. Instead, the video should only be pulled from the source to Wowza when one or more users request the video from Wowza.

In reading the Wowza documentation, the MediaCaster seemed to support this functionality out of the box when it states “The 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.”. But I’m simply not seeing that to be the case. When I manually add a stream file and then “connect” the stream, per the Wowza monitoring page the inbound bandwidth usage goes up equal to 1 stream from the source. If I check using “iftop” (CentOS 8) I see an inbound stream.

Other forum entries suggested using the “rtp-live” MediaCaster type but I simply don’t see that option. I see “rtp / rtp-record / shoutcast / shoutcast-record / liverepeater / applehls / mpegtstcp / srt” when I connect the stream.

It’s also my understanding that when using MPEG-DASH for playback, this on-demand functionality may not work due to the fact that MPEG-DASH (or HLS) require caching several seconds of video. But is that the same for WebRTC? Ultimately we’d like to leverage WebRTC for playback in a browser.

Thanks,

Dave

Hello @David Irwin

The MediaCaster will wait for a player to timeout and then stop after the 12 second StreamTimout (default MediaCaster timeout).

I can confirm rtp-live is not a MediaCaster type.

To rule out if this is a re-stream issue, if you do not do a RTSP re-stream and use a live stream as a MediaCaster type, do you see this issue?

Regards,

JasonT

Hi @David Irwin,

As @Jason Tuchler has mentioned, rtp-live isn’t a MediaCaster type, it is a Stream Type. You would have to manually edit the Application.xml file to set it in the Streams / StreamType field. This stream type will automatically try to connect an rtp mediaCaster when the player connection is made.

Your understanding is correct in that HTTP playback methods won’t work with this stream type because they require the stream to already be running for a period of time when the player connects.

WebRTC player requests will trigger the mediaCaster to connect, but initially, the player request will fail with a 502 response and then when the player retries, it will succeed if the camera stream was connected properly. What I would suggest, is that you modify the player code so that it retries after a few seconds if it receives this 502 response.

Regards,

Roger.

Thanks for your responses. However, my original question was maybe a bit confusing and long and let me try and rephrase it with an explicit example.

  1. I have an IP camera with an RTSP stream URL.
  2. I create a stream file in Wowza.
  3. With just the stream file I can’t view the video via Wowza.
  4. To make the video available via Wowza, in the “Stream Files” section I have to click on the “Connect to this stream” action next to the stream.
  5. When I click on the “Connect to this stream” option, there’s a popup that appears. One of the options at the bottom is select the “MediaCaster Type”. Available options include rtp / rtp-record / shoutcast / shoutcast-record / liverepeater / applehls / mpegtstcp / srt. Based on the Wowza documentation, the “rtp” type should be selected for RTP/RTSP IP camera streams. I’ve been selecting the “rtp” type.
  6. I see a green message that says "Connection successful at the top. When I click on the “Incoming Streams” on the left side, I now see the new stream and the status is “Active”. But at this point, no one is viewing this stream.
  7. If I then click on the “Monitoring” section on the left side, I see in the “Network Throughput” section, the “Bytes In” value is incrementing and the incoming bitrate is ~1 Mbps. The “Bytes Out” value is 0.

Based on this, it appears that Wowza is pulling in the video from the camera even though no one is yet requesting the video stream from Wowza. I can confirm this by looking at the video source device itself and see that it’s transmitting video onto the network.

This might be the expected behavior but the documentation states:

The 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.

The problem I’m trying to solve is how can I use Wowza if I want to make available 1000+ IP cameras but don’t have the capacity (either in the server or on the network) to constantly pull in streaming video from those 1000+ IP cameras? For instance, should I leverage the Wowza API to dynamically “connect” the stream?

Any further guidance is appreciated.

Regards,

Dave