Can ofxHapPlayer run on iPhone?

Can the current version of @bangnoise’s ofxHapPlayer run on iOs?
Should it be possible to make the HAP decoder work on a mobile device (Android as well), or there is some sort of limitation?
I’m contemplating using it and I’m wonering if anyone has have some experience to share.

Thanks!

No it can’t, and you probably wouldn’t want it to: iPhones lack hardware support for the texture compression formats used by Hap, and Hap files are large, thus ill-suited to mobile.

I see, thanks!

I’m looking for a way to play a video frame by frame. And for that I mean to be able to draw any frame of the video at any given time with no delay. Is this even possible?

My understanding is that the time to decode a frame is compromised by the type of encoding, specially temporal compression but I don’t have control over the encoding.

The videos I’m trying to play are low res (512x512) and quality is not trivial.

I’ve just done some vague experimentation with ofVideoPlayer on a Mac and the app runs at 5fps, which is way far from acceptable.
I’m pretty sure this is possible to overcome on a desktop computer but I’m interested on iOs and Android devices.

Thanks!

In general, I imagine this is a challenge regardless of platform - you would need a codec that had a cheap decode.

@bangnoise understands the specifics far better than I, but I wonder if one could take the concepts of HAP (which I’ll simplify as a concatenation of S3TC compressed textures) to iOS and use a compressed texture format the PowerVR GPU supports like PVRTC (if only ASTC were supported). I would think that tooling (texturetool) and the ability to view on a desktop machine would be an issue, but it would be interesting to know if this afforded much.

I’m not sure what you mean when you say you don’t have control over the encoding… If that’s the case, then why are we discussing the choice of encoder?

A new Hap variant which supported PVRTC is technically possible, but the resulting files would be large and ill-suited to mobile devices.

If you do have control over encoding, try I-frame only H264, which can be hardware decoded on iOS and won’t involve decoding multiple frames for random access.

1 Like

Thanks @pizthewiz! I don’t know much on the subject. Lots of great info!

@bangnoise, I get the files directly from sources third party only sources. I guess eventually I could re-encode them on a server but its not an option right now. Thanks for the suggestions!

Seems for now I’ll have to look for a workaround, its not with in my capabilities to currently solve it that way. Thanks!