Open mpedge opened 6 years ago
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.
Thanks, Tom, from me as well.
@mantissa : When I have the time, I am going to work on Cinder's block. When/if I manage to solve it, I'll let you know.
Hey, @mantissa @mpedge I've been having the same problem as I want to write and play hap files live in oF using ofxFFmpegRecorder and ofxDSHapVideoPlayer respectively (posted about it here on the oF forums). Has there been any progress on this front?
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:![ffmpeghaperror](https://user-images.githubusercontent.com/42764178/44705598-62dd6a80-aa9f-11e8-84a6-15bc1d55ff21.png)
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?