I am unable to find any clearcut documentation on configuring AVCaptureSession pipeline to capture video with proResRAW codec type, which is 16 bit format. Is it supported only with AVCaptureMovieFileOutput or one can have AVCaptureVideoDataOutput emitting 16-bit sample buffers that can be vended to AVAssetWriter?
Explore the integration of media technologies within your app. Discuss working with audio, video, camera, and other media functionalities.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Created
Is it possible to perform speech-to-text using AVAudioEngine to capture microphone input while being on a FaceTime call at the same time?
I tried implementing this, but whenever I attempt to start the AVAudioEngine while a FaceTime call is active, I get the following error:
“The operation couldn’t be completed. (OSStatus error 2003329396)”
I assume this might be due to microphone resource restrictions during FaceTime, but I’d like to confirm whether this limitation is at the system level or if there’s any possible workaround or entitlement that allows concurrent microphone access.
Has anyone encountered this issue or found a solution?
On iPhone 16 Pro Max (not tested other devices) there's a noticeable jump in the framing of the preview video when you record in the iOS AVCam Sample App. The same jump in camera framing can be observed by switching to the front facing camera and then back to the rear one.
It looks roughly consistent with switching between the 0.5x and 1x camera (but not quite a match for the same viewable area in the Camera app) - and it's only when it's initially loaded, once recording is started it retains the 'closer' image no matter how many times it's stopped/started thereafter.
I'm relatively new to Swift and haven't done anything with the camera before, so odd 'buggy' behaviour in the sample code isn't helping me understand it! :-)
Is there any way to fix this?
I’m working with the Push-to-Talk (PTT) framework and observing a consistent delay when starting audio capture.
Scenario:
A PTT call is already active
The AVAudioSession is fully configured
I request beginTransmission on the PTT channel
I start my Audio Unit for recording (AudioOutputUnitStart)
Observed behavior:
AudioOutputUnitStart takes ~500 ms
This happens whether I start the Audio Unit:
after didBeginTransmission, or
after AVAudioSession didActivate
Comparison:
Using the same Audio Unit, same format, and same configuration
Without the PTT framework, AudioOutputUnitStart takes ~200 ms
Additional notes:
I am not modifying or reconfiguring AVAudioSession when requesting beginTransmission
The audio session is already set up when the PTT call starts
There are no interruptions or route changes at the time of starting the Audio Unit
Impact:
This extra latency is significant for Push-to-Talk use cases where fast transmit
start is critical.
I'm working on a v2 Audio Unit that has some complicated internal state (audio, midi, other settings).
When the internal state changes, I want to inform the host (f.i. Logic Pro) that my plugin state has changed, and that the main window should show the 'project changed' status through the window close button.
This was easy to achieve for the VST version of the plugin, but I can't figure out a way to do it for the Audio Unit.
I've tried:
Notifying change of the kAudioUnitProperty_ClassInfo property that stores the plugin state:
unit->PropertyChanged(kAudioUnitProperty_ClassInfo, kAudioUnitScope_Global, 0);
Setting the kAudioUnitProperty_ClassInfo property value each time the plugin state changes.
Adding a new parameter called 'dirtystate' and toggling it and notifying the change each time the plugin state changes.
But nothing really make Logic take notice. This should be an easy task, but I can't put my finger on it.
How do I flag may AUv2 as needing its status saved (i.e. the host project needs saving)?
My app - natively iOS but built with the "Designed for iPad" option to run on Mac - does not recognise an attached USB microphone when running on a Mac. This line
int32_t items = (int32_t) [[[AVAudioSession sharedInstance] availableInputs] count ];
returns 1, which is the Mac internal mic. On iPad and iPhone it sees both the internal mic and the USB mic. Is this an inherent "Designed for iPad" restriction, and is there some trick I can pull to get the USB microphone to be recognised by the system?
Topic:
Media Technologies
SubTopic:
Audio
Hello,
I have a problem generating a 2048-bit FairPlay Streaming certificate.
I tried generating SDK v26.x certificate in two ways.
(1) Use existing certificate
(2) Create new certificate
Though, in both ways, Apple gives me a certificate bundle of 1024-bit certificate.
(fps_certificate.bin)
I've uploaded 2048-bit CSR on creating a certificate.
Just to note, I have created a SDK v4.x certificate few years ago.
Have anyone bumped into a same issue?
Or am I missing something?
I have a new 2725QC (Dell) Monitor that uses USB-C connection to connect with the iMac (2019, 27 inch) through the back port but the problem is that the volume control can currently only be done from the hardware, not the software control using the Apple keyboard. What should I do in terms of writing code to do this (Swift or Obj-C)? Is there a third-party solution for Intel iMac and ARM Mac?
Hello,
I am currently developing a video player using Custom AVPlayer SDK and testing LL-HLS live streaming.
I encountered a specific error, CoreMediaErrorDomain -15418, during playback. I have searched through the official documentation and the forums, but I could not find any information regarding this error code.
I would like to inquire about the following:
Description & Cause: What does the error code -15418 specifically represent in the context of CoreMedia and LL-HLS?
Severity: Is this a critical error that halts playback, or is it merely a warning?
Environment Details:
iOS Version: iOS 26.2
Device: iPhone 15 Pro Max
Stream Type: LL-HLS (Low-Latency HLS)
Impact: Quality drops
Any insights or references to documentation would be greatly appreciated.
Thank you.
I’ve been struggling with a very frustrating issue using the new iOS 26 Swift Concurrency APIs for video processing. My pipeline reads frames using AVAssetReader, processes them via CIContext (Lanczos upscale), and then appends the result to an AVAssetWriter using the new PixelBufferReceiver.
The Problem: The execution randomly stops at the ]await append(...)] call. The task suspends and never resumes.
It is completely unpredictable: It might hang on the very first run, or it might work fine for 4-5 runs and then hang on the next one.
It is independent of video duration: It happens with 5-second clips just as often as with long videos.
No feedback from the system: There is no crash, no error thrown, and CPU usage drops to zero. The thread just stays in the suspended state indefinitely.
If I manually cancel the operation and restart the VideoEngine, it usually starts working again for a few more attempts, which makes me suspect some internal resource exhaustion or a deadlock between the GPU context and the writer's input.
The Code: Here is a simplified version of my processing loop:
private func proccessVideoPipeline(
readerOutputProvider: AVAssetReaderOutput.Provider<CMReadySampleBuffer<CMSampleBuffer.DynamicContent>>,
pixelBufferReceiver: AVAssetWriterInput.PixelBufferReceiver,
nominalFrameRate: Float,
targetSize: CGSize
) async throws {
while !Task.isCancelled, let payload = try await readerOutputProvider.next() {
let sampleBufferInfo: (imageBuffer: CVPixelBuffer?, presentationTimeStamp: CMTime) = payload.withUnsafeSampleBuffer { sampleBuffer in
return (sampleBuffer.imageBuffer, sampleBuffer.presentationTimeStamp)
}
guard let currentPixelBuffer = sampleBufferInfo.imageBuffer else {
throw AsyncFrameProcessorError.missingImageBuffer
}
guard let pixelBufferPool = pixelBufferReceiver.pixelBufferPool else {
throw NSError(domain: "PixelBufferPool", code: -1, userInfo: [NSLocalizedDescriptionKey: "No pixel buffer pool available"])
}
let newPixelBuffer = try pixelBufferPool.makeMutablePixelBuffer()
let newCVPixelBuffer = newPixelBuffer.withUnsafeBuffer({ $0 })
try upscale(currentPixelBuffer, outputPixelBuffer: newCVPixelBuffer, targetSize: targetSize )
let presentationTime = sampleBufferInfo.presentationTimeStamp
try await pixelBufferReceiver.append(.init(unsafeBuffer: newCVPixelBuffer), with: presentationTime)
}
}
Does anyone know how to fix it?
I’ve been using Apple Music API for quite a while now and a recent change must have happened which is quite disruptive.
On many occasions, artists release singles from an album as part of promoting this album. For recent examples, Harry Styles released “Aperture” (a single) to promote his upcoming album “Kiss All The Time. Disco, Occasionally“. Similarly, Bruno Mars released “I Just Might”, a single from the upcoming album “The Romantic”.
Previously, those would return at the endpoint ”artists/{artist_id}/albums” with a “- Single” suffix. But it seems a recent change happens where they only appear as playable tracks inside the album.
This behavior is also evident in the Apple Music app itself. Those singles no longer appear under “Singles & EPs”. Instead, they would only be visible if the single becomes popular enough to be shown on “Top Songs“. Otherwise one would have to know to tap on the (future) album to discover if there are released singles.
Meanwhile Spotify’s API returns those as singles properly, just like Apple Music API used to.
This change must be recent but the question is if it’s intentional, and if so, how can the API be used from here on out to “extract” those singles and represent them?
I neet to take pcm data from aac data, but this api has fossy me deeply.
Hi Apple Developer Support Team,
We are developing an iOS application using a camera package within a hybrid (cross-platform) framework, and we would like to confirm whether it is possible to disable the camera shutter sound programmatically.
As per our understanding, the shutter sound on iOS is system-controlled and depends on the device’s silent/ring mode, and there is no App Store–approved API available to force-disable this sound. Kindly confirm whether this understanding is correct or if any supported alternative approach exists for hybrid or native implementations.
Thank you for your clarification.
Best regards,
ParkhyaSolutions
The ASk is used by the KSM to derive the dASk, which is then used to decrypt the SK...R1.
If the only thing we give the client is the certificate, how does it encrypt the SK...R1 so the server is able to process it.
Would be nice to know it it works generally, because I've been getting questions about it and can't provide a helpful answer.
Thanks in advance.
The front facing camera on iPhone 16 (and every model previous) gives the following values for AVCaptureDevice.RotationCoordinator.videoRotationAngleForHorizonLevelCapture:
90 degrees portrait
180 degrees landscape left
270 degrees for upside-down
0 degrees for landscape right
Using these values a transform is calculated:
var transform: CGAffineTransform {
let degrees = rotationCoordinator.videoRotationAngleForHorizonLevelCapture
let radians = degrees * .pi / 180.0
return CGAffineTransform(rotationAngle: radians)
}
And then applied to the AVAssetInput:
videoInput = AVAssetWriterInput(mediaType: .video,
outputSettings: videoSettings,
sourceFormatHint: videoFormatDescription)
videoInput.transform = transform
And this ensures the correct transform is added to the metadata so that the recorded video plays in the correct orientation.
However, with the iPhone 17 Pro and iPhone 17 Pro Max front facing cameras, AVCaptureDevice.RotationCoordinator.videoRotationAngleForHorizonLevelCapture return the different values:
0 degrees portrait
90 degrees landscape left
180 degrees for upside-down
270 degrees for landscape right
So this approach breaks down, and the video orientation is incorrect. How is this intended to be handled?
I am trying to Build server for testing on Linux(Alma linux 9 VM)
NAME="AlmaLinux"
VERSION="9.7 (Moss Jungle Cat)"
ID="almalinux"
ID_LIKE="rhel centos fedora"
VERSION_ID="9.7"
PLATFORM_ID="platform:el9"
PRETTY_NAME="AlmaLinux 9.7 (Moss Jungle Cat)"
ANSI_COLOR="0;34"
[azuki@AlmaDevVM ~]$ uname -m
x86_64
I have tried the following steps:
Before starting, ensured that Swift 6 installed. Referred https://www.swift.org/install/ for instructions.
Build the library
In Terminal, uses the following commands to compile the Swift library:
cd Development/Key_Server_Module/Swift
swift build -Xbuild-tools-swiftc -DTEST_CREDENTIALS
After building the library, ran test cases to ensure the library behaves as expected. ALL unit tests are passing with the development credentials.
• Since I was using an x86_64 machine:
export LD_LIBRARY_PATH=./Sources/prebuilt/x86_64-unknown-linux-gnu/
Run all tests:
swift test -Xbuild-tools-swiftc -DTEST_CREDENTIALS --disable-swift-testing
Build the server
Build the server: Apache
Before starting, ensured the following:
a. Installed Apache HTTPD and the dev tools. Using the following command for installation:
yum install httpd httpd-devel redhat-rpm-config
b. After this, integrated it into the Apache server
environment with swift library that was built above. Used the following command to build the server using apxs:
• Since I was using an x86_64 machine:
apxs -i -a -c
-Wl,-L${PWD}/.build/x86_64-unknown-linux-gnu/debug/
-Wl,-lswift_fpssdk
-Wl,-L${PWD}/Sources/prebuilt/x86_64-unknown-linux-gnu -lfpscrypto
-Wl,-R${PWD}/.build/x86_64-unknown-linux-gnu/debug
server_setup/mod_fps.c
c. Next, copied the dependent libraries to the Apache modules folder using these commands:
• If using an x86_64 machine:
cp Sources/prebuilt/x86_64-unknown-linux-gnu/libfpscrypto.so /usr/lib64/httpd/modules/libfpscrypto.so
cp .build/x86_64-unknown-linux-gnu/debug/libswift_fpssdk.so /usr/lib64/httpd/modules/libswift_fpssdk.so
d. Configuring Apache HTTPD
Configured Apache HTTPD by adding the module and handler to your Apache
HTTPD configuration (/etc/httpd/conf/httpd.conf). Note that the apxs command
may automatically add the LoadModule line in the previous step.
Listen 8080
LoadFile /usr/lib64/httpd/modules/libfpscrypto.so
LoadFile /usr/lib64/httpd/modules/libswift_fpssdk.so
LoadModule fps_module /usr/lib64/httpd/modules/mod_fps.so
<Location "/fps">
SetHandler fps_handler
Copy the credentials to the Apache modules folder.
cp -r ../credentials /usr/lib64/httpd/modules/
export FPS_CERT_PATH=
/usr/lib64/httpd/modules/credentials/test_certificates.json
e. Run your server
You can run the Apache HTTPD server with the configured module by using the following command:
httpd -D FOREGROUND
No issues see till step.
Get SDK version
[azuki@AlmaDevVM Key_Server_Module]$ curl localhost:8080/fps/v
26.0.0
But when i try to generate license
[azuki@AlmaDevVM Key_Server_Module]$ curl -d ../Test_Inputs/iOS/spc_ios_hd_lease_2048.json localhost:8080/fps
{"fairplay-streaming-response":{"create-ckc":[{"id":1,"status":-42601}]}}
Can you please suggest what i might be missing here?
I want develop an app for real-time streaming spatial video transmission from an Apple Vision Pro to another Apple Vision Pro and play, like MV-HEVC, does it's possible? If it's possible how to make it?
I occasionally receive reports from users that photo import from the Photos library gets stuck and the progress appears to stop indefinitely.
I’m using the following APIs:
func fetchAsset(_ asset: PHAsset) {
let options = PHImageRequestOptions()
options.deliveryMode = .highQualityFormat
options.resizeMode = .exact
options.isSynchronous = false
options.isNetworkAccessAllowed = true
options.progressHandler = { (progress, error, stop, info) in
// 🚨 never called
}
let requestId = PHImageManager.default().requestImageDataAndOrientation(
for: asset,
options: options
) { data, _, _, info in
// 🚨 never called
}
}
Due to repeated reports, I added detailed logs inside the callback closures. Based on the logs, it looks like the request keeps waiting without any callbacks being invoked — neither the progressHandler nor the completion block of requestImageDataAndOrientation is called.
This happens not only with the PHImageManager approach, but also when using PHAsset with PHContentEditingInputRequestOptions — the completion callback is not invoked as well.
func fetchAssetByContentEditingInput(_ asset: PHAsset) {
let options = PHContentEditingInputRequestOptions()
options.isNetworkAccessAllowed = true
asset.requestContentEditingInput(with: nil) { contentEditingInput, info in
// 🚨 never called
}
}
I suspect this is related to iCloud Photos.
Here is what I confirmed from affected users:
Using the native picker (My app also provides the native picker as an alternative option for attaching photos), iCloud download proceeds normally and the photo can be attached. However, using the PHImageManager-based approach in my app, the same photo cannot be attached.
Even after verifying that the photo has been fully downloaded from iCloud (e.g., by trying “Export Unmodified Originals” in the Photos app as described here: https://support.apple.com/en-us/111762, and confirming the iCloud download progress completed), the callback is still not invoked for that asset.
Detailed flow for (1):
I asked the user to attach the problematic photo (the one where callbacks never fire) using the native photo picker (UIImagePickerController).
The UI showed “Downloading from iCloud” progress.
The progress advanced and the photo was attached successfully.
Then I asked the user to attach the same photo again using my custom photo picker (which uses the PHImageManager APIs mentioned above).
The progress did not advance (No callbacks were invoked).
The operation waited indefinitely and never completed.
Workaround / current behavior:
If I ask users to reboot the device and try again, about 6 out of 10 users can attach successfully afterward.
The remaining ~4 out of 10 users still cannot attach even after rebooting.
For users who are not fixed immediately after reboot, it seems to resolve naturally after some time.
I’ve seen similar reports elsewhere, so I’m wondering if Apple is already aware of an internal issue related to this. If there is any known information, guidance, or recommended workaround, I would appreciate it.
I also logged the properties of affected PHAssets (metadata) when the issue occurs, and I can share them below if that helps troubleshooting:
[size=3.91MB] [PHAssetMediaSubtype(rawValue: 528)+DepthEffect | userLibrary | (4284x5712) | adjusted=true]
[size=3.91MB] [PHAssetMediaSubtype(rawValue: 528)+DepthEffect | userLibrary | (4284x5712) | adjusted=true]
[size=2.72MB] [PHAssetMediaSubtype(rawValue: 16)+DepthEffect | userLibrary | (3024x4032) | adjusted=true]
[size=2.72MB] [PHAssetMediaSubtype(rawValue: 16)+DepthEffect | userLibrary | (3024x4032) | adjusted=true]
[size=2.49MB] [PHAssetMediaSubtype(rawValue: 16)+DepthEffect | userLibrary | (3024x4032) | adjusted=true]
[size=2.49MB] [PHAssetMediaSubtype(rawValue: 16)+DepthEffect | userLibrary | (3024x4032) | adjusted=true]
I occasionally receive reports from users that photo import from the Photos library gets stuck and the progress appears to stop indefinitely.
I’m using the following APIs (code to be added):
func fetchAsset(_ asset: PHAsset) {
let options = PHImageRequestOptions()
options.deliveryMode = .highQualityFormat
options.resizeMode = .exact
options.isSynchronous = false
options.isNetworkAccessAllowed = true
options.progressHandler = { (progress, error, stop, info) in
// 🚨 never called
}
let requestId = PHImageManager.default().requestImageDataAndOrientation(
for: asset,
options: options
) { data, _, _, info in
// 🚨 never called
}
}
Due to repeated reports, I added detailed logs inside the callback closures. Based on the logs, it looks like the request keeps waiting without any callbacks being invoked — neither the progressHandler nor the completion block of requestImageDataAndOrientation is called.
This happens not only with the PHImageManager approach, but also when using PHAsset with PHContentEditingInputRequestOptions — the completion callback is not invoked as well.
func fetchAssetByContentEditingInput(_ asset: PHAsset) {
let options = PHContentEditingInputRequestOptions()
options.isNetworkAccessAllowed = true
asset.requestContentEditingInput(with: nil) { contentEditingInput, info in
// 🚨 never called
}
}
I suspect this is related to iCloud Photos.
Here is what I confirmed from affected users:
1. Using the native picker, iCloud download proceeds normally and the photo can be attached. However, using the PHImageManager-based approach in my app, the same photo cannot be attached.
2. Even after verifying that the photo has been fully downloaded from iCloud (e.g., by trying “Export Unmodified Originals” in the Photos app as described here: https://support.apple.com/en-us/111762, and confirming the iCloud download progress completed), the callback is still not invoked for that asset.
Detailed flow for (1):
• I asked the user to attach the problematic photo (the one where callbacks never fire) using the native photo picker (UIImagePickerController).
• The UI showed “Downloading from iCloud” progress.
• The progress advanced and the photo was attached successfully.
• Then I asked the user to attach the same photo again using my custom photo picker (which uses the PHImageManager APIs mentioned above).
• The progress did not advance.
• No callbacks were invoked.
• The operation waited indefinitely and never completed.
Workaround / current behavior:
• If I ask users to force-quit and relaunch the app and try again, about 6 out of 10 users can attach successfully afterward.
• The remaining ~4 out of 10 users still cannot attach even after relaunching.
• For users who are not fixed immediately after relaunch, it seems to resolve naturally after some time.
I’ve seen similar reports elsewhere, so I’m wondering if Apple is already aware of an internal issue related to this. If there is any known information, guidance, or recommended workaround, I would appreciate it.
I also logged the properties of affected PHAssets (metadata) when the issue occurs, and I can share them below if that helps troubleshooting:
[size=3.91MB] [PHAssetMediaSubtype(rawValue: 528)+DepthEffect | userLibrary | (4284x5712) | adjusted=true]
[size=3.91MB] [PHAssetMediaSubtype(rawValue: 528)+DepthEffect | userLibrary | (4284x5712) | adjusted=true]
[size=2.72MB] [PHAssetMediaSubtype(rawValue: 16)+DepthEffect | userLibrary | (3024x4032) | adjusted=true]
[size=2.72MB] [PHAssetMediaSubtype(rawValue: 16)+DepthEffect | userLibrary | (3024x4032) | adjusted=true]
[size=2.49MB] [PHAssetMediaSubtype(rawValue: 16)+DepthEffect | userLibrary | (3024x4032) | adjusted=true]
[size=2.49MB] [PHAssetMediaSubtype(rawValue: 16)+DepthEffect | userLibrary | (3024x4032) | adjusted=true]
I am a graduate student conducting research in speech/audio signal processing and multimodal interaction.
Apple Vision Pro is widely recognized as a multimodal interactive system supporting voice, eye, and gesture inputs. However, I could not find detailed specifications or documentation about the audio input sampling rate used by the device’s built-in microphone array when capturing user audio.
Specifically, I would like to understand:
What is the default audio input sampling rate (e.g., 16 kHz, 44.1 kHz, 48 kHz, etc.) for the Vision Pro’s microphones?
When developing with visionOS / AVAudioSession / AVAudioEngine, is there a documented or recommended sampling rate for audio capture?
Are there any best practices or settings for enabling high-quality voice capture on Vision Pro (especially for voice research tasks)?
For context, my work involves voice processing, analysis, and possibly on-device real-time speech recognition. Any pointers to relevant APIs, documentation or examples (especially regarding audio capture buffer size or available formats on visionOS) would be very helpful.
Thank you in advance!
Best regards.