HAP video codec, encode under Linux

HAP video codec is compiled by default in FFmpeg for decoding, but not for encoding.
Here the way for compile FFmpeg with encoding option enabled:
First, you need to install snappy library.
Under Achlinux, you can install it with:
sudo pacman -S snappy
Then download FFmpeg source, extract and go inside directory.
Enter these command:
./configure --enable-libsnappy
make
sudo make install
Now you can encode video in hap with this command:
ffmpeg -i image_%4d.jpg -vcodec hap -format hap my_video.mov
For HAP Q:
ffmpeg -i image_%4d.jpg -vcodec hap -format hap_q my_video.mov
For HAP Alpha:
ffmpeg -i image_%4d.jpg -vcodec hap -format hap_alpha my_video.mov
Actually HAP Q Alpha is not supported yet.