<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVError-swift.struct",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "s:SC7AVErrorLeV"
  },
  "title" : "AVError"
}
-->

# AVError

A structure that defines the errors that framework operations can generate.

```
struct AVError
```

## Topics

### Error domain

[`errorDomain`](/documentation/AVFoundation/AVError-swift.struct/errorDomain)

### Error codes

[`AVError.Code`](/documentation/AVFoundation/AVError-swift.struct/Code)

An enumeration that defines the errors that framework operations can generate.

[`airPlayControllerRequiresInternet`](/documentation/AVFoundation/AVError-swift.struct/airPlayControllerRequiresInternet)

The AirPlay controller requires an internet connection to function.

[`airPlayReceiverRequiresInternet`](/documentation/AVFoundation/AVError-swift.struct/airPlayReceiverRequiresInternet)

The AirPlay receiver requires an internet connection to function.

[`airPlayReceiverTemporarilyUnavailable`](/documentation/AVFoundation/AVError-swift.struct/airPlayReceiverTemporarilyUnavailable)

An AirPlay receiver is temporarily unavailable.

[`applicationIsNotAuthorizedToUseDevice`](/documentation/AVFoundation/AVError-swift.struct/applicationIsNotAuthorizedToUseDevice)

The user denied this app permission to capture media.

[`applicationIsNotAuthorized`](/documentation/AVFoundation/AVError-swift.struct/applicationIsNotAuthorized)

The app isn’t authorized to play media.

[`autoWhiteBalanceNotLocked`](/documentation/AVFoundation/AVError-swift.struct/autoWhiteBalanceNotLocked)

[`compositionTrackSegmentsNotContiguous`](/documentation/AVFoundation/AVError-swift.struct/compositionTrackSegmentsNotContiguous)

The composition can’t add the source media because it contains gaps.

[`contentIsNotAuthorized`](/documentation/AVFoundation/AVError-swift.struct/contentIsNotAuthorized)

The user isn’t authorized to play the media.

[`contentIsProtected`](/documentation/AVFoundation/AVError-swift.struct/contentIsProtected)

The app isn’t authorized to open the media.

[`contentIsUnavailable`](/documentation/AVFoundation/AVError-swift.struct/contentIsUnavailable)

The captured content is unavailable.

[`contentKeyRequestCancelled`](/documentation/AVFoundation/AVError-swift.struct/contentKeyRequestCancelled)

The app canceled a request to retrieve a content key.

[`contentNotUpdated`](/documentation/AVFoundation/AVError-swift.struct/contentNotUpdated)

The system couldn’t update the captured content.

[`createContentKeyRequestFailed`](/documentation/AVFoundation/AVError-swift.struct/createContentKeyRequestFailed)

The app couldn’t create a content key request.

[`decodeFailed`](/documentation/AVFoundation/AVError-swift.struct/decodeFailed)

The system failed to decode the media.

[`decoderNotFound`](/documentation/AVFoundation/AVError-swift.struct/decoderNotFound)

The system can’t find a suitable decoder for the media.

[`decoderTemporarilyUnavailable`](/documentation/AVFoundation/AVError-swift.struct/decoderTemporarilyUnavailable)

A suitable decoder for the media is temporarily available.

[`deviceAlreadyUsedByAnotherSession`](/documentation/AVFoundation/AVError-swift.struct/deviceAlreadyUsedByAnotherSession)

Your app can’t access the device because another session is currently using it.

[`deviceInUseByAnotherApplication`](/documentation/AVFoundation/AVError-swift.struct/deviceInUseByAnotherApplication)

Your app can’t access the device because another app is currently using it.

[`deviceLockedForConfigurationByAnotherProcess`](/documentation/AVFoundation/AVError-swift.struct/deviceLockedForConfigurationByAnotherProcess)

Your app can’t change device settings because another process currently controls the device.

[`deviceNotConnected`](/documentation/AVFoundation/AVError-swift.struct/deviceNotConnected)

You app can’t access the device because it isn’t connected.

[`deviceWasDisconnected`](/documentation/AVFoundation/AVError-swift.struct/deviceWasDisconnected)

A previously connected device is no longer accessible.

[`diskFull`](/documentation/AVFoundation/AVError-swift.struct/diskFull)

Recording stopped because the disk is full.

[`displayWasDisabled`](/documentation/AVFoundation/AVError-swift.struct/displayWasDisabled)

Screen capture failed because the display was inactive.

[`encodeFailed`](/documentation/AVFoundation/AVError-swift.struct/encodeFailed)

The system couldn’t encode the media data.

[`encoderNotFound`](/documentation/AVFoundation/AVError-swift.struct/encoderNotFound)

The requested encoder isn’t found.

[`encoderTemporarilyUnavailable`](/documentation/AVFoundation/AVError-swift.struct/encoderTemporarilyUnavailable)

An appropriate encoder isn’t currently available.

[`exportFailed`](/documentation/AVFoundation/AVError-swift.struct/exportFailed)

The requested export operation failed.

[`externalPlaybackNotSupportedForAsset`](/documentation/AVFoundation/AVError-swift.struct/externalPlaybackNotSupportedForAsset)

The current asset doesn’t support playback.

[`failedToLoadMediaData`](/documentation/AVFoundation/AVError-swift.struct/failedToLoadMediaData)

The system can’t load the requested media data.

[`failedToLoadSampleData`](/documentation/AVFoundation/AVError-swift.struct/failedToLoadSampleData)

The system can’t load the requested sample data.

[`failedToParse`](/documentation/AVFoundation/AVError-swift.struct/failedToParse)

The system can’t parse the media.

[`fileAlreadyExists`](/documentation/AVFoundation/AVError-swift.struct/fileAlreadyExists)

A file with the same name exists at the location and you can’t overwrite it.

[`fileFailedToParse`](/documentation/AVFoundation/AVError-swift.struct/fileFailedToParse)

The file is corrupt or in an unrecognized format.

[`fileFormatNotRecognized`](/documentation/AVFoundation/AVError-swift.struct/fileFormatNotRecognized)

The system can’t open the file because it’s in an unrecognized format.

[`fileTypeDoesNotSupportSampleReferences`](/documentation/AVFoundation/AVError-swift.struct/fileTypeDoesNotSupportSampleReferences)

The file type doesn’t support sample references.

[`followExternalSyncDeviceTimedOut`](/documentation/AVFoundation/AVError-swift.struct/followExternalSyncDeviceTimedOut)

[`formatUnsupported`](/documentation/AVFoundation/AVError-swift.struct/formatUnsupported)

The current asset format isn’t supported.

[`incompatibleAsset`](/documentation/AVFoundation/AVError-swift.struct/incompatibleAsset)

You can’t display the media because the device isn’t capable of playing the content.

[`incorrectlyConfigured`](/documentation/AVFoundation/AVError-swift.struct/incorrectlyConfigured)

The system is incorrectly configured for the requested operation.

[`invalidCompositionTrackSegmentDuration`](/documentation/AVFoundation/AVError-swift.struct/invalidCompositionTrackSegmentDuration)

You can’t add the source media because its duration in the destination is invalid.

[`invalidCompositionTrackSegmentSourceDuration`](/documentation/AVFoundation/AVError-swift.struct/invalidCompositionTrackSegmentSourceDuration)

You can’t add the source media because it has no duration.

[`invalidCompositionTrackSegmentSourceStartTime`](/documentation/AVFoundation/AVError-swift.struct/invalidCompositionTrackSegmentSourceStartTime)

You can’t add the source media because its start time in the destination is invalid.

[`invalidOutputURLPathExtension`](/documentation/AVFoundation/AVError-swift.struct/invalidOutputURLPathExtension)

The path extension of the output URL is invalid.

[`invalidSampleCursor`](/documentation/AVFoundation/AVError-swift.struct/invalidSampleCursor)

An invalid sample cursor produced an error.

[`invalidSourceMedia`](/documentation/AVFoundation/AVError-swift.struct/invalidSourceMedia)

The system couldn’t read the source media.

[`invalidVideoComposition`](/documentation/AVFoundation/AVError-swift.struct/invalidVideoComposition)

You attempted to present an unsupported video composition.

[`malformedDepth`](/documentation/AVFoundation/AVError-swift.struct/malformedDepth)

The depth data isn’t properly structured.

[`maximumDurationReached`](/documentation/AVFoundation/AVError-swift.struct/maximumDurationReached)

The recording stopped because it reached the file’s maximum duration.

[`maximumFileSizeReached`](/documentation/AVFoundation/AVError-swift.struct/maximumFileSizeReached)

The recording stopped because it reached the file’s maximum size.

[`maximumNumberOfSamplesForFileFormatReached`](/documentation/AVFoundation/AVError-swift.struct/maximumNumberOfSamplesForFileFormatReached)

The recording stopped because it reached the file’s maximum number of samples.

[`maximumStillImageCaptureRequestsExceeded`](/documentation/AVFoundation/AVError-swift.struct/maximumStillImageCaptureRequestsExceeded)

Your app can’t take a photo because there are too many unfinished photo capture requests.

[`mediaChanged`](/documentation/AVFoundation/AVError-swift.struct/mediaChanged)

Recording stopped because the format of the source media changed.

[`mediaDiscontinuity`](/documentation/AVFoundation/AVError-swift.struct/mediaDiscontinuity)

Recording stopped because there was an interruption in the input media.

[`mediaExtensionConflict`](/documentation/AVFoundation/AVError-swift.struct/mediaExtensionConflict)

[`mediaExtensionDisabled`](/documentation/AVFoundation/AVError-swift.struct/mediaExtensionDisabled)

[`mediaServicesWereReset`](/documentation/AVFoundation/AVError-swift.struct/mediaServicesWereReset)

The system couldn’t perform the operation because media services were unavailable.

[`noCompatibleAlternatesForExternalDisplay`](/documentation/AVFoundation/AVError-swift.struct/noCompatibleAlternatesForExternalDisplay)

The system found no compatible external displays.

[`noDataCaptured`](/documentation/AVFoundation/AVError-swift.struct/noDataCaptured)

The recording failed because the system received no data.

[`noImageAtTime`](/documentation/AVFoundation/AVError-swift.struct/noImageAtTime)

No image is available in the media at the indicated time.

[`noLongerPlayable`](/documentation/AVFoundation/AVError-swift.struct/noLongerPlayable)

The asset is no longer playable.

[`noSmartFramingsEnabled`](/documentation/AVFoundation/AVError-swift.struct/noSmartFramingsEnabled)

[`noSourceTrack`](/documentation/AVFoundation/AVError-swift.struct/noSourceTrack)

The asset doesn’t contain a source track.

[`operationCancelled`](/documentation/AVFoundation/AVError-swift.struct/operationCancelled)

The asset handled a request to cancel loading a property value asynchronously.

[`operationInterrupted`](/documentation/AVFoundation/AVError-swift.struct/operationInterrupted)

An interruption occurred while performing a reading or writing operation.

[`operationNotAllowed`](/documentation/AVFoundation/AVError-swift.struct/operationNotAllowed)

The requested operation isn’t allowed.

[`operationNotSupportedForAsset`](/documentation/AVFoundation/AVError-swift.struct/operationNotSupportedForAsset)

Your app attempted to perform an unsupported operation with the asset.

[`operationNotSupportedForPreset`](/documentation/AVFoundation/AVError-swift.struct/operationNotSupportedForPreset)

Your app attempted to perform an unsupported operation for the current preset.

[`outOfMemory`](/documentation/AVFoundation/AVError-swift.struct/outOfMemory)

The operation couldn’t finish because there isn’t enough memory available to process the media.

[`recordingAlreadyInProgress`](/documentation/AVFoundation/AVError-swift.struct/recordingAlreadyInProgress)

Your app attempted to start recording a movie file while an existing recording is underway.

[`referenceForbiddenByReferencePolicy`](/documentation/AVFoundation/AVError-swift.struct/referenceForbiddenByReferencePolicy)

The current reference restrictions prevent the system from loading referenced media.

[`rosettaNotInstalled`](/documentation/AVFoundation/AVError-swift.struct/rosettaNotInstalled)

The system doesn’t have Rosetta installed and can’t perform the requested operation.

[`sandboxExtensionDenied`](/documentation/AVFoundation/AVError-swift.struct/sandboxExtensionDenied)

The system denied issuing the sandbox extension.

[`screenCaptureFailed`](/documentation/AVFoundation/AVError-swift.struct/screenCaptureFailed)

An unexpected problem occurred that prevented screen capture.

[`segmentStartedWithNonSyncSample`](/documentation/AVFoundation/AVError-swift.struct/segmentStartedWithNonSyncSample)

The operation attempted to write a new MPEG-4 segment that didn’t start with a sync sample.

[`serverIncorrectlyConfigured`](/documentation/AVFoundation/AVError-swift.struct/serverIncorrectlyConfigured)

The configuration of the HTTP server that streams the media resource isn’t correct.

[`sessionConfigurationChanged`](/documentation/AVFoundation/AVError-swift.struct/sessionConfigurationChanged)

Recording stopped because the configuration of media sources and destinations changed.

[`sessionHardwareCostOverage`](/documentation/AVFoundation/AVError-swift.struct/sessionHardwareCostOverage)

Your app requested too many camera hardware resources.

[`sessionNotRunning`](/documentation/AVFoundation/AVError-swift.struct/sessionNotRunning)

The recording couldn’t start because the session isn’t running.

[`sessionWasInterrupted`](/documentation/AVFoundation/AVError-swift.struct/sessionWasInterrupted)

The recording stopped because the system interrupted the audio session.

[`toneMappingFailed`](/documentation/AVFoundation/AVError-swift.struct/toneMappingFailed)

The requested tone mapping failed.

[`torchLevelUnavailable`](/documentation/AVFoundation/AVError-swift.struct/torchLevelUnavailable)

The specified torch level is valid but currently unavailable, possibly due to overheating.

[`undecodableMediaData`](/documentation/AVFoundation/AVError-swift.struct/undecodableMediaData)

The system couldn’t decode the media data.

[`unknown`](/documentation/AVFoundation/AVError-swift.struct/unknown)

An unknown error occurred.

[`unsupportedDeviceActiveFormat`](/documentation/AVFoundation/AVError-swift.struct/unsupportedDeviceActiveFormat)

The capture session doesn’t support the camera device’s active format.

[`unsupportedOutputSettings`](/documentation/AVFoundation/AVError-swift.struct/unsupportedOutputSettings)

Your app requested unsupported output settings.

[`videoCompositorFailed`](/documentation/AVFoundation/AVError-swift.struct/videoCompositorFailed)

The compositor couldn’t composite video frames.

[`deviceIsNotAvailableInBackground`](/documentation/AVFoundation/AVError-swift.struct/deviceIsNotAvailableInBackground)

You attempted to start a capture session in the background, which isn’t allowed in iOS.

### Error properties

[`device`](/documentation/AVFoundation/AVError-swift.struct/device-5iio4)

The capture device in use.

[`device`](/documentation/AVFoundation/AVError-swift.struct/device-1qfzr)      

[`fileSize`](/documentation/AVFoundation/AVError-swift.struct/fileSize)

The asset file size.

[`fileType`](/documentation/AVFoundation/AVError-swift.struct/fileType)

The asset file type.

[`mediaSubtypes`](/documentation/AVFoundation/AVError-swift.struct/mediaSubtypes)

An array of media subtypes.

[`mediaType`](/documentation/AVFoundation/AVError-swift.struct/mediaType-7ksjb)

The asset media type.

[`mediaType`](/documentation/AVFoundation/AVError-swift.struct/mediaType-5d8ie)

The media type.   

[`persistentTrackID`](/documentation/AVFoundation/AVError-swift.struct/persistentTrackID)

The persistent track ID, if the track exists.

[`presentationTimeStamp`](/documentation/AVFoundation/AVError-swift.struct/presentationTimeStamp)

The presentation time stamp.

[`processID`](/documentation/AVFoundation/AVError-swift.struct/processID)

The process ID.

[`recordingSuccessfullyFinished`](/documentation/AVFoundation/AVError-swift.struct/recordingSuccessfullyFinished)

A Boolean value that indicates whether recording finished successfully.

[`time`](/documentation/AVFoundation/AVError-swift.struct/time)

The time duration of the error.

### User info keys

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

The user information key to retrieve the device name.

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

The user information key to retrieve discontinuity flags.

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

The user information key to retrieve the file size in bytes.

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

The user information key to retrieve the file type.

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

The user information key to retrieve the media type.

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

The user information key to retrieve the media subtype.

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

The user information key to retrieve the track’s persistent identifier.

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

The user information key to retrieve the process ID value.

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

The user information key to retrieve the presentation time stamp.

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

The user information key to retrieve a Boolean value that indicates whether recording finished successfully.

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

The user information key to retrieve the error time.



---

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)