如何在 iOS 上以 ProRes 编解码器录制视频?

How to record video in ProRes codec on iOS?

我想从设备的后置摄像头直接捕捉视频到 ProRes 编解码器,现在 .proRes422.proRes4444 在 iOS 11 中作为 AVVideoCodecType 选项可用。

但我收到一条错误消息:

unsupported given the current configuration

在 iPhone X 和第二代 iPad Pro 上,尝试使用以下代码捕获视频时:

movieFileOutput.setOutputSettings([AVVideoCodecKey: AVVideoCodecType.proRes422], 
                                  for: movieFileOutputConnection!)

如果这种方法是错误的,可以使用AVCaptureVideoDataOutputAVAssetWriter对捕获的视频进行编码吗?

我收到了 Apple 相机软件团队工程师 Brad Ford 的回复:

The AVVideoCodecType (string) is available, meaning you can compile code that references this constant without a compile error. But AVCaptureMovieFileOutput is telling you the truth. ProRes is not supported on iOS.