Jason Fletcher
VJ Loop Artist
What's the difference between HAP versus DXV?
SHORT ANSWER:
Both the HAP codec and DXV codec are fully supported by Resolume. The HAP codec has near identical functionality and performance to the DXV codec. You can use the HAP codec in Resolume without any concerns.

LONG ANSWER:
To save on storage space for distribution, any videos without an alpha channel (transparency) are rendered out using the H.264 codec (MP4 file format). And any videos which include an alpha channel are rendered out using the HAP-alpha codec (MOV file format). I prefer to use HAP since it's fully supported by all VJ softwares, whereas DXV is limited to Resolume.

But the H.264 codec is terrible for VJing. The reason is because H.264 decouples the color data from the motion vector data, and then the color data is keyframed sporadically and the motion vector data keyframed continuously. So this is how the H.264 codec is able to make videos with a much smaller file size. Yet that means if you scrub, speed up, or reverse the video then the CPU has to do a ton of extra work since it's effectively recompiling the frame that you requested. This often means that the frame rate stutters as the CPU struggles to keep up. This is further compounded when VJing and you're playing back lots of other videos and yet the CPU is being hogged by the H.264 decoder.

What makes HAP and DXV perfect for VJ-ing is that within the MOV container is an image sequence that utilizes GPU decompression and so that allows you to easily scrub, speed up, or reverse the video in real-time. At a deep technical level, HAP and HAP-alpha use the DXT1 and DXT5 texture compression, which is the same as DXV. HAP uses snappy CPU compression and DXV uses LZF, both are very comparable in speed/size. It's not know exactly how the HAP and DXV decoders are implemented into Resolume since it's closed source software, but based on my tests they both perform the same. You can test this on your own by counting how many different HAP or DXV videos you can playback at the same time in Resolume and watch for when your frame rate drops.

Contrary to popular belief, HAP is just as efficient and performant as DXV for use within Resolume. In fact HAP videos can be used interchangeably/concurrently with DXV videos. It is not necessary to convert HAP videos to DXV. But the H.264 (MP4 file format) videos should definitely be converted to HAP or DXV, whichever you prefer, though I'd recommend HAP.

Below are the results of rendering out tests using HAP and DXV. The original source is the 10-bit Workflow Viability and Codec Comparison article. I have soloed the HAP and DXV results to make direct comparison easier. Although keep in mind this article is looking at 10-bit color and so their bar for quality is therefore higher than 8-bit color use cases. The results are still interesting and useful, but I feel the "Quality Grade" and "Grade Overall" is weighted towards the quality of gradients in a 10-bit color space. So for the purposes of VJing the results are quite similar.

Comparison of HAP versus DXV codecs

SOURCES:

How can I batch convert videos to use the HAP codec?
FREE OPTION FOR WINDOWS:
Make a BAT script that will automatically convert all videos within a single folder.
1. Install FFmpeg and then restart your computer.
2. Open a text editor (such as Notepad++). Copy-and-paste ONLY ONE of the scripts listed below into the text editor:
• Script to convert videos into HAP:

for %%i in (*.mp4) do ffmpeg -i "%%i" -c:v hap "%%~ni_Converted.mov"

• Script to convert videos into HAP Q:

for %%i in (*.mp4) do ffmpeg -i "%%i" -c:v hap -format hap_q "%%~ni_Converted.mov"

• Script to convert videos into HAP Alpha:

for %%i in (*.mov) do ffmpeg -i "%%i" -c:v hap -format hap_alpha "%%~ni_Converted.mov"

3. Save the file as BATCH-CONVERT.bat and move it into the folder containing all of the videos.
4. Double-click the BATCH-CONVERT.bat file to begin rendering.


FREE OPTION FOR MAC:
AVF Batch Exporter

How can I batch convert videos to use the DXV codec?
FREE OPTION FOR WINDOWS AND MAC:
Resolume Alley