I'm loading an mp4 video into an AVPlayerLayer, and placing it in a superlayer whose speed is set to 0 (see why below). Video playback stutters badly. Once per second the player outputs a 3-4 frames.
The video roughly follows wall time, so its master clock is good, I think.
I profiled it, and the main thread is idle except for once per second. Also, once per second, some bytes are read from disk even though I preloaded the tracks (weird).
On a whim, I tried advancing the movie manually on a 10ms timer by calling seekToTime on the AVPlayer. I verified that the timer is called every 10ms, but the AVPlayerLayer still updated only once per second.
Is there any way to get AVPlayer to output frames in a more timely manner? Should I abandon AVPlayer in favor of Core Video and manually output frames?
The reason the backing layer's speed is set to 0 is that I've set up several other views in addition to the AVPlayerLayer, and applied path CoreAnimations to them. A UIPanGestureRecognizer drives the backing layer's time, resulting in user-driven animation.
Note that playback stutters even when not panning.