Closed niazikhan001 closed 8 months ago
Yes exactly the same issue i am facing
Multiple things:
[capture/frame-invalid] Trying to access an already closed Frame! Are you trying to access the Image data outside of a Frame Processor's lifetime?
- If you want to use `console.log(frame)`, use `console.log(frame.toString())` instead.
- If you want to do async processing, use `runAsync(...)` instead.
- If you want to use runOnJS, increment it's ref-count: `frame.incrementRefCount()`
what is not clear about this?
frame.toArrayBuffer()
) or encoding it to a smaller size using a native frame processor plugin (eg video encoder).Overall, this is a pretty complex thing to do, uploading all frames to an axios backend at 30 FPS will probably explode your backend unless you do it properly.
What's happening?
const sendFrameToBackend = Worklets.createRunInJsFn(async (frame) => { console.log(
Running inference on ${frame}
); try {})
const frameProcessor = useFrameProcessor((frame) => { 'worklet' // console.log(
Frame: ${frame.width}x${frame.height} (${frame.pixelFormat})
) // console.log(Running inference on ${frame}
);console.log(frame)
, useconsole.log(frame.toString())
instead.runAsync(...)
instead.frame.incrementRefCount()
]Reproduceable Code
Relevant log output
Camera Device
Device
samsung a10s
VisionCamera Version
"^3.9.0",
Can you reproduce this issue in the VisionCamera Example app?
No, I cannot reproduce the issue in the Example app
Additional information