Movies that are encoded with the HAP codecs are typically exported into standard .mov or .avi containers just like other video files you are used to working with.
There are four different flavors of HAP to choose from when encoding your clips.
Some encoders allow for encoding with an optional specified 'chunk' size to optimize for ultra high resolution video on a particular hardware system. This setting should typically only be used if you are reaching a CPU performance bottleneck during playback. As a general guide, for HD footage or smaller you can set the chunk size to 1 and for 4k or larger footage the number of chunks should never exceed the number of CPU cores on the computer used for playback.
For encoding to HAP from Adobe AfterEffects, first export to an intermediate format and use one of the below solutions, or try the 3rd party AfterCodecs plugin.
Additionally some media servers provide their own method for importing media to convert to HAP and can be used as an alternative where available. Consult the documentation for the systems you are working with for more information.
Many applications and batch exporters support QuickTime as an export option which includes a standard option panel for codec selection and parameter adjustment. When the HAP QuickTime component is installed, the HAP, HAP Alpha, HAP Q and HAP Q Alpha options will show up in the "Compression Type" menu. When using HAP and HAP Alpha a slider is provided for adjusting the output quality level.
The HAP QuickTime component installs as part of many software packages, or can be downloaded from the GitHub releases page.
The AVF Batch Exporter is a free simple transcoding tool is arranged into three settings panels and can be used to convert multiple files to the specified output codec settings in a single export session.
In addition to specifying a video codec, when using the HAP codecs the following sub options may appear depending on the format.
For users who prefer working with a command line or need to access advanced encoding settings for HAP, FFmpeg can be used to work with HAP movies.
If this is your first time using FFmpeg you may need to install it on your system, or compile it from source. In either case be sure that Snappy is enabled as part of the binary. If you already have FFmpeg on your system with Snappy enabled, you can skip this step.
You can check that your version of FFmpeg can encode HAP using
ffmpeg -encoders | grep hap
If the last line of output ends with
Vidvox HAP encoder then you can encode HAP. Otherwise install FFmpeg using one of these methods:
brew install ffmpeg --with-snappy
--enable-libsnappyto the configure script before building.
ffmpeg -i yourSourceFile.mov -c:v hap outputName.mov
ffmpeg -i yourSourceFile.mov -c:v hap -format hap_alpha outputName.mov
ffmpeg -i yourSourceFile.mov -c:v hap -format hap_q outputName.mov
In addition you can also specify the following optional flags that can be used to create HAP movies that are highly optimized for specific playback hardware. You should only use these in extreme cases if you have reached a specific bottleneck when using the default settings.
-chunks N(default is 1; N is a number from 1-64 that does not exceed the number of CPU cores in the playback system)
ffmpeg -i yourSourceFile.mov -c:v hap -format hap_q -chunks 4 outputName.mov
-compressor none(default is snappy; when set to none may marginally reduce CPU usage in exchange for much larger file sizes that are a fixed bit-rate)
ffmpeg -i yourSourceFile.mov -c:v hap -compressor none outputName.mov