scrcpy icon indicating copy to clipboard operation
scrcpy copied to clipboard

Request: camera optical zoom support

Open rektide opened this issue 1 year ago • 7 comments
trafficstars

  • [x] I have checked that a similar feature request does not already exist.

Is your feature request related to a problem? Please describe. This is a feature request! I'd love to be able to use the optical zoom on my cameras when doing --video-source=camera!

Describe the solution you'd like --camera-zoom 1.5 would ideally zoom to 1.5x, in my view.

Describe alternatives you've considered I don't know? It'd be neat to be able to change the zoom live. I don't know if scrcpy has any other properties that are potentially dynamic like this?

One wild alternative would be to build a camera app that exposes a way to zoom and to stream the phone output, rather than a video camera. This feels like it would have more latency & overhead, & would require some app dev.

Additional context Now that we can stream cameras, there's a host of various video settings that would be nice to be able to tune. Maybe there's some android app that can help us do this? Things like contrast, exposure compensation, color balance, even ideally things like having LUTs or log-output control would be incredible to add, especially if we can dynamically adjust some of these settings.

rektide avatar Nov 23 '23 05:11 rektide

--camera-zoom 1.5 would ideally zoom to 1.5x, in my view.

Yes, technically it's possible.

It'd be neat to be able to change the zoom live.

Yes. It will require some changes in the control code, because currently controls are disabled when video source is camera (as if --no-control was passed)..

rom1v avatar Nov 23 '23 09:11 rom1v

Other camera "PRO" features would be great as well, like focus, exposure and such. I don't know how many camera features are exposed though.

stranno avatar Jan 13 '24 19:01 stranno

Most phones accomplish optical zoom with separate cameras. The Pixel 8 Pro has three rear cameras, each with its own lens and and sensor. I wonder if its possible to have them return separate camera-id's.

I would want to select the lens being used instead of relying on a continuous camera-zoom parameter and allowing the phone to determine the camera.

whatupjeff avatar Jan 19 '24 12:01 whatupjeff

@whatupjeff You might be interested in the whole discussion about physical/logical cameras here: https://github.com/Genymobile/scrcpy/issues/4392#issuecomment-1792867089 (and further comments).

rom1v avatar Jan 19 '24 13:01 rom1v

speaking of zoom, i was wondering if it was possible to switch witch lens was being used to the wide angle lens in my case or the telephoto lens ( not necessarily on the fly )

edit: wait hang on i think thats what jeff asked edit2: would it still be possible to list all of the cameras on the device ( eg wide angle and other ones ) instead of just the main front and back cams?

christopher317 avatar Feb 09 '24 03:02 christopher317

Other camera "PRO" features would be great as well, like focus, exposure and such. I don't know how many camera features are exposed though.

Has anyone else looked into it? Iirc the other day when I was going through the api documentation, there was a mention of an endpoint that allowed you to choose an auto-exposure & antibanding mode from the profiles available...

sortedcord avatar Feb 11 '24 05:02 sortedcord

Has anyone else looked into it? Iirc the other day when I was going through the api documentation, there was a mention of an endpoint that allowed you to choose an auto-exposure & antibanding mode from the profiles available...

@sortedcord Please let me know if you found a solution

Glebsin avatar Feb 16 '24 00:02 Glebsin

@rom1v Sorry for the ping, but what are the chances of manual exposure and autofocus control coming soon ?

Glebsin avatar Feb 18 '24 17:02 Glebsin

what are the chances of manual exposure and autofocus control coming soon ?

I don't plan to implement them soon. There are other things to work on.

rom1v avatar Feb 18 '24 17:02 rom1v

@rom1v Sorry for the ping, but what are the chances of manual exposure and autofocus control coming soon ?

Every smartphone camera has some kind of Auto Focus by default, maybe you want Manual Focus (turn off auto focus), is useful to camera don't get confused at leave things out of focus, some thing like a "locked" focus. I want that. Right now I'm recording my desktop table from above with smartphone with scrcpy, and some times happens this.

Of course I would like a full manual control like Pro Mode in smartphone cameras but maybe it's a niche use. Photography enthusiast here.

Talking about zoom ... I did try crop command with --video-source=camera and didn't work, there is a way to do that? or zoom in? Mod+g (1:1 mode) didn't work in dwm (tiling window manager), I needed to set scrcpy to floating mode.

Disonantemus avatar Feb 29 '24 03:02 Disonantemus