Workaround way to play video .mov file in iOS app? Also associated with Adobe Flash Animations

After examining lots in StackOverflow and Class iOS links, MPMoviePlayerController cannot play .mov video files. AVPlayer can play .mov files, but there are no controls.

I want my application to play .mov files because Adobe Flash Animation provides .mov as the cleanest and most native video. If I convert the same video to mp4 (formats supported), there is quality loss even when I turn the video speed up to 100MB / s and high quality video.

Ironically, QuickTime is Apple's intellectual property and its products do not support .mov video files.

How can I get around this problem?

+3


source to share


1 answer


MPMoviePlayerController (and iOS in general) supports .mov files. See the article Class Documentation, Supported Formats section . But only a limited number of video codecs are supported.

Deceptively, the Quicktime ".mov" format is not a video codec, but rather an audio / video container format that can contain video and audio (and some other stuff) in any number of compression codecs (h.264, mpeg2, ProRes, MJPEG, AAC, mp3 etc.)

Your files are not working because they include compressed video with a codec that iOS does not support (maybe PhotoJPEG if they are Flash animations?). You can check the format of your videos by opening them in Quicktime Player on Mac OS X and clicking Show Video Inspector from the Window menu.

It is not possible to add support for additional codecs to the native iOS video playback system (MPMoviePlayerController and Friends). This leaves two options;



  • Compressing files for compatibility
  • Use a different video playback structure.

You say that you have already tried to recompress the files, but this is still the best option. I recommend that you try re-compressing your files with Handbrake . The h.264 codec is capable of excellent results (see BluRay Movies, iTunes Movie store, etc.).

If you really need to play animations in their current format, you will need to use a different video playback environment. I suggest you take a look at libVLC and VLCKit from the excellent VideoLan project (I'm having trouble accessing the pages of a VLCKit project, but a fork is available here ). Keep in mind that non-native video playback will likely not be hardware accelerated and will therefore eat up your users' batteries.

Last, if your videos are short and quiet ... maybe an animated GIF option?

+5


source







All Articles