Wowza Community

WebRTC input -> Transcoder -> HLS output = video freeze in iOS and Mac Safari

We have setup WebRTC according to: and that is working fine.

We are testing with the Wowza test publish page:

When we start a WebRTC stream, we only want to support incoming video codec H264 and audio codec Opus. This way, there is only need to transcode the audio codec from opus to aac. The video codec should not be changed, as it is already H264. This is setup in Wowza as preferred codecs.

So we create a new transcoder profile, where we transcode the audio to AAC and use video ‘passthrough’ option. This will save a lot of CPU/GPU power in transcoding.

So far this all works on all browsers except Safari on iOS and Safari on the Mac. There the video starts to freeze after x seconds or x minutes. It looks like there is an issue with keyframes. Because the chunks are still being downloaded an audio is still playing. But there is no update of the image.

So then we enabled video transcoding to H264 codec with all the default options enabled. That means a baseline profile and a video bitrate of 1Mbps. Then the interesting part comes to play. Keyframes!

Then we select the option ‘Same as source (required for transrating)’ at ‘Key frame interval’ or at specific amount of frames. Then it is all working stable. But this means that the video stream has to be transcoded from h264 to h264 only to get the keyframes in the stream. This sounds strange. I would expect that when you ingest webrtc in H264, that could be used without transcoding for HLS.

We use the Apple HLS inspector tool to inspect the HLS streams. As there are some issues according to this tool the main difference between transrating vs passtrough is that there are no key frames in the passtrough stream. And the stream is hanging.

Therefore we conclude at this time, that WebRTC to HLS does not provide keyframes. But interesting is that when you select ‘Same as source (required for transrating)’ there is a key frame every second. So it looks like there are keyframes sent with WebRTC, as the transcoder is adding them every second based on the WebRTC input stream (if I have to belief that wowza is doing that based on the key frames choice).

Now we are looking to find a way that video transcoding is not needed to get it stable on Safari with HLS. How can we make sure that keyframes from the WebRTC are used in the HLS stream?

To be clear, we do NOT use WebRTC for watching. We only use WebRTC for ingest. Watching is done in HLS. So the following issues looks related, but are about watching back in WebRTC. Could it be that somehow some video meta data is being sent in the HLS chunks also that is causing the freezes? And that the transcoder does strip it and make it more stable?

So is there anybody with a smart solution for this? Wowza team?

Hello @Joshua Rubingh, since WebRTC is still in preview at Wowza and has limitations with certain browsers and encoders, I suggest we have technical support take a close look at your specific stream through a support ticket rather than in the community forum- this will allow us to better assist your specific scenario. We will be releasing updates to our WebRTC support very soon. Thank you Sir.

Ok, we did open a support ticket. Thanks