Posts

Post not yet marked as solved
1 Replies
1.3k Views
I am using aAVVideoCoreAnimationToolto render titles on top of a video composition.I used to use+videoCompositionCoreAnimationToolWithPostProcessingAsVideoLayer:inLayer:to instantiate the animation tool.However, I now need to use a custom compositor to render the video composition. I want to usevideoCompositionCoreAnimationToolWithAdditionalLayer:asTrackID:so that I have access to an asset track with the titles in my compositor.However, I can't get titles to render when adding the core animation layer as a track.In my custom compositor I have access to the track, i.e. I can get a pixelBuffer for the trackID I have assigned for the Core Animation layer when instantiating the animation tool. But these pixel buffers are empty.- (void)startVideoCompositionRequest:(AVAsynchronousVideoCompositionRequest *)request { CMPersistentTrackID titleTrackID = ... CVPixelBufferRef titlePixelBuffer = [request sourceFrameByTrackID:titleTrackID]; //titlePixelBuffer is valid pixel buffer but never contains any pixel data }When I set up the core animation tool the same way, but don't use a custom compositor, the title layer also isn't rendered.If I set up the animation tool using+videoCompositionCoreAnimationToolWithPostProcessingAsVideoLayer:inLayer:and don't use a custom compositor the title layer is rendered as it should.Is there anything I'm missing?(I am also adding the sourceTrackID of the title track to the composition's AVVideoCompositionInstruction instances)
Posted
by adriaan.
Last updated
.
Post not yet marked as solved
6 Replies
1.6k Views
I'm having some strange SwiftUI issues in a widget I'm building. Applying opacity to Text results in the Text not being rendered 	Text("hello") 		.foregroundColor(Color.green) 		.opacity(0.4) The above code fails to render (in preview and on simulator) for my widget target. It renders fine in a Playground. Applying trim to a Circle results in the Circle not being rendered 	Circle() 		.trim(from: 0.1, to: 0.5) Again, the above code fails to render (in preview and on simulator) for my widget target. It renders fine in a Playground. Does anyone have any ideas what could be causing this. I'm using Xcode 12.3
Posted
by adriaan.
Last updated
.
Post marked as solved
5 Replies
2.8k Views
For a video camera app I want the user to be able to adjust the input gain on the audio.On iOS8 an iPhone 6 and 5, I used to be able to do this through:float desiredGain = ...; NSError *error; [[AVAudioSession sharedInstance] setInputGain:desiredGain error:&error];However on an iPhone 6s / iOS9 I am no longer able to do this. AVAudioSession's isInputGainSettable returns NO for this setup.I am not sure if this is a hardware or an OS issue / change.Is there a way to adjust the input gain in iPhone 6s / iOS9?
Posted
by adriaan.
Last updated
.
Post not yet marked as solved
0 Replies
549 Views
My app allows users to manually configure an output resolution for the videos they create. I notice that above a certain resolution videos can't be saved to the camera roll (it fails silently). Is there any documentation about what the maximum resolution (for different aspect ratios) is that can be saved to the camera roll? From experimenting on a iPhone 11 Pro it seems to be around 8.5 megapixel frame size, but am hoping there's a way to know without trial and error.
Posted
by adriaan.
Last updated
.