Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AVFoundation H.265 hardware encoding

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?

like image 559
David Haynes Avatar asked Jan 26 '26 18:01

David Haynes


2 Answers

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

like image 78
Tim Bull Avatar answered Jan 28 '26 11:01

Tim Bull


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.

like image 28
lbsweek Avatar answered Jan 28 '26 10:01

lbsweek