Support for HAP / HAPQ GPU decoding

justedit

Member
HAP is an opensource codec dedicated to high performance playback. It has several flavour with and without alpha (HAP, HAPA, HAPQ, HAPQAlpha, HAP Alpha Only, HAPR)
OBS can handle HAP, HAPQ, alpha channels but use CPU decoding (FFMPEG)
It could be interesting to handle this codec using a dedicated pixel format, to get high performance playback. It would allow to use OBS Studio as a media server in some events.
I'm currently running OBS as an automated media server in an event in the United Arab Emirates. It's feeding a LED screen at 8192x1280 @50FPS (nVidia surround dual output). Why OBS and not a classic media server like Resolume, Hippotizer, ModuloPi, etc. ? Because it's really quick and easy to set-up, automating task (Advanced Scene Switcher), slave another OBS (spare), update contents, create slideshows from pictures, video playlists, write text, display web pages, etc.
IMG_20250209_065808_719.jpg

IMG_20250209_181844_508.jpg

IMG_20250209_181752_896.jpg


The only problem I have is the codec options to play videos at this kind of resolutions. H264 could be an option but as it have no alpha channel support, in some case I can't use it.
ProRes / ProRes 4444 with alpha won't play well over 1920x1080
So HAP could be a perfect option.

Someone already posted this suggestion here 2 years ago : https://ideas.obsproject.com/posts/1756/support-hap-gpu-decoding
He is the author of the Jokyo HAP encoder suite : https://jokyohapencoder.com/ and seems to be ghosted on this project.
Thanks!
noar

More info about the codec (an offical decoding library (BSD licence) :
https://github.com/Vidvox/hap
Snappy library :
https://github.com/google/snappy
 

rockbottom

Active Member
I believe you're poking the wrong bear. This was taking right from the link below.

Supported Codecs




The codecs supported by NVDECODE API are:

  • MPEG-1,
  • MPEG-2,
  • MPEG4,
  • VC-1,
  • H.264 (AVCHD) (8 bit),
  • H.265 (HEVC) (8bit, 10 bit and 12 bit),
  • VP8,
  • VP9(8bit, 10 bit and 12 bit),
  • AV1 Main profile,
  • Hybrid (CUDA + CPU) JPEG




Refer to Chapter 2 for complete details about the video capabilities for various GPUs.

 

justedit

Member
I believe you're poking the wrong bear. This was taking right from the link below.

Supported Codecs




The codecs supported by NVDECODE API are:

  • MPEG-1,
  • MPEG-2,
  • MPEG4,
  • VC-1,
  • H.264 (AVCHD) (8 bit),
  • H.265 (HEVC) (8bit, 10 bit and 12 bit),
  • VP8,
  • VP9(8bit, 10 bit and 12 bit),
  • AV1 Main profile,
  • Hybrid (CUDA + CPU) JPEG




Refer to Chapter 2 for complete details about the video capabilities for various GPUs.

Yes, HAP is not hardware accelerated in the same way that H264/H265 for example.
But the main point of interest of this file format (and the reason why it used on lot of project with realtime playback concern), it's to only decode with CPU the snappy compression, and let GPU manage the DXT part (the GPU friendly format).
The other way to manage this codec (what ffmpeg currently do), is to decode the Snappy and the DXT part in CPU (which remove all benefits of this format)
 
Top