Skip to content

Add HAP codec support (Hap1, Hap5, HapY, HapM, HapA)#182

Open
b0yaux wants to merge 1 commit intoMarginal:masterfrom
b0yaux:feat/hap-codec-support
Open

Add HAP codec support (Hap1, Hap5, HapY, HapM, HapA)#182
b0yaux wants to merge 1 commit intoMarginal:masterfrom
b0yaux:feat/hap-codec-support

Conversation

@b0yaux
Copy link
Copy Markdown

@b0yaux b0yaux commented Apr 3, 2026

Add FiveCC mappings and codec info for all five Vidvox HAP variants:

  • Hap1 (HAP), Hap5 (HAP Alpha), HapY (HAP Q), HapM (HAP Q Alpha), HapA (HAP Alpha Only)

Changes

  • videodecoder/videodecoder.swift: Added FourCC-to-AV_CODEC_ID_HAP mappings and a case AV_CODEC_ID_HAP setting AVCOL_RANGE_JPEG (HAP uses full-range output).
  • videodecoder/Info.plist: Added CodecInfo entries for all five variants.

No extradata configuration needed — FFmpeg's hapdec.c handles pixel format selection internally (RGB0 for Hap1/HapY, RGBA for Hap5/HapM, GRAY8 for HapA).

Testing

Official HAP samples: https://github.com/Vidvox/hap. Decoding verified via FFmpeg (Hap1 → PNG confirmed). Full QuickLook testing requires a signed build.

Enable QuickLook and Finder thumbnails for Vidvox HAP video files.
@Marginal
Copy link
Copy Markdown
Owner

Marginal commented Apr 3, 2026

Thanks. And thanks for the link to the samples.

Does the HAP codec appear other containers, or only in .mov?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants