Open flockonus opened 11 years ago
I'm not entirely sure, but IIRC I suspected FFMPEG to being doing something funky while developing this. To really find out one would probably have to use the ffmpeg C API to get more control / details on what is happening.
Thanks man, I've done some test to discard some frames on https://github.com/felixge/node-ar-drone/blob/master/lib/video/PngSplitter.js#L55 but it didn't help at all, so it is consistent with FFMPEG getting slower
This is a big problem I'm running into — it's hard to program the drone with OpenCV if the PNG files I'm sending to OpenCV are from several seconds ago.
I'm currently implementing this again myself (but unfortunately in Go) and have learned the following since doing the first implementation here:
So if somebody wants to go ahead and try to make a better video decoder for this module, that'd be great. I might end up doing it myself as we'll need it for NodeCopter at JSConf.us.
Hmm, I'm not the best at Node, but I'll give it a try, since I definitely need it for my project. Thanks for the pointers.
@felixge Working on this now. Quick question — it looks like the PaVE frames are being fed directly into FFMPEG, and not going through PaVEParser
at all...can FFMPEG parse PaVE frames?
@lord FFMPEG has no concept of PaVE frames, but the h264 NAL units have a fixed signature (0x00000001 IIRC) which ffmpeg is able to find in the stream and ignore any "pave junk" in between.
Ahhhh okay, that explains it, thanks!
Was anyone able to get this working? I have a pretty fast frame rate but there is a consistent delay of about 1 to 1.5 seconds.
On the first seconds the png stream is real-time, like a video, but then it gets a consistent ~1s delay between.
I am wondering if Node's buffers / pipes get slammed?