UIVideoEditorController Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/UIKit.framework
Availability
Available in iOS 3.1 and later.
Declared in
UIVideoEditorController.h

Overview

A UIVideoEditorController object, or video editor, manages the system-supplied user interface for trimming video frames from the start and end of a previously recorded movie as well as reencoding to lower quality. The object manages user interactions and provides the filesystem path of the edited movie to your delegate object (see UIVideoEditorControllerDelegate Protocol Reference). The features of the UIVideoEditorController class are available only on devices that support video recording.

Use a video editor when your intent is to provide an interface for movie editing. While the UIImagePickerController class also lets a user trim movies, its primary roles are choosing saved pictures and movies, and capturing new pictures and movies.

Tasks

Determining Editing Availability

Configuring the Editor

Properties

delegate

The video editor’s delegate object.

@property(nonatomic,assign) id <UINavigationControllerDelegate, UIVideoEditorControllerDelegate> delegate
Discussion

The delegate receives a notification when the system has finished saving an edited movie or when the user cancels the video editor. The delegate also decides when to dismiss the editor interface, so you must provide a delegate to use a video editor. If this property is nil, the editor is dismissed immediately if you try to show it. The delegate protocol is described in UIVideoEditorControllerDelegate Protocol Reference.

Availability
  • Available in iOS 3.1 and later.
Declared In
UIVideoEditorController.h

videoMaximumDuration

The maximum duration, in seconds, permitted for trimmed movies saved by the video editor.

@property(nonatomic) NSTimeInterval videoMaximumDuration
Discussion

The system-enforced maximum duration for a video recording is 10 minutes; you can set this value to 10 minutes or less. The default value for this property is also 10 minutes.

The video editor user interface forces the user to trim a loaded movie to fit within this property’s value prior to saving.

Availability
  • Available in iOS 3.1 and later.
Declared In
UIVideoEditorController.h

videoPath

The filesystem path to the movie to be loaded by the video editor.

@property(nonatomic, copy) NSString *videoPath
Availability
  • Available in iOS 3.1 and later.
Declared In
UIVideoEditorController.h

videoQuality

The video quality to use when saving a trimmed movie.

@property(nonatomic) UIImagePickerControllerQualityType videoQuality
Discussion

The available video qualities are described in the “UIImagePickerControllerQualityType” in UIImagePickerController Class Reference enumeration. The default value for this property is UIImagePickerControllerQualityTypeLow.

If a user attempts to reencode a movie to a higher quality, the movie is saved at its existing quality. Reencoding never increases movie dimensions, frame rate, or bit rate.

Availability
  • Available in iOS 3.1 and later.
Declared In
UIVideoEditorController.h

Class Methods

canEditVideoAtPath:

Returns a Boolean value indicating whether a video file can be edited.

+ (BOOL)canEditVideoAtPath:(NSString *)videoPath
Parameters
videoPath

The filesystem path to the video file you want to edit.

Return Value

YES if the specified video file can be edited on the current device or NO if it cannot.

Discussion

Video editing requires the presence of specific hardware and is available only for specific file formats. Use this method to check whether video editing is available for a given video file, before you create a video editor.

Availability
  • Available in iOS 3.1 and later.
Declared In
UIVideoEditorController.h