18

I would like to capture video from device’s back camera directly to ProRes codec, now that .proRes422 and .proRes4444 are available as AVVideoCodecType options in iOS 11.

But I receive an error that recording is:

unsupported given the current configuration

On both iPhone X and second generation iPad Pro, when trying to capture video with the following code:

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

If this approach is wrong, can the captured video be encoded by using AVCaptureVideoDataOutput alongside AVAssetWriter?

Tzar
  • 5,132
  • 4
  • 23
  • 57
  • As far as i know ProRes422 is only supported on Mac OS X – Erik Terwan Dec 05 '17 at 15:29
  • @ErikTerwan [Apple Developer Documentation](https://developer.apple.com/documentation/avfoundation/avvideocodectype/2875383-prores422) explicitly states that ProRes 422 is supported on iOS 11.0+ and tvOS 11.0+. – Tzar Dec 05 '17 at 15:36
  • @ErikTerwan As is [ProRes 4444](https://developer.apple.com/documentation/avfoundation/avvideocodectype/2875384-prores4444). – Tzar Dec 05 '17 at 15:37
  • The symbol being available on those platforms is not the same as the configuration being supported at runtime. What does `-availableVideoCodecTypes` return on your devices? – Tim Dec 14 '17 at 04:21
  • @Tim For `AVCaptureMovieFileOutput`, on both the iPhone X and iPad Pro 10.5”, it returns HEVC, H.264, and Motion JPEG. – Tzar Dec 14 '17 at 04:30
  • @Tim Why would Apple mark these symbols as supported if they are completely useless? – Tzar Dec 14 '17 at 04:32
  • 2
    @Boletrone there's a difference here between "available" and "supported." Just because iOS is aware of the existence of a format, and has named it using a symbol, doesn't mean that it immediately supports everything to do with the format. It could support decoding but not encoding; it could support offline editing, but not capture; or support might be planned for a future release. – Tim Dec 14 '17 at 06:34
  • @Tim Turns out you were right. – Tzar Dec 20 '17 at 07:33

1 Answers1

8

I received a response from Brad Ford, an engineer from camera software team at Apple:

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.

Tzar
  • 5,132
  • 4
  • 23
  • 57