abhiTronix / deffcode

A cross-platform High-performance FFmpeg based Real-time Video Frames Decoder in Pure Python 🎞️⚡
https://abhitronix.github.io/deffcode
Apache License 2.0
178 stars 3 forks source link

[Idea]: Support for getting latest frame from a screenrecord/framebuffer #33

Closed ninjatall12 closed 1 year ago

ninjatall12 commented 1 year ago

Issue guidelines

Issue Checklist

Describe your Idea

ability to return latest frame from screenrecord/frame buffer so that it can used for object/color detection

Use Cases

Allow ability for object tracking/color tracking within a video at much higher fps than using open cv or alternatives

Any other Relevant Information?

No response

abhiTronix commented 1 year ago

ability to return latest frame from screenrecord/frame buffer so that it can used for object/color detection

@ninjatall12 Hi, could you please elaborate what you mean by this, through any example, diagram, or code? BTW, Deffcode currently retrieve frame from numpy buffer directly.

ninjatall12 commented 1 year ago

so basically i want a function similar to sct.grab() in mss which returns the latest frame without needing to iterate through the generator object for example in here image you have to iterate through the generator object to get the last frame in frame buffer i want a function that just gets the last frame in the frame buffer. Sorry if my communication is low quality

abhiTronix commented 1 year ago

so basically i want a function similar to sct.grab() in mss which returns the latest frame without needing to iterate through the generator object for example in here

@ninjatall12 There's no buffer, the FFmpeg serializes the frames and deffcode captures it and generator makes it available. Simple as that. I'm closing this issue as it is not applicable here