so it would appear that the only values that actually work are 0.0, 0.5, 1.0, and 2.0...
i tried setting it to 0.25 since I want it to play at 1/4th of the natural speed, but it played it at 1/2 of the natural speed instead. can anyone confirm this?
I found that smaller values are indeed supported, but all tracks in the AVPlayerItem have to support the speed. However, Apple does not provide a property on individual tracks that would indicate what rates are supported, there is only the property canPlaySlowForward on AVPlayerItem.
What i found is, that AVPlayerItems with an audio track cannot play at rates slower than 0.5. However, if there is only a video track, the rate can have an arbitrary small value like 0.01. I will try to write a category that checks on-the-fly which values are supported and disable unsupported tracks if needed.
br denis
UPDATE
I wrote a function which you can call whenever you want to set the rate for video below 0.5. It enables/disables all audio tracks.
Confirmed. I actually had a ticket with Apple DTS open for this issue and a bug filed. The only supported values are 0.50, 0.67, 0.80, 1.0, 1.25, 1.50, and 2.0. All other settings are rounded to nearest value.
The play rate restriction appears to be due to pitch correction, which is now configurable in iOS 7 or later.
That seems to be the default setting:
The other three algorithm settings let you vary the play rate down to 1/32. For example,
AVAudioTimePitchAlgorithmVarispeed
turns off pitch correction.No it's working fine for me ( xcode 4.2) on ipad 2 ios 5. I used the AVPlayerDemo from the dev resources and modify the rate property with a slider and it's very smooth, definitly no jumps. tho the behavior below 0.2 is odd. maybe the rate is not linear near the extrem values, but definitly smooth. from 0.2 all the way up to 2. I am using videos I captured with the device, that could make a difference.
Bye,
Jean
I agree with @otto, hi answer solved my problem.