Video format for both iPhone and Android?

6

3

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

Euro N

Posted 2010-06-08T08:32:44.787

Reputation: 63

1to 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 – 2010-06-09T08:03:41.060

Answers

3

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

ta.speot.is

Posted 2010-06-08T08:32:44.787

Reputation: 13 727

5please stop telling people to go google. it's rude and uncalled for. link to your source, not google, and cut out the smartassery. – quack quixote – 2010-06-09T12:33:25.390

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 – 2010-06-09T12:53:24.617

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 – 2010-06-10T04:59:11.130