AVAssetWriter settings for ProRes422

For editing ProRes videos, what are the right compression settings for AVAssetWriter? This is for editing an existing ProRes video.

Replies

AVAssetWriter will write a new file, not edit an existing file. Perhaps you meant AVAssetReader or AVMutableComposition?

Well I meant editing a video rather than recording a video (in which case you get recommendedSettings from AVCaptureVideoDataOutput for writing using AVAssetWriter). If you want to edit a video using AVMutableComposition and exporting it using AVAssetReader and AVAssetWriter combination, then I am not sure what should be filled in compression dictionary (AVVideoCompressionPropertiesKey) for ProRes video.

Ah, I see. You might try AVOutputSettingsAssistant, but it looks like that class does not have a dedicated preset for ProRes. I'm guessing that you are using AVAssetReader/Writer because you want to modify the samples before writing them to disk, but if that's not the case you could use AVAssetExportSession and one of its ProRes presets.

  • I want to use my custom export session class that uses AVAssetReader/Writer as I am using it in my workflow. How to correctly adapt it to ProRes videos?

  • You should have the option to omit AVVideoCompressionPropertiesKey entirely.

  • Ok I see that. But when I record video using AVCaptureVideoDataOutput, I do see some elements in AVVideoCompressionPropertiesKey dictionary through recommendedSettings. I am not sure what would be the result to omitting AVVideoCompressionPropertiesKey, but is there a way to copy this dictionary from input video file for instance (I can't find a way to do this though)?

Add a Comment

There is no API for getting recommended ProRes settings based on an input file, unless you count AVAssetExportSession which implicitly chooses settings on your behalf. It does seem like a mismatch that there are ProRes export session presets but no ProRes preset for AVOutputSettingsAssistant. Would you mind filing a feedback assistant report for us to improve that?

Add a Comment

FB9709363 filed!