Question

how can I make AVPlayerLayer display the exact video's frame in method seekToTime.

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

Was it helpful?

Solution

You can use [AVPlayer seekToTime: toleranceBefore: toleranceAfter:] to get random media access with higher precision.
To get the highest precision possible, pass kCMTimeZero as argument for both tolerances. Note that this might add noticeable delay during seeks.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top