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

Camera is using wrong format #9463

Closed
myOmikron opened this issue May 8, 2020 · 25 comments
Closed

Camera is using wrong format #9463

myOmikron opened this issue May 8, 2020 · 25 comments

Comments

@myOmikron
Copy link

Describe the bug
We're using a Canon XA-15 with a Marshall VAC-23SHU3 Signal Converter. When in Windows or on a Mac / Linux, the Camera is working in FullHD 16:9.
When we're trying to use the camera, we're getting a 4:3 format within the original 16:9 format is squeezed together. Instead of the FullHD resolution, we're getting 640x480px

Desktop (please complete the following information):

  • OS: Windows, Mac, Debian
  • Browser: Chromium, Safari, Firefox
@matiasilva
Copy link
Collaborator

Have you solved this issue? If so, please close this issue.

@konradvoelkel
Copy link

Having a similar issue with a GoProHero7Black camera via MiraBox HDVideoCapture; cam is FullHD 16:9, works in all other videoconferencing tools (and OBS studio) correctly, but on BBB getting a thin/squeezed aspect ratio while another cam on the same laptop (integrated) works correctly.
Maybe connected to issue #2661 in some way?

@matiasilva
Copy link
Collaborator

Perhaps, that thread was for the Flash client which didn't use WebRTC and had a completely different layout entirely.

@konradvoelkel
Copy link

Further testing showed the same problem happens here:
https://webrtc.github.io/samples/src/content/devices/input-output/

But it looks correctly here:
https://webrtc.github.io/samples/src/content/getusermedia/resolution/

So this might be quite easy to fix? (and will probably affect more people in a teaching setting).

@matiasilva
Copy link
Collaborator

What are your results on https://test.webrtc.org/?

@konradvoelkel
Copy link

It is all good:

Check resolution 320x240
[ INFO ] cameraName: Integrated Camera (5986:02d5)
[ INFO ] actualVideoWidth: 320
[ INFO ] actualVideoHeight: 240
[ INFO ] mandatoryWidth: 320
[ INFO ] mandatoryHeight: 240
[ INFO ] isMuted: false
[ INFO ] testedFrames: 221
[ INFO ] blackFrames: 2
[ INFO ] frozenFrames: 1
[ INFO ] Not available: encodeSetupTimeMs, avgEncodeTimeMs, minEncodeTimeMs, maxEncodeTimeMs, avgInputFps, minInputFps, maxInputFps, avgSentFps, minSentFps, maxSentFps
[ INFO ] Cannot verify sent FPS.
[ OK ] Captured video using expected resolution.
Check resolution 640x480
[ INFO ] cameraName: MiraBox Video Capture (1bcf:2c99)
[ INFO ] actualVideoWidth: 640
[ INFO ] actualVideoHeight: 480
[ INFO ] mandatoryWidth: 640
[ INFO ] mandatoryHeight: 480
[ INFO ] isMuted: false
[ INFO ] testedFrames: 136
[ INFO ] blackFrames: 1
[ INFO ] frozenFrames: 0
[ INFO ] Not available: encodeSetupTimeMs, avgEncodeTimeMs, minEncodeTimeMs, maxEncodeTimeMs, avgInputFps, minInputFps, maxInputFps, avgSentFps, minSentFps, maxSentFps
[ INFO ] Cannot verify sent FPS.
[ OK ] Captured video using expected resolution.
Check resolution 1280x720
[ INFO ] cameraName: MiraBox Video Capture (1bcf:2c99)
[ INFO ] actualVideoWidth: 1280
[ INFO ] actualVideoHeight: 720
[ INFO ] mandatoryWidth: 1280
[ INFO ] mandatoryHeight: 720
[ INFO ] isMuted: false
[ INFO ] testedFrames: 59
[ INFO ] blackFrames: 1
[ INFO ] frozenFrames: 0
[ INFO ] Not available: encodeSetupTimeMs, avgEncodeTimeMs, minEncodeTimeMs, maxEncodeTimeMs, avgInputFps, minInputFps, maxInputFps, avgSentFps, minSentFps, maxSentFps
[ INFO ] Cannot verify sent FPS.
[ OK ] Captured video using expected resolution.
Check supported resolutions
[ OK ] Supported: 160x120
[ OK ] Supported: 160x120
[ OK ] Supported: 320x180
[ OK ] Supported: 320x240
[ OK ] Supported: 640x360
[ OK ] Supported: 640x480
[ OK ] Supported: 768x576
[ OK ] Supported: 1024x576
[ OK ] Supported: 1280x720
[ OK ] Supported: 1280x768
[ OK ] Supported: 1280x800
[ OK ] Supported: 1920x1080
[ INFO ] 1920x1200 not supported
[ INFO ] 3840x2160 not supported
[ INFO ] 4096x2160 not supported

@prlanzarin
Copy link
Member

We don't specify resolution nor aspect ratio in the camera profiles by default to expand compatibility and reduce overconstraining errors. If you wanna change that, you can. Go to HTML5's settings.yml and alter the cameraProfiles by adding a constraints field to them. The constraints are regular WebRTC constraints dictionaries.

Be aware that we do not subset nor fallback constraints if you try to force exact constraints and a device fails to abide to them.

@flipreverse
Copy link

@prlanzarin How is the syntax for that?

cameraProfiles:
- id: low
name: Low quality
default: false
bitrate: 100
constraints: ?

@prlanzarin
Copy link
Member

prlanzarin commented Jun 24, 2020

@flipreverse Regular getUserMedia constraints dictionary from the link I pasted in my previous comment. Map it from JSON to YAML.
Eg.: The example for the Applying constraints section translates to

- id: high
  name: High quality
  default: false
  bitrate: 2000
  constraints:
    width:
      min: 640
      ideal: 1920
    height:
      min: 400
      ideal: 1080
    aspectRatio:
      ideal: 1.7777777778

@prlanzarin
Copy link
Member

@konradvoelkel @myOmikron I need confirmation whether setting the constraints works or not, otherwise I'll be closing this issue in a few days.

@flipreverse
Copy link

@flipreverse Regular getUserMedia constraints dictionary from the link I pasted in my previous comment. Map it from JSON to YAML.
Eg.: The example for the Applying constraints section translates to

- id: high
  name: High quality
  default: false
  bitrate: 2000
  constraints:
    video:
      width:
        min: 640
        ideal: 1920
      height:
        min: 400
        ideal: 1080
      aspectRatio:
        ideal: 1.7777777778

These settings seem not to work for me. Are there other settings that I might have missed?

@prlanzarin
Copy link
Member

I don't even know what you're trying to achieve @flipreverse. What are you seeking with the constraints?

@flipreverse
Copy link

I don't even know what you're trying to achieve @flipreverse. What are you seeking with the constraints?

I want to use my Canon DSLR as webcam via an HDMI frame grabber. The input signal has a resolution of 1920x720.

@prlanzarin
Copy link
Member

The constraints I sent are examples to showcase how they work. You have to 1) look at the docs I sent 2) experiment with them and see what makes your cam work with.

@konradvoelkel
Copy link

As far as I could understand, this would require me running a bbb server myself, right?
I have not done that, and could not figure out whether url parameters like "userdata-bbb_preferred_camera_profile=" would be a possible way to do something similar (I doubt it).

@matiasilva
Copy link
Collaborator

Yeah, you'd need direct access to your BBB server. The preferred camera userdata parameter simply selects from the existing options in the settings.yml.

@prlanzarin
Copy link
Member

@flipreverse I actually got confused with the next version where the constraints config did actually require the video key in the config. That isn't the case for 2.2. Look at my comment again, I've edited it for clarity.

@flipreverse
Copy link

@flipreverse I actually got confused with the next version where the constraints config did actually require the video key in the config. That isn't the case for 2.2. Look at my comment again, I've edited it for clarity.

That works. :-) Thanks!!

@konradvoelkel
Copy link

So, as far as I can see, there is no way to fix this problem on the client-side. Will there be any way the server-side gets fixed or would that induce regressions for other users? Any hope that this kind of setting will be made available to the client at some point?

@prlanzarin
Copy link
Member

prlanzarin commented Aug 5, 2020

@konradvoelkel You'd have to speak with whoever manage the BBB instance you use to figure out a set of media constraints that makes your camera work properly. Figure out which constraints config makes it display ok (ie forcing it with aspectRatio: 1.77~8), create a new camera profile (so it's an optional profile and it won't introduce widespread regressions), configure it as described.

Camera profiles are extensible for situations like yours.

@strifel
Copy link

strifel commented Jan 13, 2021

I can conform that this issue still exists.

@prlanzarin
Copy link
Member

How can you confirm that? Did you alter the constraints as suggested throughout the issue?

@strifel
Copy link

strifel commented Jan 13, 2021

That was a fast answer. Thank you :) (and sorry for the few information)

I do have a 16:9 camera plugged into a cheap capture card.
OBS does show the input as 16:9. When activating the camera in BBB it seems to force the 16:9 image into a 4:3 image

I do not have the possibility to alter the constrains on (every) server I use and strongly think that this is an issue that should be fixed by BBB itself and not by every server admin.

@prlanzarin
Copy link
Member

that should be fixed by BBB itself and not by every server admin

Again: camera profiles are configurable. If an admin wants to add a 16:9 profile, they can (and should). Admins already have to configure a myriad of things in BBB and this one would be no different. So I don't think that argument is sounding.

The reason why there's no built in 16:9 profile right now is because 1) the UI was just not built for that aspect ratio (although there is a PR open improving it; but it's still just a stopgap 2) I'm still not 100% convinced that forcing 16:9 AR all across the board, by default, won't break compatibility with an unknown range of endpoints.

Also: if you want to open a PR adding a new default 16:9 profile, please do (against develop branch). If it's just an extra, optional profile, I'd probably support it landing in 2.3.

@prlanzarin
Copy link
Member

BTW I'm closing this issue because the questionings here have been roughly addressed. If anyone wishes to have a built in, optional 16:9 camera profile in BBB, please open a new properly described issue so it can be properly tracked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants