Hap Codec
The Hap video codec is natively supported by AVPro Video on macOS and Windows in the Ultra Edition, and has the following benefits:
- Low CPU usage
- Low memory usage
- GPU decompression
- Supports very high resolutions
- Supports alpha channel transparency
- Fast seeking and variable playback speed
- Doesn't use GPU video decoding resources
The main downside is:
- Very large files
Windows Support
Hap, Hap Alpha, HapQ, HapQ Alpha and HapR are supported. AVI and MOV containers can both be used in Windows however we recommend the MOV container. Hap currently requires either the “DirectShow” or “Media Foundation” video API to be used.
Warning
There is currently a bug in Windows that prevents MOV files with a bitrate of more than 4Gbps from playing. We have created a fix for this which is activated by enabled "Use Custom MOV Parser"
in Platform Specific >Windows options.
Options
On Windows some options are exposed for Hap and NotchLC decoding:
Use Custom MOV Parser
Enables our custom MOV parser to be used, which is useful for Hap and NotchLC codecs, as a Microsoft parser is not able to open very high bit-rate MOV files. If your files are high bit-rate (above 4Gbps) then use this option otherwise the file will not load.
Parallel Frame Count
- Maximum number of threads to use for parallel frame decoding. Less threads for less latency in playback operations (seeking, playing etc), more threads for better performance.
Preroll Frame Count
- Amount of frames to decoder before starting playback, less frames for less latency in seeking, more frames for less chance of buffer emptying too quickly.
macOS Support
Hap, Hap Alpha, HapQ, HapQ Alpha and HapR are supported.
Encoding
Note
Width and height must be multiple of a 4 for Hap encoded videos in AVPro Video. Ideally a width with a multiple of 16 is best for performance (aligned copy).
JOKYO
In 2020 Jokyo introduced their fast and high quality Hap encoder with plugins for Adobe After Effects, Premiere Pro etc: https://jokyohapencoder.com
FFMPEG
Alternatively you can use a recent build of FFMPEG with the following command-lines:
ffmpeg -i input.mov -vcodec hap -format hap output-hap.mov
ffmpeg -i input.mov -vcodec hap -format hap_alpha output-hap.mov
ffmpeg -i input.mov -vcodec hap -format hap_q output-hap.mov
Notes:
- You can also add the
-chunks 4
option which will encode each frame into 4 chunks so the decoding work can be split across multiple threads, resulting in faster decoding as long as the disk can keep up. - Hap Alpha requires straight alpha (not pre-multipled).
- Sadly ffmpeg doesn’t yet support the HapQ Alpha format.
- We don’t support Hap Q Alpha variant in Windows when using the legacy D3D9 graphics API
- See Encoding Notes for more details