Recording webcam quality

368 views
Skip to first unread message

David Rojo

unread,
Oct 20, 2021, 9:40:06 AM10/20/21
to BigBlueButton-dev
Hello,

I am trying to increase the recording webcam quality but I haven't been able to accomplish it. I've searched a lot about this but I haven't found a working solution.

There are various points where the quality of the video can be affected.

1- The user stream quality during the class.
I've increased the the quality by adding to the file /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml

kurento:
  camperaProfiles:
     ....
      - id: high
        name: High
        default: false
        bitrate: 800
      - id: hd
        name: Ultra
        default: false
        bitrate: 1300

This has increased the quality of the live streaming of the webcam and also the bitrate of the raw webcams file.

2- The raw recording file generated by kurento
Here I don't know how to increase the resolution of the webcams file generated at /var/bigbluebutton/recording/raw folder. It is always 640x480, althought the quality (bitrate) has increased thanks to step 1, the resolution is very low.

ffprobe on raw webcam video file:

Duration: 01:35:38.81, start: 0.000000, bitrate: 1157 kb/s
Stream #0:0(eng): Video: vp8, yuv420p(progressive), 640x480, SAR 1:1 DAR 4:3, 1k tbr, 1k tbn, 1k tbc (default)


3- The playback file generated after the raw file has been processed
I've edited the file /usr/local/bigbluebutton/core/scripts/presentation.yml and changed vide:output to:
video_output_width: 1280
video_output_height: 720
video_output_framerate: 30

This makes that the playback webcams file has this resolution. But the final quality is very low as the generated file has a very low bitrate:

ffrpobe on published webcams video file:

Duration: 01:29:10.85, start: 0.000000, bitrate: 235 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 162 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)


So the question my question is:
1- How to increase the resolution of the raw webcam file.
2- How to increase the bitrate of the published  webcam file.

Thanks

Paulo Lanzarin

unread,
Oct 20, 2021, 3:21:39 PM10/20/21
to bigblueb...@googlegroups.com
> 1- How to increase the resolution of the raw webcam file.


--
You received this message because you are subscribed to the Google Groups "BigBlueButton-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bigbluebutton-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bigbluebutton-dev/57c8e27a-fcdc-4e48-9559-0f7d83ce6946n%40googlegroups.com.

David Rojo

unread,
Oct 21, 2021, 4:17:36 AM10/21/21
to BigBlueButton-dev
Hi prlanzarin,

Thanks for the info, but could please explain me how to use it i bbb?

Thanks.

Paulo Lanzarin

unread,
Oct 21, 2021, 8:07:41 PM10/21/21
to bigblueb...@googlegroups.com
Oh, yeah, sorry for the brevity.

Look at this guide: https://developer.mozilla.org/en-US/docs/Web/API/Media_Streams_API/Constraints#applying_constraints.
Then look at the previous link I sent which has the options you can apply for cameras.
Check those options out. Then you can look at this comment I made a while back
where I explain how you can map the object constraints to BBB's constraints configurations.

So, for example, if you want to add a 1280x720 forced profile to BBB: go to settings.yml, look
for the cameraProfiles configuration. Add a new entry (let's call it Definitely 720p).
You would add the following:
- id: high
  name: Definitely 720p
  default: false
  bitrate: 2000
  constraints:
    width:
      exact: 1280
    height:
      exact: 720
    aspectRatio:
      ideal: 1.7777777778
See the `exact` fields. They force your camera to be that resolution. Be wary, though, because
cameras that can't abide to that resolution will not work for the Definitely 720p profile.
If you want the constraint to be more lax, you can use the `ideal` specifier, which is akin to
saying to the browser to, pretty please, give you a 1280x720 stream. It'll be a best effort approach,
hence not a guaranteed resolution.

Finally, please read the MDN docs and preferably the media stream constraints specs.
There are a bunch of caveats to them.
Also: WebRTC stream resolution is variable by nature, especially on BBB.
A fixed-resolution stream will never be a guarantee.

s,

prlanzarin

David Rojo

unread,
Oct 26, 2021, 2:14:32 AM10/26/21
to BigBlueButton-dev
Thank you very much.

With the constraints height ideal 720, the raw recording is now 720p, so the quality has increased.

Christian Pommer

unread,
Jun 15, 2022, 9:37:46 AM6/15/22
to BigBlueButton-dev
Hello,
I am trying to improve the webcam recording quality of the raw file. I want at least 720p, better 1080. By default, a high quality is already configured in the settings.yml and I set it to default: true:

      - id: high
        name: High
        default: true
        bitrate: 500
        constraints:
          width: 1280
          height: 719
          frameRate: 15

During a conference the webcam quality is great, the participant sees at least 720p. But the raw file is saved only as medium version, in 640x360 on the server.
I already tried it with the code from prlanzarin, but there I get the error:

did not find expected key

What is my error, please give me a hint how to increase the quality of the recording. Thanks a lot!

Chris

Christian Pommer

unread,
Jun 16, 2022, 2:41:09 AM6/16/22
to BigBlueButton-dev
I was able to solve the problem with yml (did not find expected key) and successfully insert the code from prlanzarin. Unfortunately, the recording on the server still has a very poor resolution. Ideas? Thank you!

Christian Pommer

unread,
Jun 16, 2022, 3:42:33 AM6/16/22
to BigBlueButton-dev
I was able to isolate the problem. I only have the poor quality in Edge or Chrome. In Firefox the recording even has FullHD.

Paulo Lanzarin

unread,
Jun 21, 2022, 1:33:29 PM6/21/22
to bigblueb...@googlegroups.com
Christian,

Which BBB version are you using?

s,

prlanzarin

Reply all
Reply to author
Forward
0 new messages