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 ASerbinski force-pushed the feature/2052/video-fov branch from 5e39e04 to 86a0d5d Compare October 28, 2022 17:19
@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

@ghost
Copy link

ghost commented Aug 8, 2024

Hey all! Any updates on this?.

1) Use 4:3 video aspect ratio to prevent cropping to 16:9
2) Disable EIS
3) Zoom out
@ASerbinski ASerbinski force-pushed the feature/2052/video-fov branch from 58d1de9 to 35a403e Compare September 20, 2024 15:23
Copy link
Contributor

Codacy

Lint

TypemasterPR
Warnings8696
Errors131131

SpotBugs

CategoryBaseNew
Bad practice67
Correctness1113
Dodgy code7980
Internationalization33
Malicious code vulnerability33
Performance67
Security11
Total109114

Lint increased!

SpotBugs increased!

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

Copy link
Contributor

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.

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
3 participants