-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
Video Capture Mirroring #72
Comments
@ThibaultBee Just wanted to bump this to see if you had any thoughts |
Hi, Why are you trying to mirror the camera? |
We found this only happens with the front camera. Our end goal is to have the preview surface stay as-is but the stream be mirrored. Reason being is that our use case is more users using the front camera to record themselves do an activity. When watching your self, the way the surface is as of now is what we would expect to see. But, as a viewer of the stream it feels wrong. This screenshot is a great example. As a streamer, you would expect the screen to not be readable. But, as a viewer you would expect to see it correct as if you were looking at it, in this case mirrored. |
What version are you using? Finally, IMO it is a bug! 🐛 |
@ThibaultBee Thanks for the info - I will likely not be able to dig back into until late next week. Will keep you posted on what I can find. |
Hi, I started to work on this. See PR #85 Unfortunately, I am not satisfied by the result yet because the during the transition from back to front camera (or front to back), there is a small amount of time were the mirror is applied on the wrong frame. |
Ok, it seems better. |
Released in 2.6.0. |
Version
N/A
Environment that reproduces the issue
N/A
Use case description
Recently, I drafted a PR for the api.video ios library to support the ability to mirror the video image apivideo/api.video-swift-live-stream#11
The hope was to come here and do the same, but I think it may not be possible - But was curious if you had any thoughts on a solution.
My initial attempt was to
setMatrix
on thepreviewSurface
as well as theencoderSurface
. But, this requires locking the canvas, which I was unable to accomplish while the preview is active. Here is theMirror
class I was messing around with. The new paramcameraCapture
is passed in when theCameraSettings
class gets instantiated.Most solutions seem to talk about modifying the actual
SurfaceView
orTextureView
, but this library seems to rely onCamera2
API to handle the surfaces (targets) directly.Curious if you have any additional ideas on how to implement the ability to mirror (flip) the image.
Proposed solution
No response
Alternative solutions
No response
The text was updated successfully, but these errors were encountered: