GPAC support for HEIF

Apple has announced this week at WWDC2017 support for the High Efficiency Image Format (HEIF) (see video here). HEIF is a new image format defined within MPEG, by companies such as Apple, Nokia, Canon, … and by the GPAC team and Telecom ParisTech. So, the GPAC tools are already capable of producing HEIF images. This post provides instructions to do so.

HEIF is based on the constructs of the ISOBMFF that GPAC supports. For example, HEIF enables the storage of single images or image collections through the “meta” box and so-called items. HEIF also supports the storage of image sequences (like animated GIFs) using usual tracks, but of a new type called “pict”. HEIF was developed as a codec-agnostic container format (like ISOBMFF), but a first derivation of this generic format was standardized for images coded using the High Efficiency Video Codec (HEVC), as indicated by Apple. Nice examples of HEIF images and of its benefits  compared to other formats can also be found on the website of some playback tools developed by Nokia.

GPAC supports generating HEIF images, that will play in Nokia’s implementation, using MP4Box, with the following command line:

This will take the first image of the HEVC file, create a “meta” box, add one image item, make it a primary item and add the “heic” brand to the output file.

The following command line will do the same but for the next IDR frame after the given time and the “heix” brand.

Finally, the following command line will take a tiled HEVC stream (as described in our previous post) and generate one item per tile and one item for the entire image.

For more options, look at MP4Box -h meta.

Future developments in this area will include analyzing the frames and generating appropriate brands, supporting transparency and animations.

As usual with the tools in GPAC, feel free to use them, to tell the community about it, to report any problem you may have, to request features, and of course to contribute code this initial support.

One thought on “GPAC support for HEIF

Comments are closed.