如何从iPhone SDK中的视频中提取屏幕截图? [英] How do I extract a screenshot from a video in the iPhone SDK?

查看:162
本文介绍了如何从iPhone SDK中的视频中提取屏幕截图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想能够以设定的间隔拍摄使用iPhone摄像头录制的MPEG的屏幕截图。

I'd like to be able to take a screenshot of an MPEG recorded using the iPhone camera at set intervals.

我看过几种方法这个;即编译和使用FFmpeg(将FFMPEG库与iPhone SDK一起使用于视频编码),但是似乎很难遵守LGPL( http://ffmpeg.org /legal.html )供商业使用。

I've seen a few ways to do this; namely compiling and using FFmpeg (Using FFMPEG library with iPhone SDK for video encoding), however it seems it's quite difficult to comply with the LGPL (http://ffmpeg.org/legal.html) for commercial use.

这个合同条款对我们来说无济于事:

This term of the contract pretty much makes it useless to us:

Q :将整个FFmpeg核心整合到我自己的商业产品中是否完美无缺?

Q: Is it perfectly alright to incorporate the whole FFmpeg core into my own commercial product?

A :这里可能有问题。有些公司在其产品中使用了FFmpeg。这些公司发现,一旦您开始尝试通过专利技术赚钱,专利所有者将会获得许可费用。值得注意的是,MPEG LA对收集MPEG相关技术保持警惕并努力。

A: You might have a problem here. There have been cases where companies have used FFmpeg in their products. These companies found out that once you start trying to make money from patented technologies, the owners of the patents will come after their licensing fees. Notably, MPEG LA is vigilant and diligent about collecting for MPEG-related technologies.

还有其他方法吗? - 或者只是通过访问MPEG的渲染层,我将从专利技术赚钱?

Is there any other way? - or simply by accessing the rendering layer of an MPEG am I going to be "making money from patented technologies"?

像往常一样 - 对此的任何帮助将不胜感激。

As usual - any help on this would be greatly appreciated.

欢呼!

推荐答案

是的,你可以做到 - 如果我没有错,自从iOS 3.2 ...至少对你的图书馆上的影片。在MPMoviePlayerController对象上载入影片后,请执行此操作

Yes, you can do it - if I am not wrong, since iOS 3.2... at least for the videos you have on your library. After loading the movie on your MPMoviePlayerController object, do this

UIImage *aThumbnail = [player thumbnailImageAtTime:timeCode timeOption:MPMovieTimeOptionExact];

//timeCode is a time within de video length, for example: 3.12 seconds.
//player is the MPMoviePlayerController object.

这篇关于如何从iPhone SDK中的视频中提取屏幕截图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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