Explore the integration of media technologies within your app. Discuss working with audio, video, camera, and other media functionalities.

All subtopics
Posts under Media Technologies topic

Post

Replies

Boosts

Views

Activity

Displaying a processed image from AVCaptureVideoDataOutput in a swiftUI view?
What is the recommended way of showing a processed image from AVCaptureVideoDataOutput in a swiftUI view? Currently my chain is AVCaptureVideoDataOutput(SampleBuffer) -> CIImage -> CIFilters -> createCGImage from processed CIImage -> Create swiftUI 'Image' from CGIImage, that is in a view Is there a better way to go from AVCaptureVideoDataOutput to a swiftUI view, with image processing?
2
0
125
6d
Offscreen drawing to generate video content
We develop software for video broadcasting, including for sporting events, where animated scoreboards play a key role. macOS offers excellent features for such animations—such as CAAnimations—but this holds true only as long as the animations run on visible screens. Distributing the video signal (e.g., via NDI) requires access to the CVPixelBuffers of the individual frames. Currently, we generate the animations on an external screen and create the pixel buffers using ScreenCaptureKit. We are unaware of any way to obtain these pixel buffers without relying on such—strictly speaking, unnecessary—external screens (or multiple screens). If the window is created offscreen, it updates only once per second, which is unusable. Are there alternatives to external screens? If not, why can’t we create a virtual offscreen device for such use cases—one where we specify the required frame rate and rendering frequency—to generate the necessary video frames? This would also be helpful for HTML-based overlays, which are becoming increasingly popular; currently, these are also rendered only once per second when offscreen.
1
0
166
6d
QuickTime Player will not playback with MediaExtention
Hi Everyone! I am writing a media extension to playback old "Amiga" ANIM files, as a test project. I have build the following objects: MEFormatReader METrackReader MESampleCursor The subclassed objects seem fairly straightforward. Rather than create a Video Decoder, I followed the instructions in the SampleCursor object header, and use the function: loadSampleBufferContainingSamplesToEndCursor:completionHandler: to deliver an BGRA 8-bit image. This works great AVPlayer object in my Swift based test app, but QuickTime Player will not actually play the movie. If I scrub on QuickTime Player's timeline, I can watch the movie just fine. But if I click on the "Play" button. Nothing happens. For fun, I created a custom pixel type, and implemented a MEVideoDecoder object. This also works with my AVPlayer test app, but again, same problem with QuickTime Player. I have even generated a JPEG image in the SampleCursor, and that fails too. I am stumped on this. I do not see any way to have QuickTime Player work properly with my MediaExtension, nor is there any documentation as to what to do. Suggestions? bob
1
0
284
6d
Automatic sign-in on tvOS
I have a streaming video app in the App Store. I would like to use the automatic sign in feature for tvOS that was introduced in WWDC '25. However, it requires the com.apple.developer.video-subscriber-single-sign-on entitlement. I'm told that I have to join the video partnership program to access that entitlement. I filled out the forms to join the partnership program, but was ghosted. Would you consider making this feature available to everyone, not just those in the video partnership program? It is frustrating that a new and useful feature isn't actually available.
0
0
76
6d
Apple AUGraphicEQ dead-lock
Hi, I encounter a dead-lock with Apple AUGraphicEQ. I have attached backtrace: thread #44, name = 'com.apple.audio.toolbox.AUScheduledParameterRefresher' frame #0: 0x0000000182059bb0 libsystem_kernel.dylib`semaphore_wait_trap + 8 frame #1: 0x000000018e9e7e00 caulk`caulk::semaphore::timed_wait(double) + 224 frame #2: 0x000000018e9e7cac caulk`caulk::concurrent::details::worker_thread::run() + 32 frame #3: 0x000000018e9e794c caulk`void* caulk::thread_proxy<std::__1::tuple<caulk::thread::attributes, void (caulk::concurrent::details::worker_thread::*)(), std::__1::tuple<caulk::concurrent::details::worker_thread*>>>(void*) + 96 frame #4: 0x000000018209dc58 libsystem_pthread.dylib`_pthread_start + 136 regards, Joël
2
0
474
6d
Can't create a key for MusicKit
I'm trying to create an app that can access a users Apple Music library to play music (the app will do far more than that when finished) but I am unable to generate a key. When I go to Register a New Key, it says: "There are no identifiers available that can be associated with the key" under Media Services (MusicKit, ShazamKit, Apple Music Feed). MusicKit is already checked under App Services in Certificates, Identifiers & Profiles. I've been stuck on this for two days. Please help!
0
0
30
6d
SpeechTranscriber Faster Results
I am experimenting with SpeechTranscriber and am curious if I can get quicker results when using buffered audio, rather than a file. The use case is a voice ordering experience for a restaurant. When I've been playing with it, it takes about 3 seconds for faster results and 7-8 seconds for accurate results. Is there any way to bring this down a bit? In this WWDC demo, the results appear nearly instantaneously. I'm curious how to replicate this in my app. I presume DicationTranscriber is faster, but how is siri detecting when the user stops speaking? Is it custom code, or is it using SpeechDetector? I tried using SpeechDetector with SpeechTranscriber but the detector didn't emit any results and seemed to slow down the results of SpeechTranscriber. I also assumed SpeechTranscriber makes more sense than DictationTranscriber in this use case, but want to confirm.
1
0
75
1w
ABR switching behavior with short (1–2s) segments in live HLS
To reduce latency in our live HLS service, we are experimenting with short segment durations (1–2 seconds). We have noticed that ABR switching occurs more frequently than expected. Looking at the console logs, variants appear to enter and leave what is referred to as a "penalty box" under conditions such as -12889 (a segment returning 0 bytes after 1.0 × target_duration) and -12888 (a playlist remaining unchanged beyond 1.5 × target_duration). Are there recommended practices to reduce this excessive switching? Specifically: Is there an API to control this penalty box behavior? Would preparing an LL-HLS stream with 1-second parts settle this down? Alternatively, would 4-second segments with a slightly smaller configuredTimeOffsetFromLive help stabilize this?
1
2
119
1w
How to detect if a HDR10+ variant is currently playing
Hi, We currently deliver HDR10+ content within a composite HLS stream where Dolby Vision is signaled as a supplemental codec alongside HDR10+. Our testing on Apple TV 4K (3rd generation) indicates that playback succeeds, but we have not found a reliable way to determine whether playback is occurring in Dolby Vision or HDR10+ mode when connected to a display that supports both formats. We have also verified that the same stream plays correctly on displays that support HDR10+ but do not support Dolby Vision. However, on displays that support both HDR10+ and Dolby Vision, we are unable to determine which dynamic range format AVPlayer ultimately selects. Is there a recommended Apple API or mechanism to determine whether AVPlayer is rendering content as HDR10+, Dolby Vision, or another HDR format at runtime? For reference, below is an example variant from our master playlist: #EXT-X-STREAM-INF:BANDWIDTH=2851276,AVERAGE-BANDWIDTH=2030750,CODECS="hvc1.2.4.L90.90,mp4a.40.2",SUPPLEMENTAL-CODECS="dvh1.08.01/dv1p,hvc1.2.4.L90.90/cdm4",RESOLUTION=854x480,FRAME-RATE=24,VIDEO-RANGE=PQ,HDCP-LEVEL=TYPE-1,CHARACTERISTICS="com.dss.cbcs.hdr.hd",AUDIO="aac-128k",SUBTITLES="sub-main" Specifically, we would like to understand: How AVPlayer chooses between Dolby Vision and HDR10+ when both are available in the same variant. Whether there is a supported way to determine the selected HDR format during playback. Whether any other APIs expose this information. Any guidance would be greatly appreciated. Thank you.
1
1
95
1w
Voice Processing
Why voice processing enabled on AVAudioInputNode makes output audio noticable lower than without it and how to overcome it using voice processing enabled
4
0
119
1w
AirPods Custom EQ interaction
In iOS 27, when a user has configured a custom AirPods EQ (three-band lows/mids/highs), does that EQ apply on top of audio output from AVAudioEngine in my app, or only to media playback through AVPlayer/MPMusicPlayerController? My app generates therapeutic frequencies (e.g. 528 Hz pure tones) where precise frequency output matters - is there any API to detect or opt out of the system AirPods EQ?
1
0
58
1w
Real-time synthesis vs. files for long background sessions
For a sleep app running 8–12 hours in background, is AVAudioSourceNode with a real-time render block more power-efficient than looping a pre-encoded audio file via AVAudioPlayerNode? I want to migrate from files to procedural synthesis but not at the cost of battery. What does Instruments / Energy Log show as the typical CPU overhead difference, and is there Apple guidance on this trade-off?
1
0
64
1w
BlietoothHFP to MFi hearingaids
Is it possible to port a bluetooth microphone (BluetoothHFP) to MFi hearing aids connected to an iPhone. When I try to do that the BluetoothHFP grabs input and output. When I pull the output away (BluetoothA2DP) it gives up the input.
5
0
111
1w
Voice Isolation Suggestions
We are working on a voice app that uses ASR/TTS on the backend and run into some difficulties in noisy environments. We have compiled the DeepFilterNet3 library into an XCFramework and are using that on the app, but it's sometimes a bit ambitious with trimming out noise and removes some of the voice. Is there any way to make use of Apple's on-device voice isolation mic mode? I see that we can detect the user's mic mode, but we cannot programmatically set it. While we could prompt the user to enable it manually, this adds a bit of friction to the user experience. Do you have any suggestions for enabling voice isolation, or for performing denoising in general?
1
0
59
1w
Acoustic Echo Cancellation doesn't initially work
We are using AEC in our voice app and it mostly works. However, when the experience begins we play a greeting through the speaker, and the initial few hundred milliseconds of the greeting are being captured by the inputNode. This is throwing off our ASR/TTS. For now, we've disabled audio capture while playing audio, but would prefer to be able to capture all audio with echo cancellation working. Below is some relevant code snippets. Do you have any suggestions to get AEC working more quickly? I've tried a few things like enabling voice processing before setting the audio session to active. public init() { recorderNode = engine.inputNode speakerNode = engine.outputNode mainMixerNode = engine.mainMixerNode engine.attach(audioPlayer) engine.connect( audioPlayer, to: mainMixerNode, format: nil ) playbackFormat = mainMixerNode.outputFormat(forBus: 0) } public func setupAudioSession() async throws(AudioError) { do { let audioSession = AVAudioSession.sharedInstance() try audioSession.setCategory( .playAndRecord, mode: .voiceChat, policy: .default, options: [ .defaultToSpeaker, .allowBluetoothHFP, ] ) try audioSession.setActive(true) } catch { throw .audioSessionSetupFailed(error) } do { try recorderNode.setVoiceProcessingEnabled(true) try speakerNode.setVoiceProcessingEnabled(true) } catch { throw .enableVoiceProcessingFailed(error) } }
1
0
48
1w
Displaying a processed image from AVCaptureVideoDataOutput in a swiftUI view?
What is the recommended way of showing a processed image from AVCaptureVideoDataOutput in a swiftUI view? Currently my chain is AVCaptureVideoDataOutput(SampleBuffer) -> CIImage -> CIFilters -> createCGImage from processed CIImage -> Create swiftUI 'Image' from CGIImage, that is in a view Is there a better way to go from AVCaptureVideoDataOutput to a swiftUI view, with image processing?
Replies
2
Boosts
0
Views
125
Activity
6d
Offscreen drawing to generate video content
We develop software for video broadcasting, including for sporting events, where animated scoreboards play a key role. macOS offers excellent features for such animations—such as CAAnimations—but this holds true only as long as the animations run on visible screens. Distributing the video signal (e.g., via NDI) requires access to the CVPixelBuffers of the individual frames. Currently, we generate the animations on an external screen and create the pixel buffers using ScreenCaptureKit. We are unaware of any way to obtain these pixel buffers without relying on such—strictly speaking, unnecessary—external screens (or multiple screens). If the window is created offscreen, it updates only once per second, which is unusable. Are there alternatives to external screens? If not, why can’t we create a virtual offscreen device for such use cases—one where we specify the required frame rate and rendering frequency—to generate the necessary video frames? This would also be helpful for HTML-based overlays, which are becoming increasingly popular; currently, these are also rendered only once per second when offscreen.
Replies
1
Boosts
0
Views
166
Activity
6d
QuickTime Player will not playback with MediaExtention
Hi Everyone! I am writing a media extension to playback old "Amiga" ANIM files, as a test project. I have build the following objects: MEFormatReader METrackReader MESampleCursor The subclassed objects seem fairly straightforward. Rather than create a Video Decoder, I followed the instructions in the SampleCursor object header, and use the function: loadSampleBufferContainingSamplesToEndCursor:completionHandler: to deliver an BGRA 8-bit image. This works great AVPlayer object in my Swift based test app, but QuickTime Player will not actually play the movie. If I scrub on QuickTime Player's timeline, I can watch the movie just fine. But if I click on the "Play" button. Nothing happens. For fun, I created a custom pixel type, and implemented a MEVideoDecoder object. This also works with my AVPlayer test app, but again, same problem with QuickTime Player. I have even generated a JPEG image in the SampleCursor, and that fails too. I am stumped on this. I do not see any way to have QuickTime Player work properly with my MediaExtension, nor is there any documentation as to what to do. Suggestions? bob
Replies
1
Boosts
0
Views
284
Activity
6d
Automatic sign-in on tvOS
I have a streaming video app in the App Store. I would like to use the automatic sign in feature for tvOS that was introduced in WWDC '25. However, it requires the com.apple.developer.video-subscriber-single-sign-on entitlement. I'm told that I have to join the video partnership program to access that entitlement. I filled out the forms to join the partnership program, but was ghosted. Would you consider making this feature available to everyone, not just those in the video partnership program? It is frustrating that a new and useful feature isn't actually available.
Replies
0
Boosts
0
Views
76
Activity
6d
Apple AUGraphicEQ dead-lock
Hi, I encounter a dead-lock with Apple AUGraphicEQ. I have attached backtrace: thread #44, name = 'com.apple.audio.toolbox.AUScheduledParameterRefresher' frame #0: 0x0000000182059bb0 libsystem_kernel.dylib`semaphore_wait_trap + 8 frame #1: 0x000000018e9e7e00 caulk`caulk::semaphore::timed_wait(double) + 224 frame #2: 0x000000018e9e7cac caulk`caulk::concurrent::details::worker_thread::run() + 32 frame #3: 0x000000018e9e794c caulk`void* caulk::thread_proxy<std::__1::tuple<caulk::thread::attributes, void (caulk::concurrent::details::worker_thread::*)(), std::__1::tuple<caulk::concurrent::details::worker_thread*>>>(void*) + 96 frame #4: 0x000000018209dc58 libsystem_pthread.dylib`_pthread_start + 136 regards, Joël
Replies
2
Boosts
0
Views
474
Activity
6d
Can't create a key for MusicKit
I'm trying to create an app that can access a users Apple Music library to play music (the app will do far more than that when finished) but I am unable to generate a key. When I go to Register a New Key, it says: "There are no identifiers available that can be associated with the key" under Media Services (MusicKit, ShazamKit, Apple Music Feed). MusicKit is already checked under App Services in Certificates, Identifiers & Profiles. I've been stuck on this for two days. Please help!
Replies
0
Boosts
0
Views
30
Activity
6d
SpeechTranscriber Faster Results
I am experimenting with SpeechTranscriber and am curious if I can get quicker results when using buffered audio, rather than a file. The use case is a voice ordering experience for a restaurant. When I've been playing with it, it takes about 3 seconds for faster results and 7-8 seconds for accurate results. Is there any way to bring this down a bit? In this WWDC demo, the results appear nearly instantaneously. I'm curious how to replicate this in my app. I presume DicationTranscriber is faster, but how is siri detecting when the user stops speaking? Is it custom code, or is it using SpeechDetector? I tried using SpeechDetector with SpeechTranscriber but the detector didn't emit any results and seemed to slow down the results of SpeechTranscriber. I also assumed SpeechTranscriber makes more sense than DictationTranscriber in this use case, but want to confirm.
Replies
1
Boosts
0
Views
75
Activity
1w
AVPictureInPictureController doesn't work with AVSampleBufferDisplayLayer on tvOS
When we try to use AVPictureInPictureController with a AVSampleBufferDisplayLayer on tvOS 15 through tvOS 26 isPictureInPicturePossible never becomes true. The code works great on iOS, but it has never worked on tvOS. You can check this out for a repro: https://github.com/jazzychad/PiPBugDemo Feedbacks: FB9751461, FB14158567, FB14037110 DTS Case: 7999337
Replies
6
Boosts
0
Views
220
Activity
1w
test post
This is a test test test
Replies
0
Boosts
1
Views
41
Activity
1w
ABR switching behavior with short (1–2s) segments in live HLS
To reduce latency in our live HLS service, we are experimenting with short segment durations (1–2 seconds). We have noticed that ABR switching occurs more frequently than expected. Looking at the console logs, variants appear to enter and leave what is referred to as a "penalty box" under conditions such as -12889 (a segment returning 0 bytes after 1.0 × target_duration) and -12888 (a playlist remaining unchanged beyond 1.5 × target_duration). Are there recommended practices to reduce this excessive switching? Specifically: Is there an API to control this penalty box behavior? Would preparing an LL-HLS stream with 1-second parts settle this down? Alternatively, would 4-second segments with a slightly smaller configuredTimeOffsetFromLive help stabilize this?
Replies
1
Boosts
2
Views
119
Activity
1w
How to detect if a HDR10+ variant is currently playing
Hi, We currently deliver HDR10+ content within a composite HLS stream where Dolby Vision is signaled as a supplemental codec alongside HDR10+. Our testing on Apple TV 4K (3rd generation) indicates that playback succeeds, but we have not found a reliable way to determine whether playback is occurring in Dolby Vision or HDR10+ mode when connected to a display that supports both formats. We have also verified that the same stream plays correctly on displays that support HDR10+ but do not support Dolby Vision. However, on displays that support both HDR10+ and Dolby Vision, we are unable to determine which dynamic range format AVPlayer ultimately selects. Is there a recommended Apple API or mechanism to determine whether AVPlayer is rendering content as HDR10+, Dolby Vision, or another HDR format at runtime? For reference, below is an example variant from our master playlist: #EXT-X-STREAM-INF:BANDWIDTH=2851276,AVERAGE-BANDWIDTH=2030750,CODECS="hvc1.2.4.L90.90,mp4a.40.2",SUPPLEMENTAL-CODECS="dvh1.08.01/dv1p,hvc1.2.4.L90.90/cdm4",RESOLUTION=854x480,FRAME-RATE=24,VIDEO-RANGE=PQ,HDCP-LEVEL=TYPE-1,CHARACTERISTICS="com.dss.cbcs.hdr.hd",AUDIO="aac-128k",SUBTITLES="sub-main" Specifically, we would like to understand: How AVPlayer chooses between Dolby Vision and HDR10+ when both are available in the same variant. Whether there is a supported way to determine the selected HDR format during playback. Whether any other APIs expose this information. Any guidance would be greatly appreciated. Thank you.
Replies
1
Boosts
1
Views
95
Activity
1w
Real-time audio level monitoring improvements
Have there been any changes in macOS 27 or iOS 27 that improve real-time audio level monitoring, WidgetKit updates, Live Activities, or audio route change handling for professional monitoring applications?
Replies
0
Boosts
0
Views
42
Activity
1w
Voice Processing
Why voice processing enabled on AVAudioInputNode makes output audio noticable lower than without it and how to overcome it using voice processing enabled
Replies
4
Boosts
0
Views
119
Activity
1w
AirPods Custom EQ interaction
In iOS 27, when a user has configured a custom AirPods EQ (three-band lows/mids/highs), does that EQ apply on top of audio output from AVAudioEngine in my app, or only to media playback through AVPlayer/MPMusicPlayerController? My app generates therapeutic frequencies (e.g. 528 Hz pure tones) where precise frequency output matters - is there any API to detect or opt out of the system AirPods EQ?
Replies
1
Boosts
0
Views
58
Activity
1w
Real-time synthesis vs. files for long background sessions
For a sleep app running 8–12 hours in background, is AVAudioSourceNode with a real-time render block more power-efficient than looping a pre-encoded audio file via AVAudioPlayerNode? I want to migrate from files to procedural synthesis but not at the cost of battery. What does Instruments / Energy Log show as the typical CPU overhead difference, and is there Apple guidance on this trade-off?
Replies
1
Boosts
0
Views
64
Activity
1w
Bluetooth mic in, live listen out
Is it possible to link a HFBluetooth input device with the output iPhone speaker while Live Listen is active?
Replies
10
Boosts
0
Views
353
Activity
1w
BlietoothHFP to MFi hearingaids
Is it possible to port a bluetooth microphone (BluetoothHFP) to MFi hearing aids connected to an iPhone. When I try to do that the BluetoothHFP grabs input and output. When I pull the output away (BluetoothA2DP) it gives up the input.
Replies
5
Boosts
0
Views
111
Activity
1w
Voice Isolation Suggestions
We are working on a voice app that uses ASR/TTS on the backend and run into some difficulties in noisy environments. We have compiled the DeepFilterNet3 library into an XCFramework and are using that on the app, but it's sometimes a bit ambitious with trimming out noise and removes some of the voice. Is there any way to make use of Apple's on-device voice isolation mic mode? I see that we can detect the user's mic mode, but we cannot programmatically set it. While we could prompt the user to enable it manually, this adds a bit of friction to the user experience. Do you have any suggestions for enabling voice isolation, or for performing denoising in general?
Replies
1
Boosts
0
Views
59
Activity
1w
Acoustic Echo Cancellation doesn't initially work
We are using AEC in our voice app and it mostly works. However, when the experience begins we play a greeting through the speaker, and the initial few hundred milliseconds of the greeting are being captured by the inputNode. This is throwing off our ASR/TTS. For now, we've disabled audio capture while playing audio, but would prefer to be able to capture all audio with echo cancellation working. Below is some relevant code snippets. Do you have any suggestions to get AEC working more quickly? I've tried a few things like enabling voice processing before setting the audio session to active. public init() { recorderNode = engine.inputNode speakerNode = engine.outputNode mainMixerNode = engine.mainMixerNode engine.attach(audioPlayer) engine.connect( audioPlayer, to: mainMixerNode, format: nil ) playbackFormat = mainMixerNode.outputFormat(forBus: 0) } public func setupAudioSession() async throws(AudioError) { do { let audioSession = AVAudioSession.sharedInstance() try audioSession.setCategory( .playAndRecord, mode: .voiceChat, policy: .default, options: [ .defaultToSpeaker, .allowBluetoothHFP, ] ) try audioSession.setActive(true) } catch { throw .audioSessionSetupFailed(error) } do { try recorderNode.setVoiceProcessingEnabled(true) try speakerNode.setVoiceProcessingEnabled(true) } catch { throw .enableVoiceProcessingFailed(error) } }
Replies
1
Boosts
0
Views
48
Activity
1w
MusicUnderstanding and Apple Music / MusicKit
Am I correct in my understanding that the new MusicUnderstanding is not intended to be able to support analysis of Apple Music streams via MusicKit or in other ways?
Replies
1
Boosts
0
Views
61
Activity
1w