Just a heads up: a Hap encoder/decoder was added yesterday to Libav.
(On the master git branch that is, not in a released/compiled version yet).
I just tried it (with some help of libav developer Vittorio Giovara who added the hap encoder/decoder), and it works perfectly. Now for the first time you can encode all your video’s to Hap on command line on a linux / osx /windows box
Hap decoding works out of the box, Hap encoding needs an additional dependency, which is libsnappy.
When you have that installed, you have to configure Libav with --enable-libsnappy, compile it, and then you should be able to encode with this command line:
Looking at the patch, I don’t think they’ve added support for the chunked encoding yet, which is needed when you get to very high resolutions or frame rates. So just FYI you’ll still want to encode with TD for those cases.
The on the CPU side of the Hap codec it does what is called ‘Snappy’ compression. For a 4Kx2K image this takes about 8ms. As you get up to higher resolutions this starts to be too high to maintain 60hz.
Chunked encoding allows the decompression of this data to be multi-threaded, bringing the decompress time way down.
Trying to follow this workflow on Windows (not using Touch Designer, but this thread was informative so thought it best to add to the conversation here).
From what I’ve found, the public windows build of libav (avconv) is not built with snappy, so it doesn’t support HAP, and you’d have to build libav yourself to get a version which does (which is no easy feat since you’ll need mingw and minsys2 to get started with that). I was about to start down that path, then checked in on ffmpeg. According to the ffmpeg readme, the 64bit static build was built with libsnappy enabled (ffmpeg.zeranoe.com/builds/readm … readme.txt) so I’m going to give that a try and let you know how I got on.
Well as this thread is already two years old I don’t have that specific macbook handy anymore But these days HAP is already included with ffmeg standard version, but you just need to install snappy compression as well. I think on macOS with homebrew this should do it: