在 Snow Leopard 上的 64 位 Cocoa 应用程序中快速提取电影帧
我在 Snow Leopard 上编写了一个 64 位 Cocoa 应用程序,用于提取单个帧 使用 QuickTime API 从电影中获取。它使用[QTMovie currentFrameImage], 不幸的是,它非常慢,正如这里指出的:
https: //stackoverflow.com/questions/5843702/export-every-frame-from-a-movie-using-quicktime-api
Apple 的开发者网站描述了以下替代方法: QTPixelBufferContext使用NewMovieFromProperties创建:
http://developer.apple.com/library /mac/#qa/qa1443/_index.html
使用这种方法,我编写了一个 32 位应用程序,能够提取 帧速率要快得多,但 API 似乎 (例如 QTVisualContextRef)不适用于 64 位应用程序,正如所指出的 在这里:
http://www .mailinglistarchive.com/html/[电子邮件受保护]/2009-01/msg00014.html
和此处:
错误:“QTVisualContextRef”之前预期的说明符限定符列表
我的应用程序需要是 64 位,所以我正在寻找另一种提取方法 快速帧。目前有没有人使用框架完成此任务 雪豹上可用吗?
编辑:
我没有找到在雪豹上快速提取帧的方法,但我确实找到了 一种使用 Lion 上的 AV Foundation 来实现此目的的方法。 AV 基金会已可用 适用于 iOS,但它对于从 Lion 开始的 Mac OS 来说是新的。一个很好的描述 如何使用 AV Foundation 快速提取帧可以在 找到7twenty7com。
I wrote a 64-bit Cocoa app on Snow Leopard that extracts individual frames
from a movie using the QuickTime API. It uses [QTMovie currentFrameImage],
which unfortunately is very slow, as was pointed out here:
https://stackoverflow.com/questions/5843702/export-every-frame-from-a-movie-using-quicktime-api
Apple's developer site describes the following alternative method using
QTPixelBufferContextCreate with NewMovieFromProperties:
http://developer.apple.com/library/mac/#qa/qa1443/_index.html
Using this approach, I wrote a 32-bit app that was able to extract the
frames at a much faster rate, but it appears that the API
(e.g. QTVisualContextRef) is not available to 64-bit apps, as was pointed
out here:
http://www.mailinglistarchive.com/html/[email protected]/2009-01/msg00014.html
and here:
Error: expected specifier-qualifier-list before 'QTVisualContextRef'
My app needs to be 64-bit, so I am seeking another alternative for extracting
frames quickly. Has anyone accomplished this using the frameworks currently
available on Snow Leopard?
Edit:
I did not find a way to extract frames quickly on Snow Leopard, but I did find
a way to do it using AV Foundation on Lion. AV Foundation has been available
for iOS, but it is new for Mac OS starting with Lion. A good description of
how to extract frames quickly using AV Foundation can be found at 7twenty7com.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论