QuickTime BYTE_RANGE_ERROR_MESSAGE Error MP4 video

This article describes how to resolve the QuickTime BYTE_RANGE_ERROR_MESSAGE on the iPhone/iPad when playing back MP4 streaming videos.

Problem

When playing an MP4 video in H264 encoding on the iPhone or iPad, a broken video icon (play icon with a slash through it) appears and you can not play the video or audio. This assumes you are trying to open the MP4 file directly via link, and that it is not embedded in a flash player or HTML5 video tag. In this case, the iPhone/iPad attempts to play the file using Quicktime.

Identification

To identify the problem, follow these steps:

On your iPhone, go to Settings > Safari > Developer > Debug Console and set it to Enabled.

Switch to Safari and reload the video file.

You will see 1 error, under Other Tips, Quicktime, BYTE_RANGE_ERROR_MESSAGE.

Solution

Quicktime relies on byte range HTTP requests, and the web server and all intermediaries need to be able to support this type of request. Quicktime uses this to support features like allowing the user to start playback in the middle of the file, before the entire file is downloaded.

The web server sends a Accept-Ranges: bytes header, and can then process requests for ranges of bytes within the file. Any mechanism which is blocking this type of request will cause the BYTE_RANGE_ERROR_MESSAGE.

Byte-range requests are associated with some types of denial of service attacks, and some security policies may therefore disable or limit the ability for the web server to service these requests.

Check your firewall and/or router to see if it is blocking byte-range requests. There may be a setting in the administration to disable this policy.

Your web server may have byte-range requests disabled. For example, due to security bulletin CVE-2011-3192 for older versions of Apache, the apache.conf file may have been modified with settings like the one below: