Is there a format that plays both on iPhone and Android?

I have been trying to encode videos in MP4 using ffmpeg - however, using libx264 or mpeg4 - the videos either only work in Android, or in iPhone - never both.

Is this possible? If yes, what would the parameters be?


  • 1
    to close-voters: please note this question is on-topic, as it is asking about how to encode videos (on a computer) for use on a device. (it may however be a duplicate.) Jun 9 '10 at 8:03

From this post:

Both the iPhone and Google Android phones seem to have limited codec support when it comes to video. Both support MP4, so I did a bit of searching on the internet to find out how to convert to a suitable format using MPlayer's MEncoder.

Video cannot have a high compression rate, and the video size generally needs to be scaled down to 480:352. The video codec used here is x264 with a bitrate of 512.

mencoder <inputfile> -o <outputfile>.mp4 \
  -vf dsize=480:352:2,scale=-8:-8,harddup \
  -oac faac -faacopts mpeg=4:object=2:raw:br=128 \
  -of lavf -lavfopts format=mp4 -ovc x264 -sws 9 \
  -x264encopts nocabac:level_idc=30:bframes=0:bitrate=512:threads=auto:turbo=1:global_header:threads=auto:subq=5:frameref=6:partitions=all:trellis=1:chroma_me:me=umh
  • 5
    please stop telling people to go google. it's rude and uncalled for. link to your source, not google, and cut out the smartassery. Jun 9 '10 at 12:33
  • 1
    @quack - to add to your point, searching for "iphone android mp4 ffmpeg", as he suggested, now brings this very question on third place. @taspeotis - this is why it's stupid to answer people to "search on Google", on these sites. Just provide an answer if you have one, as it will become one of the most read for people searching exactly what you suggested. Think about it.
    – Gnoupi
    Jun 9 '10 at 12:53
  • Thank you all - it worked, the video loads up, though the quality is really scaled down, will play around with the settings. Cheers!
    – Euro N
    Jun 10 '10 at 4:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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