How to find the start and end duration of “Selected frames” from a video using the didFinishPickingMediaWithInfo file?

I am doing slow motion in audio and video using AVFoundation (for video) and Dirac (audio). As part of this, I will show the video as frames in which the user will select frames for slow motion. For example: 5-6 minutes 10 minutes of video.

I need to show users two types of video 1. through a VCR from my application itself. 2. from the gallery.

Case1: no problem Now I can record video, although my VCR, and show the video as frames for selection by the user. As soon as the user selects several frames (for example: from 5 to 6 minutes from 10 minutes of the recorded video), using the code below, I can find the start / end duration of the selected frames or video.

NSNumber *start = [info objectForKey:@"_UIImagePickerControllerVideoEditingStart"]; NSNumber *end = [info objectForKey:@"_UIImagePickerControllerVideoEditingEnd"]; int startMilliseconds = ([start doubleValue] * 1000); int endMilliseconds = ([end doubleValue] * 1000); 

Case 2: In this case, I can select a video from the gallery and show them to the user as frames for selection. However, when I try to find the start / end duration of the video as , I did in case 1 with the same code, but did not work . I always get "0" for start / end.

+7
ios objective-c iphone avfoundation uiimagepickercontroller
source share
1 answer

Take a look at the new additions to AVFoundation in iOS 7, as it now supports auto-slowdown for video and audio. It can change your approach and the best decision.

+1
source share

All Articles