Comments (12)
Don't see any native code on your repo. Is that the repo for your frame processor plugin? If that is then you are doing it wrong, very wrong.
There's an issue on how to start creating your own frame processor plugin(opened by me, a few days ago), take a look at that and fix your approach.
from react-native-vision-camera.
On a side note, the actual idea of frame processor plugin is that you can pass a frame to native side, process that frame with native (Java/KT/Swift) code and return results to js side, in almost real time.
So if you know nothing about Java/KT/Android then you could find yourself stranded in the middle of no where with no way out.
from react-native-vision-camera.
I updated the documentation.
from react-native-vision-camera.
Yeah the plugin code is mine. Everytime i compile, i get the following error:
`> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
Could not find com.mrousavy:camera-frameprocessor:.
Required by:
project :app
Could not find io.socket:socket.io-client:.
Required by:
project :app`
from react-native-vision-camera.
I also viewed the issues you created, I'm sorry to say that they created more confusion than providing clarity. I tried messing with the build.gradle files etc, but no luck.
I also realized i just pushed the react native code to the repo, not the kotlin/java code for the plugins. I recent push would show the implementation according to the docs provided
from react-native-vision-camera.
Sorry there's a typo in that name. It's called frameprocessors
, not frameprocessor
.
from react-native-vision-camera.
Despite the changes, and following the docs exactly (both automatic and manual creation of plugins), the app crashes at compile time. Im coding in VsCode and using the command line android tools. The app compiles flawlessly if i dont create my own plugin. In the same repo under the "another one" commit are all the files that are being used to create a plugin.
I think the issue is arising from incomplete dependencies as the error states, are you sure we dont need to mention them in the build.gradle files?
from react-native-vision-camera.
Hey - it sounds like you're not very familiar with native development, might be good to get a good foundation of how things work in native Android and iOS first, or at least how the build toolchains work.
I'd recommend you to develop in Android Studio and Xcode, not VSCode.
Android Studio also would've told you that you were probably trying to use frameprocessors
, not frameprocessor
.
It'll give you hints about errors and tell you where you're going wrong.
from react-native-vision-camera.
Fair enough, is there a way to do a workaround instead of doing native development? I would rather very much be able to do this in javascript only. I tried using worklets, but to no avail. Just a pointer in the right direction would help, so that I dont spend hours pulling my hair over issues beyond my skills.
Essentially just want to send frames from the frameprocessor to a backend for processing via socket io.
from react-native-vision-camera.
Yea currently there is no alternative because this really isn't straight forward - there would need to be a native plugin that can properly upload those Frames to a server.
Also, you probably don't want to upload all Frames as they are to a server, you might want to compress (or even better; encode MP4/MOV) them first, and then upload in batches.
A raw Frame in 4k can be 15 MB, at 60 FPS that's 900 MB per second.
So a native plugin that compresses the Frames, then choose a slower FPS and lower resolution, then upload natively - that should work.
Alternatively, if it doesn't need to be in realtime and you want to save even more resources, record in batches and upload one after the other.
from react-native-vision-camera.
A very trivial approach is to do frame.toArrayBuffer()
, copy that into a number[]
, use runOnJS
to call fetch(..) and upload that to your server. Maybe you can find a JS based compression library for that as well, not sure.
But this is going to be REALLY slow.
That's what native plugins are for; they're faster, more efficient, can do stuff like good compression, etc.
from react-native-vision-camera.
Alright, thanks for your help man. I guess I'll have to go with an entire video instead of frame by frame processing. Might add some burden to the backend, but should work.
Again, thanks dude.
from react-native-vision-camera.
Related Issues (20)
- β¨ Able to use this library detect QR code from the image HOT 3
- π Issue launching camera on iOS HOT 1
- π§ Unable to find a specification for `react-native-worklets-core` depended upon by `VisionCamera/FrameProcessors` HOT 3
- π Audio is not working ^4.5.3 (IOS) HOT 2
- π§ could not build Objective-C module 'vision_camera_code_scanner' HOT 2
- π Production Build Error with 4.5.3 HOT 3
- π§ Production Build Error with 4.5.3 HOT 5
- β¨ Document Scanner HOT 3
- π error when trying to upload the app to Play Store v4.5.2 and v4.5.3 HOT 3
- π V3 Π½Π΅ ΡΡΠΈΡΡΠ²Π°Π΅Ρ ΠΊΠΎΠ΄Ρ Data-Matrix Ρ ΡΠ΅ΡΠ½ΡΠΌ ΡΠΎΠ½ΠΎΠΌ Π½Π° Android HOT 2
- π react-native-vision-camera | App crashing after setting FPS and applying frameProcessor to Camera HOT 4
- π Potrait mode video is flipped to wrong direction HOT 1
- π Is it possible to hide your face in a video stream using Vision Camera? HOT 2
- π runAsync has memory problem HOT 2
- π Is there any difference between using the Camera component directly and creating the ReanimatedCamera component? HOT 1
- β¨ Do we think a LockedCameraCaptureExtension would be possible in React Native? HOT 5
- π IllegalStateException: maxImages (6) has already been acquired, call #close before acquiring more. HOT 4
- β¨ Skia Frame Processors save with video HOT 3
- π Black screen on Pixel 8 Pro HOT 2
- π [iOS] `NSRangeException` crash ending recording session HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-vision-camera.