I am writing video based social app for iOS and android(WinPhone is under waiting). I recorded video in mov format using AVFoundation framework on the iPhone and uploaded it to the server. It can be downloaded and played on the iPhone client. But on the android device, downloaded video can not be played since it's format is not supported on the android. What is the best solution of the video record and play for supporting multiple mobile devices platforms?
Asked
Active
Viewed 1.3k times
11
-
transcoding to some common format http://developer.android.com/guide/appendix/media-formats.html – zapl Oct 03 '12 at 00:44
-
@zapl, Thanks for your quick answer. So do you recommend transcoding on the android side? – ttotto Oct 03 '12 at 00:49
2 Answers
9
- Blog post @Why Apple Is Winning the Mobile Video Format War...For Now
- Android uses the
flash
plugin, and apple usesHLS
- Today’s wide usage of the HLS protocol is a result of iOS success. Apple designated the protocol as the one and only way to stream video to an
iOSDevice
. NoFlash
, noSilverlight
, noRTP
orRTSP
.
- Android uses the
- Q&A post @Best format for Mobile Video states
MPEG-4
will play on all mobile phones (at least those capable)- it also plays while buffers vs .mov which requires the whole movie to download first before playing.
- StackOverflow post @Video Format that Works on Mobile Phones
- I haven't come a cross one single mobile that doesn't support the
MPEG-4
container format, including blackberry. - We tested a variety of Android devices and all of the recent models (Android 2.2/2.3) do support
MPEG 4/H.264
, the same goes for iPhone and AFAIK the Windows Phone.
- I haven't come a cross one single mobile that doesn't support the
- Software Product info @Choosing a movie format
- If it needs to play back on mobile devices. Choose
MPEG-4
format can be played back on iDevices and Android phones. - Alot more info can be found @Choosing a movie format
- If it needs to play back on mobile devices. Choose
- Acceleration of MPEG-4 applications @FZi Forshcungzentrum INformatik
- The whole
MPEG-4
encoding/decoding process is partitioned between the standard processor, which is controlling the system and executes control-intensive algorithms, and its XPP coprocessor, which executes the computational-intensive data-flow algorithms and sends the results back to the host processor.
- The whole
From this information, I suggest you convert to the MPEG-4
format.
Mac app-store free video converters:

Community
- 1
- 1

SkylerHill-Sky
- 2,106
- 2
- 17
- 33
-
thanks for your kindly answer. btw MP4 encoding is very, very processing intensive, right? – ttotto Oct 03 '12 at 01:41
-
-
I added a link, so, it might be a little processing intensive, but is definitely worth the outcome – SkylerHill-Sky Oct 03 '12 at 01:48
-
Thanks. For recording to .mp4 file on the iPhone using AVFoundation Framework, do you know how can I do this? I tried to add extension ".mp4", but it is always mov file. – ttotto Oct 03 '12 at 02:36
-
-
-
Oh, you mean the device to convert it. Well, you'll have to find out, please report back when you do. – SkylerHill-Sky Oct 03 '12 at 14:09
-
Use AVFileTypeMPEG4 instead of AVFileTypeQuickTimeMovie when recording using AVAssetWriter. Not sure how you would setup MPMoviePlayer or other video recorder component to use MP4. Keep in mind that a MOV movie file produced by an iOS device will be identical to the MP4 file. The MP4 specification is a subset of the MOV file specification. It only the media type inside the container that matters for compatibility across devices. H.264/AAC is a good choice for compatibility across mobile devices. – Steve McFarlin Oct 03 '12 at 22:31
0
ffmpeg -i infile.mov -vcodec copy outfile.mp4
This will repackage the mov file to mp4 without transcoding. It is very fast. The resulting file is compatible with both android and iphone. Of course the best solution would be to record mp4 on the iphone in the first place. Yes you can do that.

gtsouk
- 5,208
- 1
- 28
- 35