iOS Developer Library

Developer

AVFoundation Framework Reference AVCaptureMovieFileOutput Class Reference

Options
Deployment Target:

On This Page
Language:

AVCaptureMovieFileOutput

AVCaptureMovieFileOutput is a concrete sub-class of AVCaptureFileOutput you use to capture data to a QuickTime movie. More...

Inheritance


Conforms To


Import Statement


import AVFoundation @import AVFoundation;

Availability


Available in iOS 4.0 and later.
  • Indicates the number of seconds of output that are written per fragment.

    Declaration

    Swift

    var movieFragmentInterval: CMTime

    Objective-C

    @property(nonatomic) CMTime movieFragmentInterval

    Discussion

    The default is 10 seconds. Set to kCMTimeInvalid to disable movie fragment writing (not typically recommended).

    A QuickTime movie is comprised of media samples and a sample table identifying their location in the file. A movie file without a sample table is unreadable.

    In a processed file, the sample table typically appears at the beginning of the file. It may also appear at the end of the file, in which case the header contains a pointer to the sample table at the end. When a new movie file is being recorded, it is not possible to write the sample table since the size of the file is not yet known. Instead, the table is must be written when recording is complete. If no other action is taken, this means that if the recording does not complete successfully (for example, in the event of a crash), the file data is unusable (because there is no sample table). By periodically inserting “movie fragments” into the movie file, the sample table can be built up incrementally. This means that if the file is not written completely, the movie file is still usable (up to the point where the last fragment was written).

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 4.0 and later.

  • metadata metadata Property

    The metadata for the output file.

    Declaration

    Swift

    var metadata: [AnyObject]!

    Objective-C

    @property(nonatomic, copy) NSArray *metadata

    Discussion

    The array contains AVMetadataItem objects. You use this array to add metadata such as copyright, creation date, and so on, to the recorded movie file.

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 4.0 and later.