Extracting movie frames quickly in a 64-bit Cocoa app on Snow Leopard

丶灬走出姿态 提交于 2019-12-10 07:45:34

问题


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/quicktime-api@lists.apple.com/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.

来源:https://stackoverflow.com/questions/6672348/extracting-movie-frames-quickly-in-a-64-bit-cocoa-app-on-snow-leopard

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!