解决方法是在iOS应用中播放视频.mov文件?也与Adobe Flash动画有关 [英] Workaround playing a video .mov file in iOS app? Also related to Adobe Flash Animations

查看:174
本文介绍了解决方法是在iOS应用中播放视频.mov文件?也与Adobe Flash动画有关的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在大量研究StackOverflow和类引用之后,iOS MPMoviePlayerController无法播放.mov视频文件.AVPlayer可以播放.mov文件,但没有控件.

After researching lots on StackOverflow and Class References, iOS MPMoviePlayerController cannot play .mov video files. AVPlayer can play .mov files but there are no controls.

我希望我的应用播放.mov文件,因为Adobe Flash Animation提供了.mov作为最干净自然的视频.如果将同一视频转换为mp4(受支持的格式),即使将视频速率设置为100 MB/s并获得最高质量的视频,质量也会下降.

I want my app to play .mov files, because Adobe Flash Animation provides .mov as the cleanest and native looking video. If I convert the same video to mp4 (supported formats) there is loss in quality, even when I turn the video rate to 100 MB/s and highest quality video.

具有讽刺意味的是,QuickTime是Apple的知识产权,其产品不支持.mov视频文件.

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

如何解决此问题?

推荐答案

MPMoviePlayerController(通常是iOS)不支持.mov文件.请参阅Apple的类文档的受支持的格式"部分.但是仅支持有限数量的视频编解码器.

MPMoviePlayerController (and iOS in general) does support .mov files. See Apple's class documentation, section "Supported Formats". But only a limited number of video codecs are supported.

从表面上看,Quicktime".mov"格式不是视频编解码器,而是音频/视频容器格式,可以包含任意数量的压缩编解码器(h.264,mpeg2,ProRes,MJPEG,AAC,mp3等)

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

您的文件不起作用,因为它们包含使用iOS不支持的编解码器压缩的视频(如果它们是Flash动画,则可能是PhotoJPEG).您可以通过在Mac OS X上的Quicktime Player中打开视频并在窗口"菜单中单击显示电影检查器"来检查视频的格式.

Your files don't work because they include video compressed with a codec which 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 Movie Inspector" in the Window menu.

不可能向本机iOS视频播放系统(MPMoviePlayerController和朋友)添加对其他编解码器的支持.这留下了两个选择.

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

  • 重新压缩文件以使其兼容
  • 使用其他视频播放框架.

您说您已经尝试过重新压缩文件,但这仍然是最佳选择.我鼓励您尝试使用 Handbrake 重新压缩文件.h.264编解码器具有出色的效果(请参阅BluRay电影,iTunes电影商店等)

You say you have already tried recompressing the files, but this is still the best option. I encourage you to try recompressing the files with Handbrake. The h.264 codec is capable of excellent results (see BluRay movies, the iTunes Movie store, etc.)

如果确实必须以当前格式播放动画,则需要使用其他视频播放框架.我建议您从优秀的VideoLan项目中查看libVLC和VLCKit(我在访问VLCKit项目页面时遇到问题,但在这里有一个叉子).请注意,非本机视频播放很可能无法通过硬件加速,因此会消耗用户的电池.

If you really must play back your animations in their current format, you'll need to use another video playback framework. I suggest you look at libVLC and VLCKit from the excellent VideoLan project (I'm having problems accessing the VLCKit project pages, but a fork is available here). Be aware, non-native video playback will very likely not be hardware accelerated and so will eat your users' batteries.

最后一件事,如果您的视频短而寂静,那么可以选择动画GIF吗?

One last thing, if your videos are short and silent… might animated GIF be an option?

这篇关于解决方法是在iOS应用中播放视频.mov文件?也与Adobe Flash动画有关的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆