<!--
{
  "documentType" : "article",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/media-reading-and-writing",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Media reading and writing"
}
-->

# Media reading and writing

Read images from video, export to alternative formats, and perform sample-level reading and writing of media data.

## Topics

### Media export

[Exporting video to alternative formats](/documentation/AVFoundation/exporting-video-to-alternative-formats)

Convert an existing movie file to a different format.

[`AVAssetExportSession`](/documentation/AVFoundation/AVAssetExportSession)

An object that exports assets in a format that you specify using an export preset.

### Planned export

[`AVAssetWritingPlanner`](/documentation/AVFoundation/AVAssetWritingPlanner)

AVAssetWritingPlanner orchestrates incremental writing of media files.

[`AVAssetWritingPlannerProgress`](/documentation/AVFoundation/AVAssetWritingPlannerProgress)

AVAssetWritingPlannerProgress tracks the progress of incremental writing for each track in an AVAssetWritingPlanner session.

[`AVAssetTrackPlan`](/documentation/AVFoundation/AVAssetTrackPlan)

AVAssetTrackPlan holds information about a track and how it should be segmented and executed in an incremental writing session.

[`AVAssetVideoTrackPlan`](/documentation/AVFoundation/AVAssetVideoTrackPlan)

AVAssetVideoTrackPlan holds information about a track and how it should be segmented and executed in an incremental writing session.

[`AVPlannedSegmentConfiguration`](/documentation/AVFoundation/AVPlannedSegmentConfiguration)

AVPlannedSegmentConfiguration describes the requirements for a planned segment in an incremental writing session executed by the AVAssetWritingPlanner. Subclasses of this type that are used from Swift must fulfill the requirements of a Sendable type.

[`AVPlannedVideoSegmentConfiguration`](/documentation/AVFoundation/AVPlannedVideoSegmentConfiguration)

AVPlannedVideoSegmentConfiguration describes the requirements for a planned video segment in an incremental writing session executed by the AVAssetWritingPlanner.

[`AVPlannedSegmentWritingRequest`](/documentation/AVFoundation/AVPlannedSegmentWritingRequest)

AVPlannedSegmentWritingRequest encompasses a request from the AVAssetWritingPlanner to the client code to write one incremental track segment.

[`AVPlannedVideoSegmentWritingRequest`](/documentation/AVFoundation/AVPlannedVideoSegmentWritingRequest)

AVPlannedVideoSegmentWritingRequest encompasses a request from the AVAssetWritingPlanner to the client code to write one incremental video track segment with compression.

### Image generation

[Creating images from a video asset](/documentation/AVFoundation/creating-images-from-a-video-asset)

Display images for specific times within the media timeline by generating images from a video’s frames.

[`AVAssetImageGenerator`](/documentation/AVFoundation/AVAssetImageGenerator)

An object that generates images from a video asset.

### Media reading

[Reading multiview 3D video files](/documentation/AVFoundation/reading-multiview-3d-video-files)

Render single images for the left eye and right eye from a multiview High Efficiency Video Coding format file by reading individual video frames.

[`AVAssetReader`](/documentation/AVFoundation/AVAssetReader)

An object that reads media data from an asset.

[`AVAssetReaderOutput`](/documentation/AVFoundation/AVAssetReaderOutput)

An abstract class that defines the interface to read media samples from an asset reader.

[`AVAssetReaderTrackOutput`](/documentation/AVFoundation/AVAssetReaderTrackOutput)

An object that reads media data from a single track of an asset.

[`AVAssetReaderAudioMixOutput`](/documentation/AVFoundation/AVAssetReaderAudioMixOutput)

An object that reads audio samples that result from mixing audio from one or more tracks.

[`AVAssetReaderVideoCompositionOutput`](/documentation/AVFoundation/AVAssetReaderVideoCompositionOutput)

An object that reads composited video frames from one or more tracks of an asset.

[`AVAssetReaderSampleReferenceOutput`](/documentation/AVFoundation/AVAssetReaderSampleReferenceOutput)

An object that reads sample references from an asset track.

[`AVAssetReaderOutputMetadataAdaptor`](/documentation/AVFoundation/AVAssetReaderOutputMetadataAdaptor)

An object that creates timed metadata group objects for an asset track.

### Media writing

[Converting projected video to Apple Projected Media Profile](/documentation/AVFoundation/converting-projected-video-to-apple-projected-media-profile)

Convert content with equirectangular or half-equirectangular projection to APMP.

[Converting side-by-side 3D video to multiview HEVC and spatial video](/documentation/AVFoundation/converting-side-by-side-3d-video-to-multiview-hevc-and-spatial-video)

Create video content for visionOS by converting an existing 3D HEVC file to a multiview HEVC format, optionally adding spatial metadata to create a spatial video.

[Adding a display mask rectangle metadata track to a movie file](/documentation/AVFoundation/adding-a-display-mask-rectangle-metadata-track-to-a-movie-file)

Show a specific area of a video by using timed display mask rectangle metadata.

[Writing fragmented MPEG-4 files for HTTP Live Streaming](/documentation/AVFoundation/writing-fragmented-mpeg-4-files-for-http-live-streaming)

Create an HTTP Live Streaming presentation by turning a movie file into a sequence of fragmented MPEG-4 files.

  <doc://com.apple.documentation/documentation/ImageIO/Creating-spatial-photos-and-videos-with-spatial-metadata>

[Tagging media with video color information](/documentation/AVFoundation/tagging-media-with-video-color-information)

Inspect and set video color space information when writing and transcoding media.

[Evaluating an app’s video color](/documentation/AVFoundation/evaluating-an-app-s-video-color)

Check color reproduction for a video in your app by using test patterns, video test equipment, and light-measurement instruments.

[`AVOutputSettingsAssistant`](/documentation/AVFoundation/AVOutputSettingsAssistant)

An object that builds audio and video output settings dictionaries.

[`AVAssetWriter`](/documentation/AVFoundation/AVAssetWriter)

An object that writes media data to a container file.

[`AVAssetWriterInput`](/documentation/AVFoundation/AVAssetWriterInput)

An object that appends media samples to a track in an asset writer’s output file.

[`AVAssetWriterInputPixelBufferAdaptor`](/documentation/AVFoundation/AVAssetWriterInputPixelBufferAdaptor)

An object that appends video samples to an asset writer input.

[`AVAssetWriterInputTaggedPixelBufferGroupAdaptor`](/documentation/AVFoundation/AVAssetWriterInputTaggedPixelBufferGroupAdaptor)

An object that appends tagged buffer groups to an asset writer input.

[`AVAssetWriterInputMetadataAdaptor`](/documentation/AVFoundation/AVAssetWriterInputMetadataAdaptor)

An object that appends timed metadata groups to an asset writer input.

[`AVAssetWriterInputGroup`](/documentation/AVFoundation/AVAssetWriterInputGroup)

A group of inputs with tracks that are mutually exclusive to each other for playback or processing.

### Captions

[Caption authoring](/documentation/AVFoundation/caption-authoring)

Create captions and subtitles in industry-standard formats.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)