GPU accelerated video playback in CoGe: meet with the Hap codec!

More then a year ago I made a blog post about how to prepare your media files to CoGe, or more likely, what is the best codec for CoGe. A few months later the guys at the Vidvox HQ and Tom Butterworth released a kick-ass GPU accelerated, open-source video codec family, called Hap. In CoGe 1.4.2, I added support to leverage the power of this new video codec family, when using the Native Quicktime Player module for movie playback, but until now, I did not do a comparison between Photo-Jpeg and Hap, and not even talked about video codec with alpha channel -  it's the time to make up the shortfall.

There is a pretty well explained blog post about the fundamentals of the Hap codec family, be sure to read it, but the most important things in a nutshell:

  • It uses the graphics card to decompress video frames, instead of the CPU
  • It creates larger files then usual, so a fast hard drive is recommended
  • Its a standard Quicktime codec, so once you installed the codec - install the codec! :) - you can export/transcode movies to Hap codec
  • Here is a list of what apps supporting Hap, so those can leverage the power of GPU accelerated playback

    So, I did some tests...

Test#1: Photo-Jpeg vs. Hap

For the test, I used a 15" Retina MacBook Pro  (Mid 2012, 2,3 GHz Intel Core i7). Created 5  Full HD (1920x1080) movies from some Beeple loops, then created a project in CoGe, rendering at 1920x1080, using 5 ClipSynth in a LayerGroup, with Addition Blend Mode on each. The results:

Photo-Jpeg vs. Hap Not surprisingly: Hap is the winner. Smooth playback of 5 FullHD videos, with low CPU usage, however, the file size of the Hap movies are greater then the Photo-Jpeg movies, so yes, a fast hard drive is needed.

Test#2: Animation vs. Hap Alpha

Previously, I suggest Animation codec to use in CoGe when you need a codec with an alpha channel. The normal Hap codec does not supports alpha, however, there is a type of  Hap which supports alpha channel as well: Hap Alpha. The test case was almost the same, but I created new version of the previously used loop with transparent parts, and this time, I used the Source Over Blend mode instead, since there are transparent parts of the movies. Results:

Animation vs. Hap Alpha Hap is the winner again. Still 10% better FPS, less CPU usage, but Hap Alpha files have much smaller file size! So, if you need to use movies with alpha channel in CoGe, export or transcode them to Hap Alpha!  

Finally, again: all the movie players in CoGe can playback movies using the Hap codec, but only the Native Quicktime Player can decode it using the GPU! Loops used for testing as well as the project files are available here.

Charts made by using