As part of Second Story in Portland, I wanted to share a brand new addon with the community:
ofxDSHapVideoPlayer is a DirectShow-based video player that plays Hap-encoded video files. As you may already know, Hap is a video codec that uses the GPU for decompressing video frames – making it fast and low overhead. Over at Second Story, we’ve been using it to synchronize HD video across multiple computers. Unlike the QuickTime-based version of the codec, ofxDSHapVideoPlayer decompresses the frames on the GPU natively on Windows using a mixture of snappy (optional) and DXT (the downside of this approach is that we don’t have access the the decompressed pixels on the CPU).
Great work on this addon, it’s just what I was looking for
I’m a little unclear on how to actually encode Hap videos on Windows. I’ve got the codec installed, I can play back Hap videos and use the OF addon, but I don’t see any option for encoding Hap in Adobe Media Encoder. Is there a separate installer or separate step that’s needed?
I’m on Windows 10 and Adobe Media Encoder CC 2015.3
This player is specifically for videos encoded using the Hap encoder for Direct Show (files are saved in .avi containers as opposed to .mov). At Second Story, we’ve been transcoding files using Adobe Media Encoder. You’ll want to install the codec that RenderHeads released for this purpose: http://www.renderheads.com/downloads/2015/HapDirectShowCodecSetup.exe
Great work on this addon! It works perfectly for playing multiple HD streams.
I have a project where I need to route audio from multiple videos to individual audio outputs. (video 1 -> output 1, video 2 -> output 2, … video 8 -> output 8). I am wondering about the possibility of editing the player to support this and if you have any tips for where to start.
I have used this addon in the past to get what I need with just sound files.
Thanks for creating this and sharing with the community!
that sounds totally do-able! but you’ll have to dig into the guts of the add-on to connect the audio channels on the video to appropriate audio channel.
take a look at this class:
there’s a function called loadMovieManualGraph() which connects all of the direct show filters. i imagine that you’ll be specifically looking at the sound component that’s contained inside the if statement containing getContainsAudio(). i’d encourage you to read up on direct show filters and use some of the available functions in this class for connecting inputs and outputs. unfortunately i have little familiarity with multichannel audio outputs in direct show.
I forked the repo and a new function that allows you load a movie and pass it the audio device index. (My setup is using multiple USB sound cards.) It iterates through all the sound devices and creates a filter that routes to the one selected.
i just tested a the addon with a file created using mpegstreamclip and experienced the same behavior you were describing (yellow bars).
digging into the code, it looks like mpegstreamclip (and probably the other applications) are not including a frame size in the header (it’s set to zero), so the addon ends up creating an empty array for the pixel.
i just pushed a fix-hopefully that will solve your problem.
Thanks so much for looking into this. I’ve tried this with a lot of files now and it’s still showing up as yellow stripes
It logs “Video frame size not encoded in file header” as I’d expect given that’s the if clause you added for the fix
However, the addon also now logs “SampleCB<> - raw buffer is NULL” as well. I’ve had a look through the code that throws it and I haven’t been able to figure out what’s causing it
Should I be doing something special with MPEGStreamclip? I’ve tried a variety of encoding options to no avail and I’ve looked through some information on my file and the sample one that does work and as far as I can tell they’re identical - although there must be something causing it?! I’ve double checked I have everything installed that I should
If its any help, I’m using VS 2015 update 3 on Windows 8 Embedded Standard (which I still haven’t ruled out a being part of the problem) and I’m compiling for Win32. I’ve tried compiling for x64 which comes up with a linker error
If you can shed any light on this I’d be so grateful, we’re supposed to be presenting something next Thursday and an audio visual installation without any visuals won’t be quite so interesting!