How can I implement a delegate that is triggered for every frame in a locally stored video? I tried AVCaptureVideoDataOutputSampleBufferDelegate but it isn’t working for locally stored videos. Is there any other to do this, or can I use a virtual AVCaptureDevice?
How can I implement a delegate that is triggered for every frame in a
Share
AVCapture__ methods are all meant for camera-type things, which a movie file on disk most certainly is not.
I suspect what you are really looking for is something like the “
AVPlayerItemVideoOutput” class, which came in with iOS 6.0.While it has a delegate protocol, I haven’t yet used this new object or protocol and I don’t know if the delegate methods such as “
outputSequenceWasFlushed” will actually be useful for your purposes). One thing about theAVPlayerItemVideoOutputclass is that it like you can get at the pixel buffer for those items (i.e. which, for movies, would be frames).