Jump to content

Watchout6 - notes regarding HAP


Recommended Posts

Hi everyone,


I stumbled upon issues using HAP I wanted to share,



HAP 12

Watchout 6.1.2

storage bandwith: 2.5GBs


CPU: 8cores 3.1GHz


I noticed two limits using HAP:




500Mbps per stream


My system is able to concurently play 7x 10240x1080 with no issue, barely above 11 megapixel

The same system has serious stutter with 1x 5400x2160, 11.6 megapixel

If I take the same movie and squeeze it to 5400x1900, 10.2 megapixel, it plays fine


Same goes for HAP files with more than 500Mbps bitrate, exact same result; barely under is fine, barely above is enough to cause issues.


The problem is I haven't found an efficient way to deal how to control the bitrate when encoding HAP, the only workaround seem to resize prior to the encode and wish it will be enough to reduce the bitrate.

For example, another 5800x2160 movie was unplayable, squeezed to 5400x1900 it was still unplayable, to obtain the correct bitrate I had to resize to 5800x1080 prior to the encode.


Hope this helps those with HAP issues!



Link to comment
Share on other sites

Given a certain resolution and hap flavour (standard, HapAlpha or HapQ), there is no way to control the bitrate. The Hap format uses a fixed compression scheme; Dxt1/5/Y texture format + snappy compression, where snappy is a LZW-like compression. 

The snappy decompressor is able to handle approximately 500 megabytes per second per core on a modern CPU. Going beyond that you will have some stuttering. Of course CPU-speeds vary a lot, so the 500 megabytes per second is a very crude approximation, your mileage may vary. 

One way around this is to use chunked encoding, where each frame is split up in a number of chunks which can be decoded independently, thus utilising more cores in the CPU. There are at least two encoders that can do chunked encoding, please see the links that jfk posted above. 

As for the number of chunks to use, there is no point in using more chunks that there are CPU cores in the system. Each chunk added gives a (very) slight overhead in the form of less compression. Under normal circumstances the difference should be less than 1 percent in file size. A good stating point could be 4 chunks. 




Link to comment
Share on other sites

  • 5 months later...

I am rendering to QuickTime from Adobe After Effects using the HAP codec but there are no options for bit rate or chunk size regardless of which flavor I use (HAP, HAP Q, HAP alpha...).  The only option presented at render time is a slider for "Quality" which seems to have little, if any effect on the file quality or size.  Is there a way to set chunk size in After Effects, or must another encoder be used.  If so, which one?  I tried without success to use ffmpeg.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...