• How to use the Apple media stream validator tool (mediastreamvalidator)

    Instructions to get the Apple HTTP Streaming validator tool for iOS devices.

    This tool requires:
    • Apple ID
    • Apple iPhone Developer Account
    • Apple Mac OS


    1. Go to http://connect.apple.com and login using your developer credentials
    2. Uncheck all the categories except for the iOS category
    3. Download and install the HTTP Live Streaming Tools package
    4. You will also need Wowza Media Server installed


    Once you have it installed you can run the tool with the command:

    Code:
    video on demand:
    mediastreamvalidator [playlist-url]
    
    live:
    mediastreamvalidator --timeout=60 [playlist-url]
    For example:

    Code:
    video on demand:
    mediastreamvalidator http://mycompany.com:1935/vod/mp4:sample.mp4/playlist.m3u8
    
    live:
    mediastreamvalidator --timeout=60 http://mycompany.com:1935/live/myStream/playlist.m3u8
    Note: For older versions of the tool the command line format is:
    [code]mediastreamvalidator validate [playlist-url]

    The following is a link to an article that describes the various error and warning messages that can be reported by the mediastreamvalidator: http://developer.apple.com/library/i...35/_index.html


    Comments 17 Comments
    1. mustihi83 -
      When I validate my playlist I get such warnings. What can I do to solve it?

      Code:
      WARNING: Timestamps are too spread out across the variant playlists, with a maximum spread of 21.45 seconds and a maximum target duration of 10 seconds (threshold is twice that number).
      
      WARNING: INF tag with duration 2 seconds or more above the playlist's target duration (10.000 seconds).
      10:    #EXTINF:21,
    1. rrlanham -
      Try encoding with a 2 second key frame frequency. Or, you can add Cupertino properties, modify cupertinoChunkDurationTarget so that the key frame frequency is a factor of cupertinoChunkDurationTarget. See this guide:

      http://www.wowzamedia.com/forums/con...arameters-(iOS)

      Richard
    1. evilpenguin -
      Hi,

      I'm not getting any errors, but the test produces a repeating output that doesn't seem to end:

      Validating http://10.10.110.34:1935/liverepeate.../playlist.m3u8 against iOS 5.0
      Validating child playlist http://10.10.110.34:1935/liverepeate...onid=414655781 [250.00 kbit/s]
      Validating child playlist http://10.10.110.34:1935/liverepeate...onid=414655781 [64.00 kbit/s]
      Child playlist http://10.10.110.34:1935/liverepeate...onid=414655781 is a live stream
      Child playlist http://10.10.110.34:1935/liverepeate...onid=414655781 is a live stream
      Child playlist http://10.10.110.34:1935/liverepeate...onid=414655781 is a live stream
      Child playlist http://10.10.110.34:1935/liverepeate...onid=414655781 is a live stream
      Child playlist http://10.10.110.34:1935/liverepeate...onid=414655781 is a live stream
      Child playlist http://10.10.110.34:1935/liverepeate...onid=414655781 is a live stream
      Child playlist http://10.10.110.34:1935/liverepeate...onid=414655781 is a live stream
      Child playlist http://10.10.110.34:1935/liverepeate...onid=414655781 is a live stream
      Child playlist http://10.10.110.34:1935/liverepeate...onid=414655781 is a live stream
      Child playlist http://10.10.110.34:1935/liverepeate...onid=414655781 is a live stream
      Child playlist http://10.10.110.34:1935/liverepeate...onid=414655781 is a live stream
      Child playlist http://10.10.110.34:1935/liverepeate...onid=414655781 is a live stream
      Child playlist http://10.10.110.34:1935/liverepeate...onid=414655781 is a live stream
      Child playlist http://10.10.110.34:1935/liverepeate...onid=414655781 is a live stream
      Child playlist http://10.10.110.34:1935/liverepeate...onid=414655781 is a live stream
      Child playlist http://10.10.110.34:1935/liverepeate...onid=414655781 is a live stream
      Child playlist http://10.10.110.34:1935/liverepeate...onid=414655781 is a live stream
      Child playlist http://10.10.110.34:1935/liverepeate...onid=414655781 is a live stream
      Child playlist http://10.10.110.34:1935/liverepeate...onid=414655781 is a live stream
      Child playlist http://10.10.110.34:1935/liverepeate...onid=414655781 is a live stream
      Child playlist http://10.10.110.34:1935/liverepeate...onid=414655781 is a live stream
      Child playlist http://10.10.110.34:1935/liverepeate...onid=414655781 is a live stream
      I don't get it, does that mean the stream is ok, or not? What kind of output should the test produce?

      Thanks,
    1. rrlanham -
      Did you set the --timeout flag?

      Code:
      mediastreamvalidator validate --timeout=60 [playlist-url]
      Richard
    1. evilpenguin -
      Nope, I just gave it the playlist URL. Should I have?
    1. rrlanham -
      Take a look at the guide:
      http://www.wowzamedia.com/forums/con...treamvalidator)

      Richard
    1. evilpenguin -
      What is the timeout for and what should be the output of the tool if the playlist is ok? It doesn't say either...

      And by the way, I can't install the validator on Lion, because it says I must have OS X 10.6... Any ideas for that?

    1. rrlanham -
      You can find out by doing.

      I don't know about the Lion install problem.

      Richard
    1. evilpenguin -
      I understand now, so the way to go is adding a timeout. I got the following output:

      mediastreamvalidator validate --timeout=60 http://10.10.110.80:1935/myapp/myins.../playlist.m3u8
      Validating http://10.10.110.80:1935/myapp/myins.../playlist.m3u8 against iOS 5.0
      Validating child playlist http://10.10.110.80:1935/myapp/myins...nid=2095989339 [250.00 kbit/s]
      Validating child playlist http://10.10.110.80:1935/myapp/myins...nid=2095989339 [64.00 kbit/s]
      Child playlist http://10.10.110.80:1935/myapp/myins...nid=2095989339 is a live stream
      Child playlist http://10.10.110.80:1935/myapp/myins...nid=2095989339 is a live stream
      Child playlist http://10.10.110.80:1935/myapp/myins...nid=2095989339 is a live stream
      Child playlist http://10.10.110.80:1935/myapp/myins...nid=2095989339 is a live stream
      Child playlist http://10.10.110.80:1935/myapp/myins...nid=2095989339 is a live stream
      Child playlist http://10.10.110.80:1935/myapp/myins...nid=2095989339 is a live stream
      Child playlist http://10.10.110.80:1935/myapp/myins...nid=2095989339 is a live stream
      Child playlist http://10.10.110.80:1935/myapp/myins...nid=2095989339 is a live stream
      Child playlist http://10.10.110.80:1935/myapp/myins...nid=2095989339 is a live stream
      Child playlist http://10.10.110.80:1935/myapp/myins...nid=2095989339 is a live stream
      Child playlist http://10.10.110.80:1935/myapp/myins...nid=2095989339 is a live stream
      Child playlist http://10.10.110.80:1935/myapp/myins...nid=2095989339 is a live stream

      WARNING: Child playlist validated with warnings. A detailed report for the playlist follows this report.
      http://10.10.110.80:1935/myapp/myins...nid=2095989339

      -------------------------------------------------------------------------------------------------------------------------------
      REPORT FOR CHILD PLAYLIST 'http://10.10.110.80:1935/myapp/myinstance/mystream/playlist.m3u8?wowzasessionid=2095989339'
      -------------------------------------------------------------------------------------------------------------------------------

      WARNING: Media segment bitrate outside of target playlist bitrate by 700.000 % (2099432 vs. 250000 bps, limit is 10 %).
      6: media_2417.ts?wowzasessionid=2095989339
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      WARNING: Media segment bitrate outside of target playlist bitrate by 700.000 % (2136576 vs. 250000 bps, limit is 10 %).
      8: media_2418.ts?wowzasessionid=2095989339
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      WARNING: Media segment bitrate outside of target playlist bitrate by 700.000 % (2167560 vs. 250000 bps, limit is 10 %).
      10: media_2419.ts?wowzasessionid=2095989339
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      WARNING: Media segment bitrate outside of target playlist bitrate by 700.000 % (2157784 vs. 250000 bps, limit is 10 %).
      8: media_2420.ts?wowzasessionid=2095989339
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      WARNING: Media segment bitrate outside of target playlist bitrate by 700.000 % (2140488 vs. 250000 bps, limit is 10 %).
      10: media_2421.ts?wowzasessionid=2095989339
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      WARNING: Media segment bitrate outside of target playlist bitrate by 700.000 % (2158992 vs. 250000 bps, limit is 10 %).
      10: media_2422.ts?wowzasessionid=2095989339
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      WARNING: Media segment bitrate outside of target playlist bitrate by 700.000 % (2121840 vs. 250000 bps, limit is 10 %).
      10: media_2423.ts?wowzasessionid=2095989339
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      WARNING: Media segment bitrate outside of target playlist bitrate by 700.000 % (2145904 vs. 250000 bps, limit is 10 %).
      10: media_2424.ts?wowzasessionid=2095989339
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      WARNING: Media segment bitrate outside of target playlist bitrate by 700.000 % (2141392 vs. 250000 bps, limit is 10 %).
      10: media_2425.ts?wowzasessionid=2095989339
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      Average segment duration: 10.00 seconds
      Playlist target bitrate: 250.00 kbit/s
      Average segment bitrate: 2.14 Mbit/s (88.32 % of target)
      Average segment structural overhead: 80.08 kbit/s (3.74 %)

      Video codec: avc1
      Video resolution: 720x576 pixels
      Video frame rate: 24.94, 24.76, 25.09 fps
      Average video bitrate: 1.99 Mbit/s
      H.264 profile: Baseline
      H.264 level: 3.0

      Audio codec: aac
      Audio sample rate: 48000 Hz
      Average audio bitrate: 66.54 kbit/s

      ----------------------------------------------------------------------------------------------------------------------------------------------
      REPORT FOR CHILD PLAYLIST 'http://10.10.110.80:1935/myapp/myinstance/mystream/playlist.m3u8?wowzaaudioonly&wowzasessionid=209598 9339'
      ----------------------------------------------------------------------------------------------------------------------------------------------

      Average segment duration: 10.00 seconds
      Playlist target bitrate: 64.00 kbit/s
      Average segment bitrate: 66.60 kbit/s (3.90 % of target)

      Audio codec: aac
      Audio sample rate: 48000 Hz
      How is the playlist target bitrate set and how can I modify it?
    1. evilpenguin -
      Ok, I've looked at the config, I've seen I can modify this property:

      Code:
                      <Property>
                          <Name>cupertinoDefaultVideoBitrate</Name>
                          <Value>250000</Value>
                          <Type>Integer</Type>
                      </Property>
      However, I have multiple streams, of multiple bandwidths. Can't Wowza calculate the size of each stream?

      What does this property do?

      Code:
                      <Property>
                          <Name>cupertinoMaxCalulatedVideoBitrate</Name>
                          <Value>0</Value>
                          <Type>Integer</Type>
                      </Property>
    1. evilpenguin -
      VOD streams seem to work better, provided they have a 64kb audio track. I still get these warnings, though:

      WARNING: EXTINF tag duration exceeds target duration by 8.000 seconds.
      6: #EXTINF:18,
      ~~

      WARNING: EXTINF tag duration exceeds target duration by 4.000 seconds.
      8: #EXTINF:14,
      ~~

      WARNING: EXTINF tag duration exceeds target duration by 5.000 seconds.
      10: #EXTINF:15,
      ~~
    1. charlie -
      Follow instructions in these two articles:

      http://www.wowza.com/forums/content....ppStore-64Kbps)
      http://www.wowza.com/forums/content....to-iOS-Streams

      Also, be sure you key frame interval in the encoder is set to 2 seconds.

      We have addressed all of this in Wowza Server 3.

      Charlie
    1. evilpenguin -
      Hi, Charlie,

      Thanks, I missed the second article previously. Now it seems to have eliminated all the errors similar to "Media segment bitrate outside of target playlist bitrate by 700.000 %" in the video playlist item.

      However, the audio only playlist item still has those warnings. Am I to assume that for audio only to have 64k, I must encode the audio stream at 64k? Can I have a primary stream at 128k and a secondary stream at 64k and specify to load the second stream in the audio only rendition?

      Also, I'm not sure what you mean with 2 sec keyframe interval. Are you saying that for live or VOD? I read in an article that the cupertinoChunkDurationTarget should be multiple of GOP size, but I haven't seen anywhere that GOP size must pe 2 sec...
    1. evilpenguin -
      Quote Originally Posted by evilpenguin View Post
      However, the audio only playlist item still has those warnings. Am I to assume that for audio only to have 64k, I must encode the audio stream at 64k? Can I have a primary stream at 128k and a secondary stream at 64k and specify to load the second stream in the audio only rendition?
      Nevermind, I found this addon that does the trick: http://www.wowza.com/forums/content....tify-interface

      I'm still getting some warnings about chunk size, though...

      WARNING: EXTINF tag duration exceeds target duration by 4.000 seconds.
      754: #EXTINF:20,
      ~~

      WARNING: EXTINF tag duration exceeds target duration by 4.000 seconds.
      756: #EXTINF:20,
      ~~

      WARNING: EXTINF tag duration exceeds target duration by 4.000 seconds.
      758: #EXTINF:20,
      ~~

      WARNING: EXTINF tag duration exceeds target duration by 4.000 seconds.
      760: #EXTINF:20,
      ~~

      WARNING: EXTINF tag duration exceeds target duration by 4.000 seconds.
      762: #EXTINF:20,
      ~~
    1. charlie -
      The key frame interval of the encoder needs to be a multiple of 10 seconds. So something like 2 seconds between key frames will fix this.

      C
    1. stjernstrom -
      I could not find Streaming Tools from connect.apple.com but i found them here instead: http://developer.apple.com/resources/http-streaming/Cheers!
    1. rrlanham -
      Looks like you have to go to same page when you click the tools link.

      Richard