-
Notifications
You must be signed in to change notification settings - Fork 81
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
MJPEG decode failed: -1 #27
Comments
I have never seen this. @etiennedub ? |
It's happening under conditions that I noticed is around low amount of RAM. In fact, I'm doing video analytics and running the
In particular, in this snippet... shouldn't the |
The free is not used on success because this is handled in the capsule_cleanup function, which is called when your Python code garbage collects the images. So you have to make sure you aren't storing images in a list forever or similar. We do it this way because we must call k4a_release everytime we stop using a capture frame (this does the freeing internally, if the reference count to the capture is zero). By having the garbage collector call the k4a_free function we make sure users don't need to bother with releasing the captures themselves. Can you confirm the transform function is problematic? If you do not transform, do you still have the problem after a while? I have doubts about the buffer to k4a function. Maybe it does copy the buffer content and we need to free it. (edit: it should be fine. It reuses the buffer directly. There is an option for a callback to release. We do not need this if our buffer comes from python.) My Kinect is at the University lab and I can't access for a while to test myself. But I am happy to help debug the problem. This is probably the most complicated part of our wrapper. Could you create a minimal example file to reproduce the bug? |
I guess I'm luckier, I have the unit at home... :) See here : microsoft/Azure-Kinect-Sensor-SDK#1187 I will try to investigate the work to not using BGRA as a format in the capture, or at least what it means in this python package. I'm not super familiar with C/C++ so it might be a bit challenging for me but I can take a stab if I can't mitigate the issue. |
microsoft/Azure-Kinect-Sensor-SDK#1187 is closed, is there still an issue with pyk4a? In the future it would be nice to support MJPEG |
There is a patch that is addressing the issue but using my container, I have another depth sensor issue when I use the new .so file that fixes the issue. In fact, the issue is that it's now throwing a warning versus an error when the underlying decoder, |
Reopen if pyk4a is the problem! |
Hey if MJPEG decoding is still a problem, you can try directly getting compressed MJPEG color images now: #38 |
Did you guys ever see this :
and it goes on forever? I just reset the device and it works after. It doesn't happen too often but sometimes it does and I find it interesting/annoying. :)
The text was updated successfully, but these errors were encountered: