AVFoundation H.265 hardware encoding

3.8k Views Asked by At

The WWDC 2014 session 'Direct Access to Video Encoding and Decoding' covers H.264 encoding using kCMVideoCodecType_H264, but looking at the CMFormatDescription docs, there doesn't appear to be an equivalent for H.265.

Is it possible to encode to H.265 in a hardware-accelerated manner using AVFoundation?

4

There are 4 best solutions below

0
On BEST ANSWER

Updating this question to give an answer now it's a few years later and things have moved forward.

CMFormatDescription can now be used with constant kCMVideoCodecType_HEVC, available since iOS 9.0.

Apple did a session at WWDC 2017 entitled 'Working with HEIF and HEVC' https://developer.apple.com/videos/play/wwdc2017/511/

0
On

No.

Because there is no mobile GPU that support hardware h265 codec until now(2016.12)for iOS platform, iPhone 7 also has no hardware HEVC codec. FaceTime use software based h265 codec.

for Android platform, the first Snapdragon that support HEVC codec is Snapdragon 810, which appear at 2014.

The first desktop GPU (NVIDIA GTX-980) that support hardware h265 codec appear at 2014.9.

1
On

Short answer, no.

More detailed answer, according to the documentation, the only codecs support by Apple on iPhone are H264. On OSX you can also use Apple ProRes, but all the sources I've found are consistent in saying it's a really limited set of codecs. In the settings for AVAssetWriterInput (where you specify the output settings, there is only support documented for H264 and JPEG).

https://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVFoundation_Constants/index.html#//apple_ref/doc/constant_group/Video_Settings

0
On

Updating this question.

Apple has enabled HEVC hardware decoders with GPUs in iPhone 8 and later.