Top "Avfoundation" questions

The AVFoundation framework provides both Objective-C and Swift interfaces for editing and playing audio-visual media in a Mac OSX or iOS application.

Play background music in app?

I want the user to be able to open the app and have music start playing. I want the user …

ios swift audio avfoundation avaudioplayer
How to add autofocus to AVCaptureSession? SWIFT

I'm using AVFoundation to recognize text and perform OCR. How do I add autofocus? I don't want to have the …

ios swift avfoundation avcapturesession autofocus
How to generate an UIImage from AVCapturePhoto with correct orientation?

I am calling AVFoundation's delegate method to handle a photo capture, but I am having difficulty converting the AVCapturePhoto it …

avfoundation ios11 avcapturesession swift4
Close AVPlayer when movie is complete

I am making a simple iPad app to play a movie when a button is pressed. The movie plays and …

ios swift avfoundation avkit
Swift iOS -AVPlayer Video Freezes / Pauses When App Comes Back from Background

I have a video playing in a loop on the login page of my app. I followed this Youtube tutorial …

ios swift avfoundation avplayer nsnotificationcenter
Using exportAsynchronouslyWithCompletionHandler

I try to export an audio file from the iPod-Library. I want to create with this iPod-Library file an new …

iphone avfoundation ipod m4a
Level Metering with AVAudioEngine

I just watched the WWDC Video (Session 502 AVAudioEngine in Practice) on AVAudioEngine and am very excited to make an app …

ios objective-c macos avfoundation avaudioengine
IOS: AVAudioSession not working

I am trying to use AVAudioSession, but it is throwing this runtime error: [avas] AVAudioSessionPortImpl.mm:56:ValidateRequiredFields:Unknown selected data …

ios swift avfoundation avaudiosession
Compositing 2 videos on top of each other with alpha

AVFoundation allows you to "compose" 2 assets (2 videos) as 2 "tracks", just like in Final Cut Pro, for example. The theory says …

objective-c cocoa avfoundation avcomposition avvideocomposition
AVAssetExportSession fails every time (error -12780)

I'm trying to merge some audio files (picked via MPMediaPickerController), but the export always fails with error code -12780. When …

ios avfoundation avassetexportsession