Generate independently decodable frames in the HEVC format, or opt out for older devices.
Beginning in iOS 12, the HEVC video codec supports delivery of open GOP (group of pictures). When open GOP is off, the encoder generates groups of pictures that are independently decodable, with no frame dependencies across sync samples. When enabled, the encoder may use open GOP frame dependency structures to increase compression efficiency or quality. In practice, open GOP HEVC compresses better than closed GOP, allowing for smaller file sizes and better quality for the same file size. In apps built with the iOS 12 SDK,
AVCapture uses open GOP by default when compressing using HEVC.
Opt Out of Open GOP for Older Devices
If you don't want to encode using the open GOP strategy, use
set to set a dictionary containing
AVVideo (HEVC) and an
AVVideo subdictionary. In the subdictionary, set the value of
NO. To remove this key:
Create a mutable copy of the returned dictionary.
kkey from the subdictionary of the copy.
VTCompression Property Key _Allow Open GOP
Absence of the key implies that
NO. Apps linked against iOS 12 will also see a change to output from
recommended. When the recommended video codec is HEVC,
AVCapture will also recommend OpenGOP by including the
k key/value pair set to
YES in its