Post

Replies

Boosts

Views

Activity

Reply to Frames out of order using AVAssetWriter
Thank you for the context @galad87! I did suspect issues with the presentation timestamp, but unfortunately have been unable to recreate the issue by artificially messing with the timestamps. The relevant method is append(_ pixelBuffer: CVPixelBuffer, withPresentationTime presentationTime: CMTime) on AVAssetWriterInputPixelBufferAdaptor. From my experimentation, artificially delaying a timestamp just causes a delay in the footage (somewhat obvious), while setting timestamps in the past just causes the writer to fail since AVAssetWriter expects frames in order. I have not been able to find a combination of timestamps to force the reordering behavior described before. Something could definitely still be wrong with our implementation, but I am starting to wonder if something is going on with AVAssetWriter internally.
May ’23
Reply to RAW photos display as if overexposed in iOS Photos and MacOS Preview
Finally figured out the cause. Behind the scenes, iOS and MacOS apply a strong tone curve to RAW images. Many default methods of loading and displaying an image (including those used in the stock apps) don't allow you to change this setting. I imagine that this tone curve is appropriate for ProRAW images, but breaks earlier RAW formats. Unfortunate that it's applied indiscriminately in most Apple software. However, there is a way to display these RAW images properly in your own apps. Just load data into a CIRAWFilter and set the boostAmount to 0.
Jun ’23
Reply to iOS 17.4 breaks 48 MP capture in certain scenarios
@gchiste I looked into this some more today and was able to create a reproducible example with a few modifications to the AVCam sample code. I attached this example project in my report (FB 13683293). The key factor for reproduction (apart from the manual configuration described in my original post) is to have an AVCaptureVideoDataOutput attached to the session. On iOS 17.3, this makes no difference and 48 MP images are captured regardless of the presence or absence of the AVCaptureVideoDataOutput. On iOS 17.4, the presence of the video data output causes photos to revert to 12 MP, and removing the AVCaptureVideoDataOutput allows 48 MP capture once again.
Mar ’24