Isadora support for HAP avi
This article was originally written to help users add Hap support to Isadora 2.x
Isadora 3 now installs Hap (if not already present) during the installation process. If you are running Isadora 3 or newer the steps outlined in this article for installing Hap are not necessary, but still maybe offer better understanding of the components utilized.
The next section about Hap DirectShow Video, offers important information to all Windows users and is recommended reading for any Isadora users wishing to use the Hap codec.
About HAP DirectShow Video
Isadora supports HAP codec playback on windows using the native Microsoft DirectShow system.
Like the original QuickTime HAP playback, HAP DirectShow utilizes the GPU to decompress the video. This means the CPU is free to do other jobs, greatly increasing the capabilities of Isadora.
Direct Show is a native part of the Windows operating system and is regularly maintained and updated by Microsoft, while QuickTime for Windows is no longer supported by Apple.
Internal testing has shown that HAP DirectShow performs slightly better on Windows than HAP QuickTime.
For these reasons it is recommended that Isadora users developing on Windows use HAP DirectShow rather than HAP QuickTime.
- Maximum performance available on Windows systems
- Regularly updated and maintained by Microsoft.
- HAP DirectShow files compress to significantly larger files sizes than HAP QuickTime.
- a limited number of Video applications support the HAP DirectShow Codec
HAP DirectShow video, sometimes referred to as HAP avi (due to the file extension used) offers three variations.
Each of the three variations has both a common name and a four-letter code that identifies it within DirectShow. The four-letter codes also appear within Isadora when viewing media details.
These are the three common names followed by the associated four-letter codes in parentheses.
- HAP (hap1)
- HAP Alpha (hap5)
- HAP Q (hapy)
About the Codec Variations
This is the standard HAP version. It does not include any alpha channel information and produces smaller files sizes that either of the other HAP options. The available configuration dialog offers quality options, but our tests show no difference in these files (exact matching file sizes), however depending on the software used for compression this setting may affect the engine used and is therefore recommended to use the high-quality settings since this seems to utilize GPU rendering when available. It is suggested you test this in your software of choice.
HAP Alpha (hap5)
This HAP version matches the quality settings of HAP (hap1) but also contains alpha channel information.
To include alpha channel information, this option must be selected in the codec configuration provided by the software being used, this is often not the default, and some software may not offer support.
(e.g.: Vegas Movie Studio does not offer alpha embedding on compressed avi files, so HAP Alpha is flattened onto a black background).
HAP Q (hapy)
Q is for quality, and this version of HAP offers the best quality image, as well as, the largest file size.
How to Install the HAP Directshow Codec on Your System
The HAP DirectShow codec is freely available. To install the codec on your system you need to download 'Windows installer (1mb)' from the RenderHeads site and run the installer once downloaded.
Listed with the installer are two sample HAP DirectShow files, and additional software required for software development but NOT needed to install the codec to work with Isadora.
Download HAP Directshow Codec at, https://github.com/Vidvox/hap-directshow/releases.
Additionally, your system needs to have the Microsoft c++ redistributable 2008 x86 libraries available. You can download the installer from Microsoft.
If these libraries are not installed you will not receive an error, rather the Hap codecs will not be listed as available to you in your video software. (some editors/encoders install these libraries as part of their installation process).
Software That Is Known to Support the Export of HAP DirectShow Files on Windows
We have found and tested two freely available software solutions that can export to HAP DirectShow, and have tested a number of paid software options as well.
The freely available software's tested are VirtualDub and Wax 2.
The paid software's tested are Adobe After Effects, Corel VideoStudio X10, Magix Vegas Movie Studio 14 (formerly Sony Vegas Studio).
Why these paid solutions are included
Adobe After Effects is part of the Adobe Creative Cloud, and popular among Isadora users, additionally Adobe Media Encoder should perform similarly (Media Encoder is available in a number of Creative Cloud packages).
Note: Adobe has removed Quicktime support as of version 2018 (15.1) of Media Encoder. This does not affect the creation of Hap avi files but does remove Hap mov support.
Corel VideoStudio X10: Available for under $80 USD. Is the only 'low cost' solution we found that can batch convert QuickTime MOV file to HAP DirectShow.
Magix Vegas Movie Studio: Available for under $50 USD. Supports converting QuickTime MOV files to HAP DirectShow.
Software Known to NOT Support the Export of HAP DirectShow
- Blackmagic design DaVinci.
- Microsoft Expression Encoder (free)
|Magix Vegas Movie Studio V14 (platinum or higher)||HapQ avi||Y|
|Blackmagic Fusion 9 (audio must be available as separate file)||HapQ avi||Y|
|HAP not available in Quicktime codec list|
|Corel VideoStudio X10||HapQ avi||N|
|HAP not available in Quicktime codec list|
|Adobe After Effects||HapQ avi||Y|
|HapQ mov support removed as of version 2018 (15.1)||Y|
|Wax 2 (only works with avi) and unstable during testing.||HapQ avi||N|
|VirtualDub (only works with avi)||HapQ avi||Y|
A Note About Including Alpha
Alpha channels come in two flavors, "straight", and "premultiplied."
Straight alpha retains more color information and provides a cleaner edge, but premultiplied alpha is used in some software by default. Isadora supports playback of both types of alpha channels. The 'alpha mode' input of the Movie Player actor defaults to 'straight' – change it to 'premultiplied' if you see dark bands around the "haloes" where the edges of your image is soft or blurred.
Adobe After Effects allows you to select either type of alpha, while VirtualDub only provides straight alpha.
Many video processes only work with premultiplied video, so Isadora actors generally convert the alpha type automatically.
For cases where the conversion can't be done automatically, Isadora also provides an actor called "Alpha Tool" that allows you to force the premultiply or unpremultiply the image.
Two (three if we consider Adobe Media Encoder) software options offer batch compression.
- Corel VideoStudio X10 offers batch conversion of any supported video format (includes Mov) to all available HAP DirectShow variations.
- VirtualDub offers batch conversion of .avi files to HAP .avi.
VirtualDub, like Wax 2 only supports loading and saving to avi.
Transcode from MOV to AVI
Depending on the software you choose to use you may need to convert your video files from QuickTime format to AVI. Transcoding to Uncompressed Avi before compressing to HAP DirectShow will preserve your file quality.
One such tool is Batch. (Batch convert Mov to Avi with Batch Export Utility). *Sorry, Batch has been discontinued.
If converting video with alpha information be sure to select 32bit uncompressed avi to maintain the alpha information.
VirtualDub, download and install.
Follow the download links to get the Zip containing the program. Extract the contents of the zip to a folder where you wish to store the application. (no installer/setup is required)
Using VirtualDub to create HAP AVI video files.
- Open VirtualDub (launch VirtualDub.exe).
- Once open go to the 'File' menu and select 'open video file...'
- Select an AVI video. This is the Only container VirtualDub works with. (See above: transcoding from MOV above)
If the video displays in the video panes the file is supported.
- [OPTIONAL] right click in the video pane and select Zoom: 25%, repeat on the other video pane.
Being able to view both video panes can help to avoid some issues.
Another method is to select menu option: View / Pane Layout / Auto-size panes
- Go to the 'Video' menu and select 'Compression...'
- Now select the HAP codec from the left menu of installed codecs.
Notice the information window on the right labeled 'Format'. This panel tells you some important information about the codec you have selected.
Specifically for the HAP codec, it tells you that the width and height must be an even multiple of 4 (eg: 640 x 480 or 1920 x 1080 ) and the supported color depths are 24 and 32.
- You can now open the 'Configure' dialog. This dialog offers some codec settings. (we recommend starting with the defaults).
- Click OK to close the 'Compression...' window.
- Goto 'Color Depth...' found under the 'Video' menu.
If you are using HapA you will need to select the '32 bit RGB (888) (dummy alpha channel)' option for both the Decompression format and the Output format.
If your video has Audio, you will need to select appropriate options under the 'Audio' menu, otherwise select 'No Audio' under this menu.
- [OPTIONAL] save your processing settings. Goto 'Save processing settings...' under the 'File' menu.
Give the file a descriptive name (eg: HapA-32bit-NoAudio.vdscript) These settings files are required for Batch processing in VirtualDub.
- Start the compression/export process now by selecting 'Save as AVI...' from the 'File' menu.
Select a location for your exported file, and enter the filename to use for the saved file.
- Click 'Save'.
You should see a dialog open with output progress shown, and the video panes of VirtualDub should show you the progress thru your video file.
VirtualDub Batch Compression:
- Either follow the single file configurations steps (up to and including the optional 'Save processing settings...') or load the settings file you would like to use.
- Open 'Batch Wizard...' from under 'Queue Batch Operation' in the 'File' menu.
- Set your output folder, by clicking the '…' button located on the right side of the top section of the dialog.
- Add avi video files to the 'List of files' by dragging the avi video files you wish to convert to HAP into the list area.
- Once all videos you wish to batch are listed you can multi-select their names in the list,
then click 'Add to Queue' and click 'Re-save as AVI'.
- The selected files will be removed from the wizard's list.
- Click 'OK', to close the wizard window.
- Open 'Job Control' from the 'File' menu
- The Job Control window will open and should list the items you added to the batch queue.
- Click 'Start'