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

All subtopics

Post

Replies

Boosts

Views

Activity

Error 15517 when playing HLS
Playing fMP4 HLS stream on VisionOS beta. This is the stream, HEVC main 10 and EAC3 6 channel: #EXT-X-STREAM-INF:BANDWIDTH=6760793,AVERAGE-BANDWIDTH=6760793,VIDEO-RANGE=PQ,CODECS="hvc1.2.4.L150.B0,mp4a.a6",RESOLUTION=3840x2160,FRAME-RATE=23.976,SUBTITLES="subs" This is what AVPlayer says: Error Domain=AVFoundationErrorDomain Code=-11848 "Cannot Open" UserInfo={NSLocalizedFailureReason=The media cannot be used on this device., NSLocalizedDescription=Cannot Open, NSUnderlyingError=0x3009e37b0 {Error Domain=CoreMediaErrorDomain Code=-15517 "(null)"}} I can't find any documentation for the underlying error 15517. Is it because "mp4a.a6" is declared in the codec list and not "ec-3"? hlsreport has these MUST FIX issues: 1. Measured peak bitrate compared to multivariant playlist declared value exceeds error tolerance Multivariant Playlist Stream Definition for All Variants 2. Stereo audio in AAC-LC, HE-AAC v1, or HE-AAC v2 format MUST be provided Multivariant Playlist 3. If Dolby Digital Plus is provided then Dolby Digital MUST be provided also Multivariant Playlist 4. I-frame playlists ( EXT-X-I-FRAME-STREAM-INF ) MUST be provided to support scrubbing and scanning UI Multivariant Playlist 5. The server MUST deliver playlists using gzip content-encoding All Variants All Renditions Multivariant Playlist 6. You MUST provide multiple bit rates of video Multivariant Playlist 7. Playlist codec type doesn't match content codec type All Variants 8. (Segment) The operation couldn’t be completed. (HTTPPumpErrorDomain error -16845 - HTTP 400: (unhandled)) (list of subtitle renditions) 9. (Segment) HTTP 400 - HTTP/2.0 400 Bad Request (list of subtitle renditions) 10. Multichannel audio MUST be separate audio stream All Variants 11. If EXT-X-INDEPENDENT-SEGMENTS is not in the multivariant playlist, then you MUST use the EXT-X-INDEPENDENT-SEGMENTS tag in all video media playlists All Variants 12. The CODECS attribute MUST include every media format present All Variants, does not declare EC-3
1
1
219
3w
How to maintain HEIF format for images generated by PHAssetCreationRequest
I generated an asset in the photolibrary by adding the unedited image, adjustmentData, and edited image with PHAssetCreationRequest.addResouce(). The image is saved in the photolibrary as HEIF. (Check with the photolibrary) Then, when I save the image generated with PHAssetCreationRequest.addResouce() to the Files app, it becomes JPEG. On the other hand, even if I edit an image taken with the camera and save it to the Files app, it still maintains the HEIF. Do you know why this happens? Also, how can I maintain the HEIF even when saving it in the Files app? Thanks.
0
0
146
3w
MPRemoteCommandCenter stops UIKeyCommand from working for a few seconds
Hello, We are seeing some strange behaviour when using MPRemoteCommandCenter as well as UIKeyCommand in our app on iOS 17. We are finding that when a UIKeyCommand is trigerred via external keyboard to start playing some music (via our own custom CoreAudio driver), the keyboard becomes unresponsive for a few seconds before UIKeyCommands are triggered again. Strangely enough, if we comment out all our MPRemoteCommandCenter code, the UIKeyCommands work without going into the unresponsive state for a few seconds. ie UIKeyCommands: override open var keyCommands: [UIKeyCommand] { let commands = [UIKeyCommand(title: String(localized: "__PLAY_STOP__"), action: #selector(shortcutPlayStop(_:)), input: " "), UIKeyCommand(title: String(localized: "__PAUSE__"), action: #selector(shortcutPause(_:)), input: "."), /** etc **/] commands.forEach { $0.wantsPriorityOverSystemBehavior = true } return commands } and MPRemoteCommands: MPRemoteCommandCenter.shared().playCommand.addTarget { [weak self] _ in self?.doStuff() // etc return .success } Note this issue did not occur prior to iOS17 🤨 Any ideas what could be going on? Thank you!
0
0
121
3w
Event callback issues with MediaSession API and iOS
Hi, I'm working on a web project that uses the MediaSession API to interface with the media notification on iOS. The issue that I'm experiencing occurs after pressing the play button in the media session modal where the session seems to NOT fire the event handler callback and also kill the media session itself. It's a strange behaviour considering that the pause callback works fine. audio_source = new Audio(url); navigator.mediasession.metadata = { ... // Metadata here }; navigator.mediasession.setActionHandler('play', (details) => { audio_source.play(); } ); navigator.mediasession.setActionHandler('pause', (details) => { audio_source.pause(); } );
1
0
150
3w
Problem with the phone's microphone
Hello, I'm having a problem with my Iphone 12: iOS version: 17.5.1 Model name: Iphone 12 When I call someone it's impossible to communicate, it seems that the microphone is deactivated or that it doesn't respond. I was able to extract the ips file from the "data": stacks+audiomxd-.... Here's an extract: {"bug_type":"288","timestamp":"2024-06-16 22:44:25.00 +0200","os_version":"iPhone OS 17.5.1 (21F90)","roots_installed":0,"incident_id":"7B8604DF-3863-4760-806C-591A90A7A7A4"} { "crashReporterKey" : "6928f591dd9e4d26541855e6d4b6a20d408bdfd1", "exception" : "0xbe18d1ee", "frontmostPids" : [ 34 ], "tuning" : { }, "absoluteTime" : 2954071508880, "product" : "iPhone13,2", "kernel" : "Darwin Kernel Version 23.5.0: Wed May 1 20:35:15 PDT 2024; root:xnu-10063.122.3~3\/RELEASE_ARM64_T8101", "date" : "2024-06-16 22:44:25.08 +0200", "reason" : "XPC message timeout in -[AVAudioSessionRemoteXPCClient getProperty:propertyName:MXProperty:reply:], probably deadlocked. Writing a stackshot and terminating.", "codeSigningMonitor" : 1, "incident" : "7B8604DF-3863-4760-806C-591A90A7A7A4", "build" : "iPhone OS 17.5.1 (21F90)", "roots_installed" : 0, "bug_type" : "288", "pid" : 102, "memoryStatus" : {"compressorSize":38088,"compressions":25391066,"decompressions":20835948,"busyBufferCount":3,"memoryPressureDetails":{"pagesWanted":467,"pagesReclaimed":2085},"pageSize":16384,"memoryPressure":false,"memoryPages":{"active":67555,"throttled":0,"fileBacked":60679,"wired":57187,"purgeable":3679,"inactive":65541,"free":1533,"speculative":2364}}, As you can see, one line states : "reason" : "XPC message timeout in -[AVAudioSessionRemoteXPCClient getProperty:propertyName:MXProperty:reply:], probably deadlocked. Writing a stackshot and terminating.", Deadlock occurs when two or more processes are waiting for resources held by the others, creating a situation where none of the processes can progress. In this case, it seems that the process has tried to recover an audio property, but has remained blocked indefinitely. What reinforces my doubts is that at the end of the .ips is a line that seems to give some informations as to where the problem is : "notes" : ["Requested by audiomxd","_dyld_process_info_create(623) for resampling UUIDs failed with 1","_dyld_process_info_create(2535) for resampling UUIDs failed with 1","_dyld_process_info_create(3181) for resampling UUIDs failed with 1","_dyld_process_info_create(3183) for resampling UUIDs failed with 1","_dyld_process_info_create(3503) for resampling UUIDs failed with 1","resampled 409 of 1813 threads with truncated backtraces from 0 pids: ","resampled 625 of 37 images missing from 175 pids: 75,93,98,178,190,210,...,3627"], Here's what my research yielded. Could you please help me? All calls are useless because the microphone no longer works. Regards
0
0
212
3w
Get downloaded tracks when querying MPMediaItem and can't detect them
Hello, We've a music app reading MPMediaItem. We got items using MPMediaQuery. But we realized that some downloaded tracks from Apple Music were fetched too. Not all downloaded track but only those who were played recently. Of course, since these tracks are protected with DRM we can't play them in our player. It's weird to get them in our query because we added predicate in order to dont fetch protected asset and iCloud item MPMediaPropertyPredicate(value: false, forProperty: MPMediaItemPropertyHasProtectedAsset) MPMediaPropertyPredicate(value: false, forProperty: MPMediaItemPropertyIsCloudItem) To be sure, we made a second check on each item we've fetched extension MPMediaItem { public func isValid() -> Bool { return self.assetURL != nil && !self.isCloudItem && !self.hasProtectedAsset } } But we still get these items. Their hasProtectedAsset attribute always return false. I dont know if it's a bug, but since we can't detect this items as Apple Music downloaded track, we can't either: filter them to not add them in our application library OR switch on a MPMusicPlayerController.applicationMusicPlayer to allow the user to play them
0
0
159
3w
RPBroadcastSampleHandler crashes while processing payload
We have an app with a broadcast extension with a RPBroadcastSampleHandler. The implementation is working fine, however for quite some users the extension suddenly crashes during the broadcast. The stacktrace stacktrace of the crashing thread always looks like the shortened sample below. (Full crash reports and stack traces are attached to the submitted Feedbacks.) Looking at the stacktrace none of our code is running, just ReplayKit code handling XPC messages at that moment: Thread: #0 0x00000001e2cf342c in __pthread_kill () #1 0x00000001f6a51c0c in pthread_kill () #2 0x00000001a1bfaba0 in abort () #3 0x00000001a9e38588 in malloc_vreport () #4 0x00000001a9e35430 in malloc_zone_error () [...] #18 0x0000000218ac91bc in -[RPBroadcastSampleHandler processPayload:completion:] () #19 0x0000000198b81360 in __NSXPCCONNECTION_IS_CALLING_OUT_TO_EXPORTED_OBJECT_S2__ () Is anyone aware of there issues with ReplayKit? Are there known workarounds? Could anything we're doing affect crashes like this? Would greatly appreciate it if anyone from Apple DTS could look into this and flag the below Feedbacks to the relevant teams! Feedback IDs: FB13949098, FB13949188
0
0
188
3w
AirDrop Requesting to Open Video via 3rd Party App Instead of Photo Library
I film and edit content using my iPhone and PremierePro. I've been doing this since 2017, so I'd like to say I know my way around an iPhone and the PremierePro software enough to get a finished product to my client. Before I send content to clients, I airdrop it to my phone to make sure that the quality of it is up to par. On this most recent project, I've had issues airdropping it to myself. Each time I do so, my iPhone prompts which 3rd party app I would like to open the video in, rather than automatically opening or saving the video into my photo library. I will list the specs below: Filmed on iPhone 15 Plus iOS Version 17.5.1 (at the moment this is the most up to date software update) Filmed in 4K at 60 FPS I have ample storage space on my phone and the video file size is 220MB Premiere Pro Export Settings: Video Settings - H.264, Field Order: Progressive, Bit Rate Encoding: CBR I will say that I purchased a transition and burns bundle and used it for the first time on this project. All materials used are in an .mp4 format and blend mode was set to overlay. Nothing out of pocket. I figured it wouldn't be a problem since my client would just be downloading it via dropbox, but there was an issue there as well. My client received an error message saying, "Sorry, this type of video cannot be saved to this device". The back road workaround was to take the saved video, plug it into a separate PremierePro project, and export it with the preset: Match Source - Adaptive High Bitrate. I was able to airdrop it to myself, it saved in my photo album and my client was able to download it without receiving that error message. If there is an explanation as to why I am having this issue and how I can avoid it, I would really appreciate it as I have never had this problem in the past.
0
0
188
3w
Reducing storage of similar PNGs by compressing them into a video and retrieving them losslessly--possibility or dumb idea?
My app stores and transports lots of groups of similar PNGs. These aren't compressed well by official algorithms like .lzfse, .lz4, .lzbitmap... not even bz2, but I realized that they are well-suited for compression by video codecs since they're highly similar to one another. I ran an experiment where I compressed a dozen images into an HEVCWithAlpha .mov via AVAssetWriter, and the compression ratio was fantastic, but when I retrieved the PNGs via AVAssetImageGenerator there were lots of artifacts which simply wasn't acceptable. Maybe I'm doing something wrong, or maybe I'm chasing something that doesn't exist. Is there a way to use video compression like a specialized archive to store and retrieve PNGs losslessly while retaining alpha? I have no intention of using the videos except as condensed storage. Any suggestions on how to reduce storage size of many large PNGs are also welcome. I also tried using HEVC instead of PNG via the new UIImage.hevcData(), but the decompression/processing times were just insane (5000%+ increase), on top of there being fatal errors when using async.
18
0
493
3w
GroupSessionJournal attachment loading error
Hello, currently working on a shareplay feature that allows users to pull 3d models from icloud and view it via volumes/immersive space on the vision pro. Was able to get the sharing working with multiple windows recently so now all that's left is to be able to sync/share the model in the SharePlay session. As I understand it, we should generally use GroupSessionMessenger for commands and light data like model positioning/syncing properties. Whereas for bigger pieces of data (images/videos/models), we should send these through GroupSessionJournal which the group session manages and syncs it for all users in the call. I have a button to get the current user's model data and add it to the journal via /// modelData is type `Data` try await journal.add(modelData) I have also set up a task to observe/receive updates to the journal's attachments in when receiving a group session. for await groupSession in MyModelActivity.sessions() { ... tasks.insert { Task { for await attachments in journal.attachments { for attachment in attachments { do { let modelData = try await attachment.load(Data.self) // throws error here - `notSupported` let modelUrl = writeModelDataToTempDirectory(modelData: modelData) self.modelUrlToLoadForGroupSession = modelUrl } catch let error { print("Error: \(error)") } } } } } } Not quite sure why I'm running into an error being thrown when attempting to load the attachment data on the other devices, any thoughts? The documentation for add(_:) and load(_:) say that the attachment should conform to Transferable but Data.Type should already conform to Transferable
1
0
282
3w
How to setup SharePlay reliably?
Hi, I’m developing an app that uses SharePlay. In specific, I’m using ShareLink in my SwiftUI-based app so that when 2 devices come close, it will start SharePlay via AirDrop, just like how Name Drop works (the animation is super cool, btw). However, I’ve notice that SharePlay doesn’t start reliably under the following conditions: Do both devices need to be signed in using different Apple ID? I wish it works with the same Apple ID. When both devices are running my app, the sharing does not seem to start; maybe both of them are trying to be the host app? When I try to demo this NameDrop-like transaction via Zoom, it usually doesn’t work; maybe because the cable is connected in Lightening port? Is some Mac app (in my case, Zoom or even QuickTime) capturing the screen of the device make it less likely to have successful SharePlay transaction? Thanks!
0
0
160
3w
Low Latency streaming via CDN
Hello gents, we have a problem serving LL HLS streams via CDN. Im kind of desperate what is wrong as stream plays correctly without CDN. The error thrown is: .invalidStream: Error Domain=CoreMediaErrorDomain Code=-15416 "Blocking Playlist Reload failed" (See -[AVPlayerItem errorLog] for 6 events) UserInfo={NSDescription=Blocking Playlist Reload failed, NSDebugDescription=See -[AVPlayerItem errorLog] for 6 events} errorLog: <AVPlayerItemErrorLog: 0x30174d5a0> when i check in manifest we have this enabled: #EXT-X-SERVER-CONTROL:CAN-BLOCK-RELOAD=YES,HOLD-BACK=6.000,PART-HOLD-BACK=4.000 what i do not understand is what this feature does or if CDN can somehow impact this feature. Any help is appreciated. Thanks!
0
0
233
3w
Stopped playing hls+fairplay, but was played yesterday
device iPhone 13 Pro max AVPlayer recieve error #Version: 1.0 #Software: AppleCoreMedia/1.0.0.21E236 (iPhone; U; CPU OS 17_4_1 like Mac OS X; en_us) #Date: 2024/06/11 14:06:18.018 CoreMediaErrorDomain error -42716 On system log we see propertyKey:IsLeaseExpired стандартное 14:38:28.008912+0300 mediaplaybackd <<<< FigCPECryptorPKD >>>> FigPKDCPECryptorSetKeyRequestResponse: 0xcc4160140 612C5D12-F92F-4897-B55D-854F842B41B4 keyResponseOptions:[] keyRequestResponse:0xcc5759d70 err:-42716 стандартное 14:38:28.009052+0300 mediaplaybackd keyboss ckb_transitionRequestToTerminalState: 0xcc5440380 <private> reqFin err <private> (-42716) dokeyCallbacksExist 0 стандартное 14:38:28.009138+0300 mediaplaybackd keyboss ckb_customURLReadCallback: 0xcc5440380 <private> customURLReqID 8 isComplete 1 err 0 error <private> (0) dokeyCallbacksExist 0 стандартное 14:38:28.009169+0300 mediaplaybackd <<<< FigPKDKeyManager >>>> keyManager_copyPropertyForEntryInternal: 0xcc546b280 6143FF61-5E6F-4506-A17D-4DB6B6BA0C5B propertyKey:IsLeaseExpired propertyValue: 0x16e5b17a0 стандартное 14:38:28.009196+0300 mediaplaybackd <<<< FigPKDKeyManager >>>> PKDKeyManagerSetKeyRequestError: keyManager:0xcc546b280 keyID:6143FF61-5E6F-4506-A17D-4DB6B6BA0C5B error:<private> (-19160) err:0 on server leaseDuration always is 0 But we have another device iPhone 15 Pro max, iOS 17.5.1 and he played correctly with the same crypt key from server
0
0
180
3w
ICDeviceBrowser fails to find any devices after iOS 18 update
I have an app that uses the ImageCaptureCore's ICDeviceBrowser to find and connect to external digital cameras. Prior to iOS 18 this worked just fine, the device browser would start up and find any cameras connected via USB. However since the update the device browser fails to ever detect any connected device or to trigger any delegate events at all after browser start. I noticed that the Contents authorization in iOS 18 is undetermined, where in previous iOS versions it would default to authorized. I tried to resolve this by requesting authorization, however this immediately returns denied without ever having prompted the app user for permission. I do have the Camera Privacy Usage description setup, and also am able to request permission for the iOS camera successfully. How can I successfully request contents authorization via ICC or otherwise? Or are there alternative Apple libraries I can use for finding and connecting to external digital cameras on iOS?
2
2
202
3w