AVfoundation Reverse Video

2.3k views Asked by At

I tried to make video in reverse. While playing asset in AVPlayer i set the rate = -1 to make it work in reverse format. But how to export that video? I looked into docs. read about avassetwrite, sambuffers , compositions but didn't find any way to do this. Below links are refered by me

http://www.raywenderlich.com/13418/how-to-play-record-edit-videos-in-ios

Reverse video demo - https://github.com/mikaelhellqvist/ReverseClip

Above example to no longer works in IOS 8. and even it is not reversing audio. If anyone give me little hint on it then i can do further. I am stuck up here from last 5 days but didn't find any answer in docs.

1

There are 1 answers

0
kolinko On

You'll probably have to play around with AVAssetExportSession ( MOV to Mp4 video conversion iPhone Programmatically ) - if it won't work, then your option will be to use AVAssetReader and AVAssetWriter and reverse the frames inbetween (don't know about the sound though).