bangnoise / ofxHapPlayer

A Hap player for OpenFrameworks
Other
147 stars 44 forks source link

GPU Acceleration for multiple Hap alpha playbacks? #53

Closed FlyingSpringrol closed 4 years ago

FlyingSpringrol commented 4 years ago

I'm going to try to push to use this framework for an interactive video installation... I just wanted to make sure that it's GPU accelerated (I'm going to need to play 1 4k video, 2 2k videos, and 8 1k videos with alphas, all overlayed on on top of each other). I assume this would melt a conventional CPU, so before I push for this to be used, I just wanted to make sure so I can go buy the right GPU's for the job as well.

bangnoise commented 4 years ago

Yes decoding happens on the GPU.

You should calculate the bitrate of the media you will be playing back (it varies for Hap, so if possible encode the actual media you will be using) and make sure you can read from storage fast enough.

Hap can be encoded in chunks, which allows multithreading when frames are unpacked prior to their being sent to the GPU - you will likely need to use that too.

FlyingSpringrol commented 4 years ago

@bangnoise Awesome, sounds great. Two questions: 1 is this information anywhere on the internet? As in is there a place I can go to read in depth about HAP encoding? 2: Also thanks so much for writing this package, it's been pretty amazing so far! I'm not sure if there's any documentation for it though. If you want, I'd could go through and document the functions and put them into a good readme/api reference somewhere. On top of that, I'd love to document the HAP codec in general and things to know when programming against it. Just let me know.

bangnoise commented 4 years ago
  1. https://hap.video

  2. ofxHapPlayer subclasses ofBaseVideoPlayer. If you think it would be useful you could update the README and ofxHapPlayer.h to point users towards the existing documentation for ofBaseVideoPlayer - and perhaps add documentation in the header for the few points at which ofBaseVideoPlayer behaviour deviates or is extended. Thanks!