Comments (15)
When I replace useSkiaFrameProcessor
with useFrameProcessor
it shows up normally.
This is blocking a production build, any chance for some help? Even if it's just the file and I'll patch it until an official fix is released
from react-native-vision-camera.
- Without reproduceable code I cannot reproduce the issue
- Without RELEVANT log output I cannot determine what went wrong on the native side when applying orientations
- Without knowing the Camera device's
sensorOrientation
I don't know what the natural orientation is (counter-rotate)
from react-native-vision-camera.
- Without reproduceable code I cannot reproduce the issue
- Without RELEVANT log output I cannot determine what went wrong on the native side when applying orientations
- Without knowing the Camera device's
sensorOrientation
I don't know what the natural orientation is (counter-rotate)
Have you tried using output orientation with skia on iOS? We don't do anything special, just the very basics and the orientation doesn't work
from react-native-vision-camera.
- Without reproduceable code I cannot reproduce the issue
- Without RELEVANT log output I cannot determine what went wrong on the native side when applying orientations
- Without knowing the Camera device's
sensorOrientation
I don't know what the natural orientation is (counter-rotate)Have you tried using output orientation with skia on iOS? We don't do anything special, just the very basics and the orientation doesn't work
??
from react-native-vision-camera.
Please stop spamming.
from react-native-vision-camera.
Update the issue with logs then I can help you.
from react-native-vision-camera.
Update the issue with logs then I can help you.
I can't, my coworker has a MacBook and he's out for surgery until next week, but I'm being pressured to fix this issue until tomorrow.
So I can't provide logs now, but as I said, it seemed like a generic problem:
-
W. Normal frame processors it showed up normally
-
W. Skia frame processors it always happens
Has anyone tested IOS + outputRotation + skia?
We only needed the skia rotation fix, but it was released together with the ouputRotation feature which is a breaking change, so we're forced to use it - hence why I'm here
If you could release 4.1.1 with only the skia fix, or just give me a patch file or something for the skia rotation bug that'll be enough for me...
from react-native-vision-camera.
Can you open this issue again? This issue is not resolved, and you are likely to be ignoring a major bug in your library.
For others thinking about donating here, note this behavior before donating. I also donated and that's what I get.
from react-native-vision-camera.
Hey @tomerh2001 I'm sorry but a "major" bug is a bit exaggerated. You can always use a fixed orientation of portrait
to keep it locked, that should work fine.
Orientation took a ton of time and effort to build, and even though the sponsor pool wasn't nearly full I decided to implement it in my free time anyways. Instead of only complaining about something not working and it being a "major" bug you could also thank me for building orientation as far as it is right now. Everything's working apart from orientation in Skia.
I will fix this bug soon, but I don't have time now.
Also, don't get me wrong I appreciate your sponsorship, but this is a complex issue and just demanding that I fix it immediately without even providing logs or a clear reproduction is just unfair.
I need to keep the issues clean, and if you refuse to add logs or use a proper title to at least help me organize and debug this better, then it's staying closed.
Please update with logs.
from react-native-vision-camera.
Hey @tomerh2001 I'm sorry but a "major" bug is a bit exaggerated. You can always use a fixed orientation of
portrait
to keep it locked, that should work fine.Orientation took a ton of time and effort to build, and even though the sponsor pool wasn't nearly full I decided to implement it in my free time anyways. Instead of only complaining about something not working and it being a "major" bug you could also thank me for building orientation as far as it is right now. Everything's working apart from orientation in Skia.
I will fix this bug soon, but I don't have time now.Also, don't get me wrong I appreciate your sponsorship, but this is a complex issue and just demanding that I fix it immediately without even providing logs or a clear reproduction is just unfair.
I need to keep the issues clean, and if you refuse to add logs or use a proper title to at least help me organize and debug this better, then it's staying closed.
Please update with logs.
There was a bug with the transformation matrix when using skia, a fix was released which is what I needed - but it was released together with the orientation which isn't fully working (this issue). If you would've released the bug fix first, then the orientation feature in another release, I could've just used the working bug fix version and could've spared this issue.
While I genuinely appreciate this library and its features, choosing to use it seems to just come back and continuously bite me when it comes to time sensitive builds.
from react-native-vision-camera.
While I genuinely appreciate this library and its features, choosing to use it seems to just come back and continuously bite me when it comes to time sensitive builds.
With all due respect - if you think this library is just biting you then don't use it.
I work on it in my free time, and if you need something fixed asap, contact me through my consulting agency to get full enterprise level support and almost instant fixes - billed with an hourly rate for short term fixes.
You can also always add features yourself and submit PRs/contributions here, this is how open-source works.
I am not responsible for your app's/client's deadline. If you/they need to release something sooner, maybe paying me to get it done is quicker than writing it yourself or switching to a different library (I don't think there are any other libraries that support Skia Frame Processors).
With that said; I will maybe focus on this soon in my free time, but I have a lot of other priorities right now.
from react-native-vision-camera.
While I genuinely appreciate this library and its features, choosing to use it seems to just come back and continuously bite me when it comes to time sensitive builds.
With all due respect - if you think this library is just biting you then don't use it.
I work on it in my free time, and if you need something fixed asap, contact me through my consulting agency to get full enterprise level support and almost instant fixes - billed with an hourly rate for short term fixes.
You can also always add features yourself and submit PRs/contributions here, this is how open-source works. I am not responsible for your app's/client's deadline. If you/they need to release something sooner, maybe paying me to get it done is quicker than writing it yourself or switching to a different library (I don't think there are any other libraries that support Skia Frame Processors).
With that said; I will maybe focus on this soon in my free time, but I have a lot of other priorities right now.
Fair enough. I would appreciate if this can be looked at, or at least point me to the possible culprit file/function and i'll try to fix it
from react-native-vision-camera.
See withRotatedFrame
:
react-native-vision-camera/package/src/skia/useSkiaFrameProcessor.ts
Lines 53 to 90 in 1723408
from react-native-vision-camera.
I noticed my frame.orientation
is always portrait
. Maybe this obvious info.
But I found that I get my expected behavior if frame.orientation = Camera.outputOrientation
, which I wasn't able to force (couldn't find where), so I just copied the rotation
from landscape-right
(the value I chose for outputOrientation
) to portrait
(the constant value of my frame.orientation
, I.e.:
and also did the same in getSurfaceSize
:
This gives me the correct preview on IOS w. Skia.
This is definitely not a solution, but I guess it's at least a direction?
As a temp fix for now i might apply this only to IOS.
Also, can you please reopen this issue now so that others could help as well?
Edit: Managed to force the orientation value of frame.orientation
, that's the patch-file, if anyone needs it:
diff --git a/node_modules/react-native-vision-camera/src/skia/useSkiaFrameProcessor.ts b/node_modules/react-native-vision-camera/src/skia/useSkiaFrameProcessor.ts
index 2983a07..e1a36a4 100644
--- a/node_modules/react-native-vision-camera/src/skia/useSkiaFrameProcessor.ts
+++ b/node_modules/react-native-vision-camera/src/skia/useSkiaFrameProcessor.ts
@@ -8,6 +8,7 @@ import { WorkletsProxy } from '../dependencies/WorkletsProxy'
import { SkiaProxy } from '../dependencies/SkiaProxy'
import { withFrameRefCounting } from '../frame-processors/withFrameRefCounting'
import { VisionCameraProxy } from '../frame-processors/VisionCameraProxy'
+import { Platform } from 'react-native'
/**
* Represents a Camera Frame that can be directly drawn to using Skia.
@@ -223,6 +223,13 @@ export function createSkiaFrameProcessor(
frameProcessor: withFrameRefCounting((frame) => {
'worklet'
+ const previousOrientation = frame.orientation;
+ Object.defineProperty(frame, 'orientation', {
+ get() {
+ return Platform.OS === 'ios' ? 'landscape-right' : previousOrientation;
+ },
+ })
+
+
// 1. Set up Skia Surface with size of Frame
const surface = getSkiaSurface(frame)
from react-native-vision-camera.
frame.orientation
is the Frame buffer's physical orientation relative to the output orientation.
Buffers need to be rotated with transforms/Matrixes, instead of physically rotating the pixels.
So I think orientation
is properly computed. I need to double check this, but it is not the same as outputOrientation
, by design. That's just how Cameras work. That's why the orientation feature isn't as easy as some people think it is.
from react-native-vision-camera.
Related Issues (20)
- 🐛 Landscape mode camera issue HOT 3
- 🐛 Unable to record video more than 30 fps HOT 3
- 🐛 outputOrientation not working in android but working properly in iOS. HOT 3
- 💭 Is it possible to decrease the video resolution on v4? HOT 3
- 🐛 Preview orientation is wrong on some tablets HOT 3
- 🐛 Unable to set minimum zoom on first render HOT 1
- 💭 react-native-vision-camera:buildCMakeRelWithDebInfo[arm64-v8a] FAILED HOT 3
- 🐛 Focus not working on some Android devices when setting FPS HOT 5
- 🐛 use of useSkiaFrameProcessor results in [session/invalid-output-configuration: Failed to configure the Camera Session because the output/stream configurations are invalid!] HOT 3
- 🐛 The resolution of the PhotoFile is different than the format photo resolution HOT 35
- ✨ Expose Camera Intrinsic Parameters HOT 2
- 🐛 Worklet Issue HOT 3
- 🐛 useSkiaFrameProcessor shows black screen with or without frame.render() but useFrameProcessor does not HOT 6
- 💭 Is it possible to buffer frames while Vision Camera is running and append them to a video recording after the recording finishes? HOT 7
- 🔧 HOT 3
- 🔧 unresolved supertypes: FrameProcessorPlugin HOT 6
- 🐛 'UIWindowScene' is only available in iOS 13.0 or newer HOT 7
- 🐛 App unable to go to sleep once camera loads HOT 1
- 🔧 android build fails only when minSdkVersion is set to 23 HOT 3
- 💭 Frame Orientation and the equivalent degree HOT 6
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.