Stuttering audio on jwplayer in Safari and iOS using HLS transport streams

Hi

We’re streaming audio over HLS using JWPlayer. To make audio streaming work on different browsers, we use TS packeting as described here:

https://www.wowza.com/docs/how-to-configure-wowza-server-to-stream-audio-only-apple-hls-using-transport-stream

This works fine on some files, but on other we get extreme stuttering.

Specifically we see problems on a file with the following properties:

Input #0, mp3, from ‘8/f/5/0/8f501f19-a87c-42ac-a81c-cb26b96cc0a4.mp3’:

  Metadata:
    encoder         : Lavf53.31.100
  Duration: 00:04:00.06, start: 0.000000, bitrate: 96 kb/s
    Stream #0:0: Audio: mp3, 22050 Hz, stereo, s16, 96 kb/s

However, we see no problems with a file with these properties:

  Metadata:
    encoder         : Lavf53.31.100
  Duration: 00:05:59.70, start: 0.000000, bitrate: 96 kb/s
    Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16, 96 kb/s

We are using Wowza 4.5.0.

The relevant changes in Application.xml are the following:

                <HTTPStreamer>
                        <!-- Properties defined here will override any properties defined in conf/HTTPStreamers.xml for any HTTPStreamer loaded by this applications -->
                        <Properties>
+                               <Property>
+                                       <Name>cupertinoPacketizeAllStreamsAsTS</Name>
+                                       <Value>true</Value>
+                                       <Type>Boolean</Type>
+                               </Property>
+                                <Property>
+                                        <Name>cupertinoChunkDurationTarget</Name>
+                                        <Value>30000</Value>
+                                        <Type>Integer</Type>
+                                </Property>
                        </Properties>
                </HTTPStreamer>

Any insights are welcome.

I have worked with the Wowza support team on this issue.

The conclusion was: “MP3 that has this lower sample rate does not have enough data to properly fill the packets for playback on iOS and Safari OSX playback when using TS packetization.”

The recommendation is to either avoid TS packetization for OSX/iOS, use a higher sample rate, or use AAC encoding.

Hello,

Thank you for contacting Wowza Forums!

Just by looking at each audio files specs, I see one thing that sticks out, the audio sample rates are different? The one with issues is lower than the one without issues. Can you make sure the audio sample rates are the same and see if you get the same results?

Regards,

Jermaine

I am using Wowza 4.6 and having a similar issue, but I’m using AAC.

Audio codec: mp4a.40.2. Sampling frequency: 8000Hz. Sampling frequency(Extension): 0Hz. Channel layout: 2.

The audio streams fine on any browser that support Media Source Extensions. However, on Safari using OSX/iOS the audio will begin cutting in and out, or stop completely, after approximately 30-45 minutes. I’ve confirmed through network capture that .ts segments are being received and there are no errors on the browser side. Audio simply stops. I’ve replicated this with several HTML5 HLS players.

Has anyone experienced this before? Any recommendations from Wowza?

Thank you for looking into this.

I have opened a support ticket where we are discussing this. It seems that low-frequency constant bit rate mp3 streams have trouble streaming to Apple-products but only when using TS packetizing.

We have implemented a workaround where we do not use TS packetizing for Apple-products, but do it everywhere else. Of course this requires browser detection, which is not ideal.

I will update this thread with the final outcome of the support ticket.

Hello,

Since we have resolved this in our ticket system by recommending that iOS audio only be delivered through default HLS packetization when the sample rate of the MP3 content is below 44100kHz, I wanted to reply here and share this recommendation on this thread.

Regards.

Jason Hatchett