Closed i-agrawal closed 5 years ago
Hi Ishan,
Unfortunately FrameFifo is not part of the Python API, and you're not supposed to use it the way you're describing.
For receiving decoded frames at your Python code, you should use the shared-memory infrastructure instead. How to do this, please refer to the tutorial.
Some more info of what goes on "under-the-hood":
Hi Sampsa,
Thanks for the response. I can understand why you set it up in this fashion. Perhaps you could point me in the right direction for what I am trying to do.
I am using the RGBShmemFrameFilter and ShmemRGBClient to pass read images from an rtsp feed to the python process. There are no problems there, I can get the numpy arrays just fine. But I also want the timestamp along with the image's numpy array. Is there a way to do this in the python api?
Ok, I get it.
The problem with the current shared memory implementation is, that it in addition to the payload, the only metadata it provides, is the payload size.
But it's your lucky day! If you look at the latest commits in the development branch, you can see that @eranpet has been working recently (last week actually) on the shared memory implementation.
That new shared memory implementation will provide additional metadata, namely, the millisecond timestamp, slot number and width & height of the image, so you'll get all you need.
These changes should appear in the main branch and in a new libValkka version next week, right, @eranpet ?
Cool that sounds super useful and close to what I need. Thanks for your help so far!
@elsampsa thanks for the awesome library. There seem to be very latency 400-500ms per frame when using ShmemRGBClient
. We have experienced this before on 0.11.0
as well, changing it to use SharedMemRingBuffer
fixed that. Any help is appreciated
@bobbych could you please open a separate ticket for your question. Please give more details. I didn't get it.. is the live stream showing latency issues when you're using ShmemRGBClient ..? How is your filtergraph? etc.
Thanks for writing the library! I am writing this because there seems to be an issue with the python bindings for the FrameFifo class.
Here is my source code
The resulting error traceback
The error seems to stem from swig being unable to the find the attribute "read" so my first thought is it has to do with the python bindings. Thanks for any response.