1

I wanted to play the video 5 times slower (mp4 video, local file), to get slowmotion effect, but it simply does not work. For values above 1.0, for example 2.0f, it works correctly, playing the video 2 times faster.

This is the code I used to play video on 20% speed:

[_player prepareToPlay];
[_player play];
[_player setCurrentPlaybackRate:0.2f];

With this code, video plays on normal rate (1.0f), ignoring my 0.2f value.

iOS 6.1.3 XCode 4.6.2

Testing on device.

Hello World
  • 115
  • 1
  • 9

1 Answers1

0

It definitely matters when you call

[_player setCurrentPlaybackRate:0.2f];

I've run into similar issues. I have setup a UISlider to manage the playback speed. If I change the speed while the video is actually playing it does in fact change the speed. However, if I pause it and then hit the play button again, it reverts to standard 1x speed. Even if I use

MPMoviePlayerPlaybackStateDidChangeNotification

to listen for the playing update and then call

[_player setCurrentPlaybackRate:x.xx];.

I believe the player sets its own value with the play mechanic, I'm trying to figure out a work around currently to get this to update to my UISlider value when play is hit. Currently it's overriding the value for whatever reason.

Though this isn't a complete solution, I hope this helps you move forward.

Robert
  • 5,278
  • 43
  • 65
  • 115
David Hegner
  • 101
  • 1
  • 6