MPMoviePlayerController playing movies in reverse (backwards) is not smooth in iPhone App

后端 未结 2 1629
故里飘歌
故里飘歌 2021-01-03 13:37

I am developing an iPhone application where I need to reverse a video playback. I am currently using XCode 4.2. I am trying to play a movie in reverse with the MPMoviePlayer

相关标签:
2条回答
  • 2021-01-03 13:38

    Try this with AVPlayer

     avPlayer.rate=-1.0f;
    

    This will set the rate to -ve,hence playing the video in reverse smoothly. :)

    0 讨论(0)
  • 2021-01-03 14:04

    I tried to do the same in AVFoundation. I had to work it quite a lot before I managed to get it to work.

    What I did was to generate image, reverse the order, put them in to an assetWriter, export the video and then play it.

    You can download my code here: https://github.com/mikaelhellqvist/ReverseClip

    0 讨论(0)
提交回复
热议问题