views:

151

answers:

2

I am trying to extract an image frame from a video taken from iPhone camera using ffmpeg. But it usually throws me a EXEC_BAD_ACCESS and the stacktrace is showing in another method calls that is never called (I know my code didn't call it)

I am using the ffmpeg built from the instruction of the iFrameExtractor website. If anybody do it successfully, please help me or if possible, send me some codes. I don't know why it crashes, although it works well on the simulator (which I manually import a video into the library). My guess is that ffmpeg cannot decode the iPhone video camera correctly.

I already tried to use all 3 sets of library files like arvm6, arvm7 and i386 but doesn't work. My iPhone is 3gs. My iphone sdk is 3.1.3

+1  A: 

Why would you use ffmpeg? You can extract frames using the AVFoundation framework in iOS4. It's faster and easier to use.

Can you paste in your stack trace and possibly the code you are using to read the frames?

Elfred
Sorry for not mentioning, my application is still in iOS 3.1.3
vodkhang
+1  A: 

I think it is my fault in calling the VideoFrameExtractor. The example code doesn't work well. I have to change from videoExtractor.currentImage to [videoExtractor currentImage]

vodkhang
Strange! Found any reasons for it?
Raj