Skip to content
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

Maximize FOV on video call #2297

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

ASerbinski
Copy link
Contributor

The field of view on video calls is very narrow, resulting in a transmitted video that is highly "zoomed in".

This increases the field of view using three approaches;

  1. Use 4:3 video aspect ratio to prevent cropping to 16:9
  2. Disable EIS (removes the buffer around the video)
  3. Zoom out

The aspect ratio will affect devices universally, since as far as I can tell, all camera sensors seem to have a 4:3 native aspect ratio. The other two will apply on a sensor by sensor basis. Some phones have a mixture of available zoom ratios, and support for EIS or OIS (where OIS is available, EIS is disabled).

Naturally, there will be tradeoffs for each of the three causes of cropping;

User may have a preference for a 16:9 ratio.
Holding the device in user's hand will result in a jittery video without stabilization.
Changing the zoom ratio could cause the HAL to select a different sensor with different characteristics, for example, the main camera on a Pixel 6 [/Pro] has OIS, but reducing the zoom level to lower than 1:1 will cause it to switch to the wide angle lens, which does not have OIS.
Consequently, it may be preferable for each of these configuration changes to be user-controlled.

Access to the camera on talk-android is through webrtc, which unfortunately, does not provide means of user control for EIS or zoom ratio, however, others have coerced it into allowing settings; https://stackoverflow.com/questions/48598752/android-how-to-turn-on-flashlight-using-webrtc-android-io-pristine-libjingle1
Unfortunately, this approach is a little bit hacky since it requires duplication of some of webrtc.

@timkrueger
Copy link
Contributor

I don't saw this before writing my comment . I'll a look next week.

@AndyScherzinger AndyScherzinger marked this pull request as draft August 12, 2022 15:36
@AndyScherzinger AndyScherzinger changed the title Draft/WIP: Maximize FOV on video call Maximize FOV on video call Aug 12, 2022
@timkrueger
Copy link
Contributor

Hi @timkrueger did you have time to review this ?

I also liked to have it. But as I wrote in the corresponding issue #2052 (comment) the is work to do.

@ASerbinski
Copy link
Contributor Author

ASerbinski commented Oct 28, 2022

There is a bug that causes the preview to be cropped to the screen ratio rather than showing the full preview, introduced in this commit; 892ffe8

... added fix for this to PR by changing the preview size to 4:3 ratio in dimens.xml

@github-actions
Copy link

Codacy

Lint

TypemasterPR
Warnings112112
Errors11

SpotBugs

CategoryBaseNew
Bad practice44
Correctness7577
Dodgy code315317
Experimental22
Internationalization99
Malicious code vulnerability5353
Performance2324
Security22
Total483488

SpotBugs increased!

org.jetbrains.annotations.NotNull is used. Please use androidx.annotation.NonNull instead.

1) Use 4:3 video aspect ratio to prevent cropping to 16:9
2) Disable EIS
3) Zoom out
@github-actions
Copy link

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/2297-talk.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud Talk app.

@AndyXheli
Copy link

Hi all, any status on getting this merged ? @mahibi anyway you can you review this when you have time i don't think we've heard from @timkrueger in a while

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress enhancement New feature or request feature: ☎️ call
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RFC: Options to maximize field of view for video calls
4 participants