AVPlayer seekToTime only generates a frame every second

how can I make the AVPlayerLayerexact video frame display in a method seekToTime.

Now [AVPlayer seekToTime:CMTimeMakeWithSeconds(CMTimeGetSeconds(A, B))], it AVPlayerLayerdisplays only a frame at every 1 second change, for example 1.50-2.50-3.50. I want it to display the frame at 4.45 seconds, for example. Is it possible?

+3
source share
1 answer

You can use [AVPlayer seekToTime: toleranceBefore: toleranceAfter:] to gain random access to media with higher accuracy.
For maximum accuracy, pass kCMTimeZeroas an argument for both tolerances. Please note that this can lead to a noticeable delay during the search.

+7
source

All Articles