• How to create Apple App Store compliant streams (audio only rendition)

    This article describes a method for instructing the Wowza media server to automatically generate a live and video on demand multi-bitrate stream for delivery to Apple iOS devices. This method supports single streams and SMIL-based streams. This feature makes it easier to get an application through the Apple App Store and to generate a 64 kbps or lower stream that complies with Apple App Store rules for 3G delivery.

    Contents


    Configuring a streaming application
    Generating a multi-bitrate audio stream for Apple devices
    Using SMIL files for multi-bitrate streams with audio-only items
    Improving bitrate switching between audio streams
    Related Articles

    Configuring a streaming application


    Configure your application for streaming using one of the following tutorials:


    Generating a multi-bitrate audio stream for Apple devices


    Add custom properties to the <LiveStreamPacketizer>/<Properties> path (live applications) and to the <HTTPStreamer>/<Properties> path (live and VOD applications).

    Wowza Streaming Engine Manager configuration

    Live applications


    1. In Wowza Streaming Engine Manager, click the Applications tab and then click the name of your live application (such as live) in the contents pane.

    2. On the live application page Properties tab, click Custom in the Quick Links bar.

      Note: Access to the Properties tab is limited to administrators with advanced permissions. For more information, see Manage credentials.
    3. In the Custom area, click Edit.

    4. Click Add Custom Property, specify the following settings in the Add Custom Property dialog box, and then click Add:

      • Path Select /Root/Application/LiveStreamPacketizer.

      • Name Enter cupertinoCreateAudioOnlyRendition.

      • Type Select Boolean.

      • Value Enter true.

    5. Click Save, and then restart the live application to apply the changes.

    Live and VOD applications


    1. In Wowza Streaming Engine Manager, click the Applications tab and then click the name of your application in the contents pane.

    2. On the application page Properties tab, click Custom in the Quick Links bar.

      Note: Access to the Properties tab is limited to administrators with advanced permissions. For more information, see Manage credentials.
    3. In the Custom area, click Edit.

    4. Click Add Custom Property, specify the following settings in the Add Custom Property dialog box, and then click Add:

      • Path Select /Root/Application/HTTPStreamer.

      • Name Enter cupertinoAutoCreateMultibitratePlaylist.

      • Type Select Boolean.

      • Value Enter true.

    5. Repeat the previous step to add the remaining custom properties using the following values:

      Path
      Name
      Type
      Value
      /Root/Application/HTTPStreamer cupertinoUseCalculatedVideoBitrate Boolean true
      /Root/Application/HTTPStreamer cupertinoUseCalculatedAudioBitrate Boolean true
      /Root/Application/HTTPStreamer cupertinoDefaultVideoBitrate Integer 250000
      /Root/Application/HTTPStreamer cupertinoMaxCalculatedVideoBitrate Integer 0
      /Root/Application/HTTPStreamer cupertinoDefaultAudioBitrate Integer 64000
      /Root/Application/HTTPStreamer cupertinoMaxCalculatedAudioBitrate Integer 64000
      /Root/Application/HTTPStreamer cupertinoBitrateAdjustmentFactor Integer 110

    6. Click Save, and then restart the application to apply the changes.

    XML configuration

    Live applications


    1. Use a text editor to open the [install-dir]/conf/[application]/Application.xml file for your live application and add the following property to the <LiveStreamPacketizer>/<Properties> container. Be sure to add the property to the correct <Properties> container in Application.xml as there are several such containers in the file.
      Code:
      <Property>
          <Name>cupertinoCreateAudioOnlyRendition</Name>
          <Value>true</Value>
          <Type>Boolean</Type>
      </Property>
    2. Restart the Wowza media server software to apply the changes.

    Live and VOD applications


    1. Use a text editor to open the [install-dir]/conf/[application]/Application.xml file for your application and add the following properties to the <HTTPStreamer>/<Properties> container. Be sure to add the properties to the correct <Properties> container in Application.xml as there are several such containers in the file.
      Code:
      <Property>
          <Name>cupertinoAutoCreateMultibitratePlaylist</Name>
          <Value>true</Value>
          <Type>Boolean</Type>
      </Property>
      <Property>
          <Name>cupertinoUseCalculatedVideoBitrate</Name>
          <Value>true</Value>
          <Type>Boolean</Type>
      </Property>
      <Property>
          <Name>cupertinoUseCalculatedAudioBitrate</Name>
          <Value>true</Value>
          <Type>Boolean</Type>
      </Property>
      <Property>
          <Name>cupertinoDefaultVideoBitrate</Name>
          <Value>250000</Value>
          <Type>Integer</Type>
      </Property>
      <Property>
          <Name>cupertinoMaxCalculatedVideoBitrate</Name>
          <Value>0</Value>
          <Type>Integer</Type>
      </Property>
      <Property>
          <Name>cupertinoDefaultAudioBitrate</Name>
          <Value>64000</Value>
          <Type>Integer</Type>
      </Property>
      <Property>
          <Name>cupertinoMaxCalculatedAudioBitrate</Name>
          <Value>64000</Value>
          <Type>Integer</Type>
      </Property>
      <Property>
          <Name>cupertinoBitrateAdjustmentFactor</Name>
          <Value>110</Value>
          <Type>Integer</Type>
      </Property>
    2. Restart the Wowza media server software to apply the changes.

    With this in place, the Wowza media server creates and packetizes an audio-only rendition of all incoming streams, which is available for use in any playlist. If you play any live or video on demand stream directly, the Wowza media server generates a multi-bitrate playlist with the two renditions. One rendition includes the audio and video and the other rendition is audio-only. As long as the audio portion of the live or video on demand stream is 64 kbps or less, the stream conforms to Apple App Store 3G rules.

    Note: When using a live stream repeater (origin/edge) configuration with this setup, be sure to set the LiveStreamPacketizers value on the edge to cupertinostreamingrepeater and set the above properties on both the origin and edge.

    Using SMIL files for multi-bitrate streams with audio-only items


    If you want to use Synchronized Multimedia Integration Language (SMIL) files to describe a multi-bitrate stream and use the audio from one of the live or video on demand streams as one of the playlist items, then you can add the <param name="audioOnly" value="TRUE" valuetype="data"/> statement to the <video> element in the SMIL file to select only the audio track. For example, if you have two live streams called hi-livestream and low-livestream and you want to create a three-stream, multi-bitrate playlist with the third rendition being the audio from low-livestream, the SMIL file should look like this:
    Code:
    <smil>
        <head>
        </head>
        <body>
            <switch>
                <video src="hi-livestream" system-bitrate="500000"/>
                <video src="lo-livestream" system-bitrate="250000"/>
                <video src="lo-livestream" system-bitrate="64000">
                    <param name="audioOnly" value="TRUE" valuetype="data"/>
                </video>
            </switch>
        </body>
    </smil>
    Similarly, for two file renditions in a multi-bitrate VOD presentation:
    Code:
    <smil>
        <head>
        </head>
        <body>
            <switch>
                <video src="hi-sample.mp4" system-bitrate="500000"/>
                <video src="lo-sample.mp4" system-bitrate="250000"/>
                <video src="lo-sample.mp4" system-bitrate="64000">
                    <param name="audioOnly" value="TRUE" valuetype="data"/>
                </video>
            </switch>
        </body>
    </smil>
    To test this, you can play the audio-only stream directly:

    http://[wowza-ip-address]:1935/[app-name]/[stream-name]/playlist.m3u8?wowzaaudioonly

    Improving bitrate switching between audio streams


    Bitrate switching between audio-only streams that are packetized as elementary audio streams and streams that are packetized as transport streams has changed since the release of iOS 6. To take advantage of improved bitrate switching and audio-only streams in Wowza Streaming Engine and in Wowza Media Server 3.5.1 and later, add the cupertinoPacketizeAllStreamsAsTS property to your application configuration.

    Wowza Streaming Engine Manager configuration

    Live applications


    1. In Wowza Streaming Engine Manager, click the Applications tab and then click the name of your live application (such as live) in the contents pane.

    2. On the live application page Properties tab, click Custom in the Quick Links bar.

      Note: Access to the Properties tab is limited to administrators with advanced permissions. For more information, see Manage credentials.
    3. In the Custom area, click Edit.

    4. Click Add Custom Property, specify the following settings in the Add Custom Property dialog box, and then click Add:

      • Path Select /Root/Application/LiveStreamPacketizer.

      • Name Enter cupertinoPacketizeAllStreamsAsTS.

      • Type Select Boolean.

      • Value Enter true.

    5. Click Save, and then restart the live application to apply the changes.

    Live and VOD applications


    1. In Wowza Streaming Engine Manager, click the Applications tab and then click the name of your application in the contents pane.

    2. On the application page Properties tab, click Custom in the Quick Links bar.

      Note: Access to the Properties tab is limited to administrators with advanced permissions. For more information, see Manage credentials.
    3. In the Custom area, click Edit.

    4. Click Add Custom Property, specify the following settings in the Add Custom Property dialog box, and then click Add:

      • Path Select /Root/Application/HTTPStreamer.

      • Name Enter cupertinoPacketizeAllStreamsAsTS.

      • Type Select Boolean.

      • Value Enter true.

    5. Click Save, and then restart the live application to apply the changes.

    XML configuration

    Live applications


    1. Use a text editor to open the [install-dir]/conf/[application]/Application.xml file for your live application and add the following property to the <LiveStreamPacketizer>/<Properties> container. Be sure to add the property to the correct <Properties> container in Application.xml as there are several such containers in the file.
      Code:
      <Property>
          <Name>cupertinoPacketizeAllStreamsAsTS</Name>
          <Value>true</Value>
          <Type>Boolean</Type>
      </Property>
    2. Restart the Wowza media server software to apply the changes.

    Live and VOD applications


    1. Use a text editor to open the [install-dir]/conf/[application]/Application.xml file for your application and add the following property to the <HTTPStreamer>/<Properties> container. Be sure to add the property to the correct <Properties> container in Application.xml as there are several such containers in the file.
      Code:
      <Property>
          <Name>cupertinoPacketizeAllStreamsAsTS</Name>
          <Value>true</Value>
          <Type>Boolean</Type>
      </Property>
    2. Restart the Wowza media server software to apply the changes.

    Related articles


    How to add poster frames to Apple HTTP streams (ID3 metadata) for App Store audio renditions (ModuleCupertinoLiveAttachPicture]

    How to do adaptive bitrate streaming

    Originally Published: 10-22-2010.
    Updated: For Wowza Streaming Engine on 03-26-2015.

    Comments 127 Comments
    1. mustihi83 -
      Hello,

      should LiveStreamPacketizer/Properties be added in a live-record application?

      should the HTTPStreamer/Properties be added in an on-demand application?

      and for the Smil file I was using <video src="iphone_satranc_tanitim.mp4" system-bitrate="31490" wowza-audio-only="true"/> syntax. Is it still valid?


      best,
      Mustafa
    1. rrlanham -
      Mustafa,

      LiveStreamPacketizers should be populated with one or more of the packetizers in a live-record application depending on your requirements. If you are only streaming to Flash clients, it can be left empty.

      HTTPStreamer is populated by default. You should leave that as-is for live and vod applications. You could make it empty if you are only streaming to Flash clients, but I don't think there is any benefit to doing so.

      Richard
    1. mustihi83 -
      Quote Originally Posted by rrlanham View Post
      Mustafa,

      LiveStreamPacketizers should be populated with one or more of the packetizers in a live-record application depending on your requirements. If you are only streaming to Flash clients, it can be left empty.

      HTTPStreamer is populated by default. You should leave that as-is for live and vod applications. You could make it empty if you are only streaming to Flash clients, but I don't think there is any benefit to doing so.

      Richard
      what about for streaming to iPhone?
    1. rrlanham -
      IPhone requires the cupertino packetizers. This info is included in all the tutorials.

      http://www.wowza.com/forums/content.php?4-tutorials

      Richard
    1. brayster99 -
      How do we link to this for testing without the SMIL set up?

      ie in the form

      http://localhost:1935/vod/sample.mp4/playlist.m3u8

      Thanks,

      Joe
    1. rrlanham -
      You can open a link with that form directly in the iOS browser, or you can use HTML5 video tag:

      Code:
      <html>
      <head> 
        <title>Cupertino Streaming</title>
      </head>
      
      <body>
      <video controls src="http://[wowza-address]:1935/vod/sample.mp4/playlist.m3u8">
      </video>
      
      </body>
      </html>
      Richard
    1. brayster99 -
      Quote Originally Posted by rrlanham View Post
      You can open a link with that form directly in the iOS browser, or you can use HTML5 video tag:

      Code:
      <html>
      <head> 
        <title>Cupertino Streaming</title>
      </head>
      
      <body>
      <video controls src="http://[wowza-address]:1935/vod/sample.mp4/playlist.m3u8">
      </video>
      
      </body>
      </html>
      Richard
      I think you've misread my question. I wanted this

      http://&#91;server-ip]:1935/live/myStrea...wowzaaudioonly

      found the answer in http://www.wowza.com/forums/showthread.php?9680

      I am trying to use this in combination with this http://www.wowza.com/forums/content.php?207 (poster frames) for ios.. any reason why this wouldnt work?

      Regards,

      Joe

      Thanks,

      Joe
    1. rrlanham -
      They are meant to work together, as noted in the article. Check the image name, it must match the stream name, case sensitive.

      Richard
    1. brayster99 -
      Thanks Richard,

      Its still not playing nice. I get the module to give onAppStart but nothing else.

      ----------


      INFO server comment - ModuleCupertinoLiveAttachPicture.onAppStart[vod/_definst_]
      INFO application app-start _definst_ vod/_definst_
      INFO cupertino connect 638773911 -
      INFO stream create sample.mp4 -
      INFO cupertino connect 149098552 -
      INFO stream create sample.mp4 -
      INFO server comment - MediaReaderH264Cupertino.handlePacket: Audio info[vod/_definst_/sample.mp4]: {AACFrame: size: 0, rate: 48000, channels: 2, samples: 1024, errorBitsAbsent: true, profileObjectType: "LC"}
      INFO stream play sample.mp4 -
      INFO stream destroy sample.mp4 -
      INFO cupertino disconnect 638773911 -

      -------


      Any ideas? Does the image need to be a certain size?
    1. brayster99 -
      I got it working for some images but not others, is there a logic to which?
    1. charlie -
      There is a size limit. I seem to remember seeing somthing on the iOS developer site that stated the supported frame sizes. I think the limit might be 200x200. I see that referenced in general here:

      http://www.dalepreston.com/Blog/2007...-pictures.html

      I have not found a definitive reference.

      Charlie
    1. melgeo -
      Hello, can the authors kindly check the guidelines for this example? I have done a fresh install and followed every single step but the audio-only does not stream on iPhone device. My Wowza version is 2.2.3 build26454 and I am encoding with FMLS 3.2.


      Here is some output to get an idea:
      $ lynx -dump http://wowza:1935/live/livestream/playlist.m3u8
      #EXTM3U
      #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=584773
      http://wowza:1935/live/livestream/pl...nid=1186635798


      $ lynx -dump http://wowza:1935/live/livestream/pl...wowzaaudioonly
      #EXTM3U
      #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=586162
      http://wowza:1935/live/livestream/pl...wowzaaudioonly


      Shouldn't there be one more stream for the 64K audio?

      NOTE: I just copied and pasted the config lines from the two tutorials "How to publish and play a live stream (RTMP or RTSP/RTP based encoder)" and "Adding Multi-bitrate Audio-only Rendition to iOS Streams (AppStore 64Kbps)" so I assume something is missing from the tutorials.
    1. rrlanham -
      The audio track must be a AAC. It doesn't work with MP3.

      Richard
    1. melgeo -
      It is AAC.
    1. rrlanham -
      Have you tried to play this directly?:

      Code:
      http://wowza:1935/live/livestream/playlist.m3u8?wowzaaudioonly
      Code:
      <html>
      <head> 
        <title>Cupertino Streaming</title>
      </head>
      <body>
      <video controls src="http://wowza:1935/live/livestream/playlist.m3u8?wowzaaudioonly">
      </video>
      </body>
      </html>
      Have you looked at the access and error logs for anything out of order?

      The guide is complete, many folks have followed it (including me) and implemented this.

      Richard
    1. brayster99 -
      The on-demand works fine. However the live crashes my QT player and the iphone barfs too.

      I've tried changing the AAC bitrate and still the same

      Wowza Media Server 2 Developer 2.1.2.07 build26027 gives no info error messages.

      Regards,

      Joe
    1. rrlanham -
      Joe,

      Do you have a link we can try? You can send to support@wowza.com with reference to this thread.

      Richard
    1. charlie -
      Move up to Wowza 2.2.3 and install the most recent developer build:

      http://www.wowza.com/forums/content....lopment-Builds

      I believe all of this is now fixed.

      Charlie
    1. BiggyTV1 -
      Hi-

      I am sorry I can't figure this out.

      I setup the Audio Only configuration for Live Streaming. I checked it with Apple's mediastreamvalidator and it works perfect!

      However, I used the same Application.xml from the vods3 application application and made a new application for VOD. I removed the Property as directed from the Livepacketizer/Properties.

      When I test as follows: mediastreamvalidator validate http://stream.biggytv.com/vodsda/266.../playlist.m3u8 An audioonly stream is not created.

      Here is the log

      3540157 2011-02-03 17:09:56 26659_AV0701_01.mp4 -
      3540156 2011-02-03 17:09:53 SDA2 {viewers: "0", viewersRTMP: "0", viewersCupertino: "0", viewersSmooth: "0", viewersRTSP: "0"}
      3540155 2011-02-03 17:09:43 SDA2 {viewers: "0", viewersRTMP: "0", viewersCupertino: "0", viewersSmooth: "0", viewersRTSP: "0"}
      3540154 2011-02-03 17:09:33 SDA2 {viewers: "0", viewersRTMP: "0", viewersCupertino: "0", viewersSmooth: "0", viewersRTSP: "0"}
      3540153 2011-02-03 17:09:30 - MediaReaderH264Cupertino.indexFile:java.lang.NullPointerException
      3540152 2011-02-03 17:09:30 26659_AV0701_01.mp4 MediaReaderH264.open[1]: java.io.IOException: MediaCacheRandomAccessReader.open: Item not in cache: 26659_AV0701_01.mp4
      3540151 2011-02-03 17:09:30 - MediaCache.createNewCachItem: Cannot find MediaCacheSource for (26659_AV0701_01.mp4).
      3540150 2011-02-03 17:09:30 - MediaCache.createNewCachItem: Cannot find MediaCacheSource for (26659_AV0701_01.mp4).
      3540149 2011-02-03 17:09:30 26659_AV0701_01.mp4 -
      3540148 2011-02-03 17:09:29 1823560513 -
      3540147 2011-02-03 17:09:29 - ModuleStreamNameAlias.nameToAlias[play]: streamName:26659_AV0701_01.mp4 alias:{pattern: "*" alias:"${Stream.Name}" wildcardMatches:{[0]: "26659_AV0701_01.mp4"}} result:26659_AV0701_01.mp4
    1. rrlanham -
      You should start with /conf/Application.xml. This has /StreamType "default", it is a basic Application.xml for vod streaming. Follow the guide to add audio-only rendition using this file.

      Richard