mobile clients cannot play live stream

Hi All,

We need to know how we can decide if a stream that is just started via the MediaCaster API is ready to be played by iOS and Android clients.

Right now we are using both IMediaStreamActionNotify2 and WatchDog (stream.getPlayPackets()) approaches.

But clients return error when connected to the stream even after these streams are published and also the stream.getPlayPackets() tells us that there have been packets received.

We have seen below threads that are similar:

https://www.wowza.com/forums/showthread.php?18288-Dynamically-publish-a-stream-when-a-player-connects

https://www.wowza.com/forums/showthread.php?18412-How-to-detect-stream-is-ready-for-playing-from-Wowza

Here we can see that IMediaCasterNotify2 and IMediaCasterValidateMediaCaster interfaces are suggested.

However, there’s no information about how to use them in this context. We have no information regarding what the interface methods do.

And it seems there’s not a concrete example on how to use these interfaces either.

It appears that this is a problem that is encountered by many and it would be nice if a real answer can be provided.

Wowza Version: 3.5.2

Regards,

Bora.

Hi, Bora,

Those notifiers would not tell you when there are enough chunks ready for HLS playback, which is 3. By default, Wowza tries to create 10 second chunks (but the actual size depends on key frames because chunks can only be broken on key frames). You can reduce the time it takes for a stream to be ready by making making key frame frequency 1 or 2 seconds on the encoder side, and setting cupertinoChunkDurationTarget 1000 or 2000. For example a stream with 2 second key frame interval and cupertinoChunkDurationTarget set to 2000, Wowza will make 2 second chunks.

The notifier that you might use if you want to count chunk creation is IHTTPStreamerCupertinoLivePacketizerDataHandler shown in the 2nd example of this post.

Richard

Bora,

RTSP packetizing does not involve the chunking done for HTTP streaming, so it should be accessible for playback very quickly, similar to RTMP in that measure.

Richard

Check to see if that same delay is seen on desktop RTSP players, such as VLC player.

With RTSP there can be a fallback to TCP if UDP streaming is not available due to devices restrictions, or network conditions.

That fallback can take a few seconds to occur before playback commences.

Daren

Richard, thanks for the detailed answer.

I understand that this is for HLS playback, and we will try it.

What can we do for RTSP playback on Android devices? The same approach is applicable?

Regards,

Bora.

Hi Richard,

Here’s our scenario:

We start the stream via the MediaCaster API and wait for the first packet using watchdog.

Then we wait for an additional 8 seconds, otherwise the android and iphone clients don’t play.

I understand there’s some explanation for the iphone client, but can you think of a reason for the Android?

Our frame rate is 15fps. Key frame interval is 15 frames, so there’s a key frame every second.

What can we do to get rid of this 8 seconds delay?

Any ideas are welcome.

Thanks in advance,

Bora.