Video format for both iPhone and Android?

12,736

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
Share:
12,736

Related videos on Youtube

Euro N
Author by

Euro N

Updated on September 17, 2022

Comments

  • Euro N
    Euro N over 1 year

    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?

    Thanks

    • quack quixote
      quack quixote almost 14 years
      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.)
  • quack quixote
    quack quixote almost 14 years
    please stop telling people to go google. it's rude and uncalled for. link to your source, not google, and cut out the smartassery.
  • Gnoupi
    Gnoupi almost 14 years
    @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.
  • Euro N
    Euro N almost 14 years
    Thank you all - it worked, the video loads up, though the quality is really scaled down, will play around with the settings. Cheers!