Working with the Apple Media Stream Validator

Apple provides a Media Stream Validator tool that you might use to validate Apple HTTP Live Streaming (Apple HLS) videos. This topic describes some of the results you might receive from the Validator and what to do about them.

Apple describes the Media Stream Validator in Technical Note TN2235:

The Media Stream Validator (mediastreamvalidator) is a command-line tool to validate HTTP Live Streaming streams and servers.
This tool simulates an HTTP Live Streaming session and verifies that the index file and media segments conform to the HTTP Live Streaming specification. It performs several checks to ensure reliable streaming. If any errors or problems are found, a detailed diagnostic report is displayed. This technote provides an explanation of many of the common errors and warnings reported by the tool.

Using the Media Stream Validator

The Media Stream Validator is relevant only for Apple HLS renditions. Read Apple's Technical Note TN2235 for details about how to download and use this Apple tool. Read more about creating Apple HLS renditions for your videos in Video Cloud.

The Media Stream Validator is a command line tool. To use it to validate an Apple HLS video, from the command line, enter a command in this form:

mediastreamvalidator validate [URL of video master index file]

The URL of the video should be a fully-qualified URL of the master index file (.m3u8) of an Apple HLS video.

To get the URL of the master index file of a video in your Video Cloud media library, get the video ID of the video, which you can find in the Media module, and append it to this URL:

The mediastreamvalidator command with the video URL may look like this:

mediastreamvalidator validate

Note that there is a query argument after the .m3u8 file extension in the URL. This argument will not affect the behavior of the Media Stream Validator.

Errors and warnings received from the Media Stream Validator

Here are some errors you might receive from the Media Stream Validator. If you receive other errors from Apple HLS renditions created by Video Cloud, contact Customer Support.

Segment duration too short or too long

WARNING: Media segment exceeds target duration of 10.00 seconds by 1.31 seconds (segment duration is 11.31 seconds). This is a benign warning and will not prevent Apple app publishing. Apple HLS segments may exceed the target duration by a small amount without a problem.

In addition, you may receive warnings about very short segment durations. Since video durations are not necessarily evenly divisible by 10 second increments, you can expect the final segment to be shorter than 10 seconds and may be only a second or two or even less.

Segment duration is not finite

ERROR: Invalid media segment: (-1) segment duration is not finite. This error is an Apple known issue. Apple recommends that if you receive this error, you should file a bug report against the Media Stream Validator using the Apple Bug Reporter.

Audio-only renditions

Video streaming content over a cellular network longer than 10 minutes must use HTTP Live and include a baseline 64 kbps audio-only HTTP Live Stream. You may get this error using an audio bitrate of 64 kbps. The total bitrate of a rendition includes some overhead for the container itself. Reducing the bitrate of your audio-only rendition to 54 kbps or less should avoid this error message.

Related Topics