-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Playback of ffmpeg encoded files #13
Comments
This looks like the command that is recommended by the Vivox folks (http://hap.video/using-hap.html). Unfortunately, I've chatted with a few people about this and haven't personally had any success generating files using FFmpeg. I'd recommend reaching out to the Renderheads or Vidvox folks directly to see if they have any tips. |
Sections in a Hap frame can use a 4-byte or 8-byte header - the 8-byte version is indicated by the first three bytes being zero (as in this case). The Hap reference source provides a decoder which you could use to avoid having to reimplement one yourselves, otherwise this is detailed in the spec. |
Tom, thanks++ for pointing out what's missing from this Hap player. mpedge, it's going to take me a bit of time to make this fix. Let me know it's something that you'd like to tackle. |
Hi,
I am having trouble playing .avi HAP files encoded with FFmpeg. Specifically, the line 194 of ofxDSHapVideoPlayer.cpp:
int sz = (*(uint8_t *)ptrBuffer) + ((*((uint8_t *)(ptrBuffer)+1)) << 8) + ((*((uint8_t *)(ptrBuffer)+2)) << 16);
always returns 0.
The FFmpeg command I use to create the file is:
ffmpeg -i source.avi -vcodec hap -format hap output.avi
The frame always looks like this:

If I encode HAP using Adobe then it all works and the aforementioned line returns the right size.
It seems like FFmpeg is not including a size information in the header?
Any ideas anyone?
The text was updated successfully, but these errors were encountered: