First of all, download the Smode Tech Hap compression plug-in here:
Here are some keys to understand what make a good compromise between Quality and Performances during the restitution:
Hap is an association between 2 compression algorithms:
8bit image compression algorithm (destructive):
Make images natively displayable by the graphic card without having to decompress them. This allow to gain a non-negligible decompression time as well as a bandwidth gain on the graphic card. DXT1 divide the octet size of an image by 6, DXT5 by 4. As it is destructive, DXT compression will always be a little bit rough on color gradients (creating Banding effects).
file compression Algorithm
Inside of the Hap, once Images are coded in DXT, then the images sequences uses Snappy compression algorithm to reduce the Hap file size in a non-destructive way. Snappy is very fast to be executed for the processor. If it is cut into chunks, then the decompression can be parallelized on many different cores of the processor.
Nowadays it exist 4 different quality modes for HAP format:
(DXT1 one texture compressed in RGB)
(DXT5 one texture compressed RGBA) (Alpha channel support)
(DTX5 one texture compressed in RGBA with the alpha channel used to "increase" RGB quality, so no Alpha support in HapQ)
(2 textures compressed,
Not supported into Smode
Even if HapQ offer a better quality than Hap for high frequencies images (details and high contrasts), as it uses a non-RGB color space (YCoCg) it's quality on low frequencies (subtle colors gradients) is not as good as regular Hap. HapQ is also heavier than regular Hap
All encoding Hap softwares are not equivalent, for the restitution performances to be good, multiples chunks must be supported. Also DXT encoder must be of good quality to minimize the banding effects on gradients.
Here are some softwares we recommend (by order of preference):
The softwares supporting QuickTime plugins such as
Adobe Media Encoder
The QuickTime HAP plugins for windows offer a very good DXT compression quality. Go check the link on the top of this page to download the modified plug-in by Smode Tech to benefit from the 16 chunks.
The mac version of the QuickTime HAP plugin unfortunately does not support multi-chunks which is trouble to benefit of the multi-core CPU for high resolution video streaming. So for the time being we prefer the Smode Tech plugin until the vidvox development team fixes this issue on Mac : version-1247
It is also possible to directly export and transcode videos in HAP and Hap Alpha from Smode (HapQ and HapQ Alpha export is not supported yet). Go check at the bottom of the
Manage the list of media directories
part of the documentation for more intel. The Smode DXT encoder lean on Squish by default, which actually offer a better quality than the encoder provided by the Graphic cards drivers.
And last but not least :
). FFmpeg is a little bit austere but free, it support multiple chunks, it has a DXT encoder fast but of poor quality. Here are the command lines using different Hap formats :
ffmpeg.exe -i %sourceFile% -vcodec hap -format hap -chunks 16 %destination%
ffmpeg.exe -i %sourceFile% -vcodec hap -format hap_q -chunks 16 %destination%
ffmpeg.exe -i %sourceFile% -vcodec hap -format hap_alpha -chunks 16 %destination%
Note that for image sequence you need to add framerate parameter and use a %d expression to define where the number in the input file names is:
ffmpeg.exe -framerate 25 -i "C:\myFolder\image (%d).jpg" -vcodec hap -format hap_alpha -chunks 16 %destination%
Here is an example of converting an image sequence with ffmpeg.exe. First download it there: https://ffmpeg.zeranoe.com/builds/
and open the windows command prompt (type cmd inside the windows search engine and execute it).
Now type "cd (path of the ffmpeg.exe file)" inside the command prompt to have access to ffmpeg.exe. This executable is inside the *.bin folder of the zip you downloaded on the link above.
Here is an example in which my image sequence (which I want to convert) is inside the folder "C:\Sequences\Jungle". And the folder of my output file will be "C:\Sequences\Export\Jungle\Jungle01.mov".
Note that all the folders must be created before launching the ffmpeg converter and that your Image sequence resolution should be a multiple of 4.
If you want to encode a video instead of an image sequence, just type "fileName.mp4" instead of "ImageSequence%d.png" in the example below.
Once the video is exported, to check inside of Smode if everything is well, just select the files inside of the medias directories:
Go check the
Displays a preview of medias from the Files Panel
part of the doc inside the chapter "files informations" to get more infos on that matter.