Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have converted my source.flv video into target.mp4 (h.264 format) by using following command:

ffmpeg -i source.flv -r 25 -b:a 128k -strict -2 -c:v libx264 -preset slow -s 320x240 -b:v 768k -ar 44100 -c:a aac target.mp4;

The target.mp4 video is playing in my computer browser's but it's not playing on the iPhone / iPad when I host my video on an Amazon EC2 instance.

The same target.mp4 video is playing in my computer browser's as well as the iPhone / iPad when I host it some place else.

QuickTime shows the following error when I try opening the video from the EC2 instance:

share|improve this question
up vote 4 down vote accepted

Finally we got the actual solution for 'Why our mp4(h.264)' videos are not playing in iphone . The solution is : remove or comment compress.conf file from httpd.conf(apache server config file).

Compress.conf file is used to compress output before send it to client , If you don't want to remove compress.conf than you may comment few lines inside compress.conf. Comment

# Load the filter module

SetEnv filter-errordocs true

FilterDeclare comp-resp

# Compress everything except for images, audio and video

#FilterProvider comp-resp DEFLATE resp=Content-Type !/^(image|audio|video)//

#FilterProtocol comp-resp change=yes

share|improve this answer

In order to stream video to these QuickTime / Apple devices, the server sends out an Accept-Ranges: bytes header. This indicates to the player that it can request certain parts of the video by sending a byte offset, which allows you to, for instance, begin streaming from the middle of a video without having to download the entire file.

Usually this works by default. However, byte range requests can also be considered a security risk, for example when a Denial of Service attack is launched against the server. For this reason, byte range requests may be blocked along the way, either through a router or firewall, or by the EC2 server itself, which would lead to the error message you're seeing.

Therefore, check the connection for possible blocked requests, or consider contacting EC2 support.

See also:

share|improve this answer
i have contacted Amazon development support and waiting for their reply. Until their reply come, i am also doing some google search and found "qt-faststart". Is it useful in my case(i,e progressive downloading in iPhone/iPad) ?? – Shishir Mudliyar Nov 27 '12 at 6:42
While not entirely related to your issues, using qt-faststart to move the moov atom to the beginning of your MP4 files is definitely encouraged for all kinds of streaming. See: Understanding the MPEG-4 movie atom | Adobe Developer Connection – slhck Nov 27 '12 at 6:47
The following are the headers from EC2 instance that we observed through liveheaders in firefox. [GET /tmp/race.mp4 HTTP/1.1 Host: User-Agent: Mozilla/5.0 (X11; Linux i686; rv:16.0) Gecko/20100101 Firefox/16.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Connection: keep-alive ] [HTTP/1.1 200 OK Server: Apache/2.2.15 (CentOS) Etag: "1e15b2-4cf6375252c50" Accept-Ranges: bytes Content-Length: 1971634 Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: video/mp4] – Shishir Mudliyar Nov 29 '12 at 5:58
And also not getting comprehensive reply from amazon support team , i am working with amazon support to get the appropriate solution – Shishir Mudliyar Nov 29 '12 at 6:03
Well, that merely tells you that the server will allow Accept-Ranges: bytes, so yeah, it must be blocked along the way. – slhck Nov 29 '12 at 6:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.