Announcing Hap Video Engine
Oct 21 2016 | 8:06 pm
Hey folks, I’m happy to officially announce the new hap video engine package available with Max 7.3.1 via the Package Manager. Those of you with experience using the jit.gl.hap external already know the significant performance gains achievable when playing back HD and UHD files encoded with Vidvox’s excellent Hap codec.
The hap video engine brings optimized Hap playback functionality to both Mac and Windows 32 and 64 bit platforms. The deprecated Quicktime library is no longer required. And since the hap package is installed as a video engine, seamless integration with jit.movie is now possible. After installing the hap package from the Package Manager, you simply create a jit.movie @engine hap @output_texture 1 and you’re off.
There are some caveats and limitations: - jit.playlist not supported - output_texture 1 only, no matrix output - Mac: requires 10.10+ - Windows: no reverse playback
Windows users must also convert their Hap files to AVI file format, the MOV file format is not supported on Windows. In order to encode Hap AVI files, you must install the DirectShow codec found here: http://renderheads.com/product/hap-for-directshow/. After that you can use something like Adobe Media Encoder to create your Hap AVI files.
Mac users can convert using the AVF Batch Converter app found here: https://github.com/Vidvox/hap-in-avfoundation/releases/latest
- Francois WeberOct 22 2016 | 3:43 amhi Rob,Thanks for this hap engine ! just 2 questions : 1 - it work fine with jit.movie, what about jit.movie~ (audio in MSP) ? 2 - is it better to use local @engine hap or to change it in the Max preferences ?thanks again fxw
- Rob RamirezOct 22 2016 | 7:47 pmhi francois1 - jit.movie~ is backed by the viddll engine, so it supports Hap playback, but through ffmpeg rather than through the native OS libraries of this hap engine. there are some improvements to Hap playback in viddll in a forthcoming update, however the hap engine is the most optimized way to play Hap files on either OS.2 - there is absolutely no functional difference. whatever's most convenient for you.
- Francois WeberOct 22 2016 | 9:22 pmThanks Rob, It is very clear.
- Joseph HydeOct 24 2016 | 1:19 pmThis sounds great, but I'm still on 10.9, and probably not updating that until I get a new machine. I don't suppose there's any chance this could (ever) be backwards compatible, is there? I know, it's probably an annoying question..
- Rob RamirezOct 24 2016 | 4:44 pmnope, sorry. requires OS features only available in 10.10+there will be some improvements to hap playback in viddll in a forthcoming update, but not as impressive as the native library versions in the hap engine.jit.gl.hap on 32 bit is still the best solution for
- Joseph HydeOct 25 2016 | 12:26 pmThanks for the reply Rob, and for the guidance as to the best solution until such time as I update..
- Jonas MagnussenOct 27 2016 | 10:46 pmAmazing! Can't wait to test this, will make for a fantastic improvement to my jitter patches.
- BartOct 30 2016 | 4:55 pmWoow... this is great !!! ^^ I assume it's only for playing HAP videos but we never know; is this engine can be used to record HAP videos ?
- Rob RamirezNov 02 2016 | 4:33 pmyou can record Hap files on the Mac with [ jit.record @engine viddll @codec hap ]i wouldn't recommend it for realtime recording though.
- BartNov 04 2016 | 5:05 pmHi Rob,Thank you for your answer !Your non recommendation of realtime recording on mac, is it for the codec hap or for the engine ?
- Tiny OrbitNov 06 2016 | 1:59 amHi Rob,Thanks for the update !I am still on Max 6 but tested it in demo mode with Max 7. Noticed a few things that i would like to mention but all in all, seems like a great update !1) Now that we are using .AVI files i have noticed that when openinga new file the loading times can be a bit on the high side. When using .MOV files (even for HapQ encoded files) with the Jit.gl.hap engine the load times felt almost instantaneous (sub 30ms) which was great for realtime video sampling. However with .AVI encoded files there is a larger load lag (varies on the file type and size but around 100-200ms). The same is also true for when using .AVI files with the Jit.gl.hap engine.Is this something that can be improved or is this just inherent with the way .AVI files work ? I am guessing supporting .MOV is not so desirable these days but the loads speeds imo is a real game changer when it comes to real time video sampling.2) Setting volume to 0 (or any value for that matter) doesnt seem to work yet.i will keep on debugging and testing !all the best and thanks for all your hard work rob !
- Rob RamirezNov 07 2016 | 4:19 pmi can look at supporting asyncread behavior for the windows hap engine in a future update, but load times are what they are.windows hap doesn't currently support playback of audio tracks. are you saying you have a file that has an audio track that you're playing with jit.movie @engine hap and you're hearing the audio track play through the system?
- Tiny OrbitNov 07 2016 | 4:57 pmhi,"i can look at supporting asyncread behavior for the windows hap engine in a future update, but load times are what they are"In regards to load times, are the longer load times of .AVI files over .MOV files just an inherent aspect of .AVI files or is this something that could be optimized within the engine ?"windows hap doesn’t currently support playback of audio tracks. are you saying you have a file that has an audio track that you’re playing with jit.movie @engine hap and you’re hearing the audio track play through the system?"Yes, I am on win10 and when i load up a hap video file the audio just plays without the possibility of being able to adjust the volume. As i am using my own frame counter to play through the video i can just press stop on load which usually shuts it up.cheers rob !
- Rob RamirezNov 07 2016 | 5:24 pmno idea about load times. hap on windows uses the system direct show libraries, so there's little control i have over those things.i'll take a look at the audio file playback on win 10.
- Tiny OrbitNov 08 2016 | 4:38 pmOk thanks for your help !I will revert back to the jit.gl.hap object so i can take advantage of the higher loading speeds !cheers :)
- chrislosNov 10 2016 | 7:56 pmHey Rob, Thanks so much for the package. My HD video playback is amazing smooth now!On question; For a little generative patch I'd like to randomly jump to different framepositions of a playing jit.movie object. Pretty straightforward I thought. But unfortunately there's a noticeable "delay / gap" between each jump. (Not much, but it's still annoying).Now I'd like to try to have two video instances simultaneously running at the same time and crossfade between both instances to create smooth but fast "jumps" through the video. I guess switching one videos from for- to background and vice versa could do the job.Since it doesn't dump out a matrix I can't use the jit.xfade object. Do you have any idea how I could achieve this?Thanks again. Best, C.
- chrislosNov 11 2016 | 10:09 amEDIT: Found a solution. "jit.gl.pix @gen xfade" is doing the job!best, c.
- chrislosNov 13 2016 | 11:11 amHi Rob,thanks again for this neat hap implementation. Did a good job.I've got one question Right now I'm switching between 4 full hd simultaniously. (All of them run at the same time). It works fine on my Macbook Pro Mid 2012 on a NVIDIA GeForce GT 650M 512 MB.Now I'd like to migrate my installation patch on my older Macbook Pro late 2008 NVIDIA GeFore 9600M GT 256 MB. It seems that this guy is only capable of playing one "jit.movie @enginge hap" instance at the same time. Do you have an idea from what issue this limitation is caused?Thanks and best, Christian
- chrislosNov 13 2016 | 12:29 pmEDIT: I assume playing two 1080p instances simultaneously wouldn't work with the internal graphic card on a mac mini, as well. Am I right? Otherwise I would've bought a used mid-2012 mac mini machine..best, c.
- Rob RamirezNov 15 2016 | 5:19 pmhi chrislos, i can't really answer any of these questions for you. you just have to try it and see. if you have a patch that you'd like some help with possible optimizations suggestions, feel free to post.it's possible the problem is with disk r/w speed rather than GPU, but that's just a guess.
- Rob RamirezNov 15 2016 | 7:38 pmhey guys, I just pushed hap version 1.0.3 to the Package Manager which fixes the vol attribute on windows. windows hap avi files should now play files with audio tracks and behave appropriately when the vol attribute is adjusted.
- ZegerNov 20 2016 | 6:05 pmSorry if this is a newb question, as i'm just exploring openGL and hap. I have a patch that mixes 4 videos using jit.gl.slab. I want to add basic effects like jit.brcosa for each video separately. But I can't connect it anywhere in the chain, probably because jit.brcosa is not openGL. Any thoughts?
- Rob RamirezNov 21 2016 | 5:02 pmtype [ jit.gl.pix @gen brcosa ] into an object box.this tells the jit.gl.pix object to load the brcosa gen patcher, which is a factory gen patcher that performs brcosa operations and exposes corresponding attributes for adjustments.read through the Video and Graphics tutorials for more info. https://cycling74.com/articles/new-video-and-graphics-tutorials-in-max-7/
- haugbuiJan 17 2017 | 4:38 pmHi,Do anybody know any other software than Adobe Media Encoder to create Hap AVI files on Windows?Thanks
- Florence GlanfieldMar 14 2017 | 7:19 pmHi Rob,Last semester I created a really successful audio driven visual patch which I used in live performance. I encoded all my videos to hap_alpha which really helped the performance. I'm doing something similar this semester but am not working with videos with audio. I have noticed that when I compress to hap using VVBatchExporter the audio suffers even when I change the settings to no compression for audio. I really want to use the hap engine but not if audio isn't supported.
- Julien BayleMar 20 2017 | 4:07 pmHi Rob, guys, any chance for jit.playlist at some point? I can basically also continue to use some jit.movie with an abstraction layer loading things dynamically, but that would be nice to have that support in jit.playlist.
- Rob RamirezMar 20 2017 | 6:48 pm[edit - remembered this isn't working ]there's no way to generate the thumbnail images needed for jit.playlist interface, so this probably won't be supported anytime soon.
- Julien BayleMar 20 2017 | 6:55 pmThanks Rob. Actually, I "just" need to figure out how to build a small jit.movie based system for doing exactly the same things. Was just thinking about jit.playlist at the beginning.
- ygreqApr 09 2017 | 10:17 amDoesn't seem to work if you put it in a subpatcher.
- Rob RamirezApr 10 2017 | 8:30 pmshould work fine in a subpatcher. possibly just needs a patch restart, possibly needs you to explicitly set @drawto to your gl context name.
- Julien BayleMay 16 2017 | 9:37 amAny batch converter for windows ?
- Rob RamirezMay 16 2017 | 5:05 pmi believe adobe media encoder will batch process
- Anton KuznetsovJun 11 2017 | 6:39 pmHey guys,sorry for the stupid question - how do I get the current frame dump out information in a number box instead of just a print popup? Or do I have to get a metro object counting the frames for me on the side? Thanks.
- Rob RamirezJun 12 2017 | 4:10 pmfor historical reasons, "frame" is a message rather than an attribute. to get the current frame simply use getposition and multiply that with the framecount:
- Anton KuznetsovJun 12 2017 | 9:05 pmThanks! I found also the way by "route framereport" which worked out well.
- Greg FingerAug 18 2017 | 4:44 amGetting this error: jit.movie: hap video engine not supported - using default viddll video enginethe hap engine can't even be found in the preferences.Max 7.3.4 x64, Hap 1.0.4, Windows 10
- adrjorkNov 17 2017 | 7:19 amSorry guys, just a silly question: HAP on MAC optimizes the performance on both AMD and Nvidia cards? (I'd like to know that because my Macbook has AMD, while my hackintosh has Nvidia.) Thanks
- Rob RamirezNov 17 2017 | 6:10 pmHAP performs fine on either GPU
- adrjorkNov 17 2017 | 6:24 pmThanks Rob!
- Tiny OrbitDec 06 2018 | 9:01 pmI was curious to know the proper way to use the frame $1 message to playback a movie with a counter. With the native Hap external, i was able to use my own custom counters for reading back a movie , however with this implementation i am not having so much luck, such method seems to grind Max to a halt when i approach a reasonable frame rate, meaning i need restart.Here is an example of what would work with the Hap object :
- Rob RamirezDec 07 2018 | 4:34 pmget rid of the pwindow and replace it with a vizzie viewer module if on Max 8, or a preview shared context if on Max 7.