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

How can I set the aggregate resolution of my video below 1280 × 720? #178

Closed
suretrust opened this issue Jul 22, 2020 · 2 comments
Closed

Comments

@suretrust
Copy link

suretrust commented Jul 22, 2020

I am currently trying to reduce the data used by video stream subscribers. How can I set the aggregate resolution of my video below 1280 × 720?

I have tried using stream.setVideoProfile('120p_1') and/or the code below but none of them seems to be working. Perhaps, I'm defining them in the wrong places? I am currently defining it in utils/agora-web-client.ts just before stream.init(.... Can anyone point me in the right direction please?

stream.setVideoEncoderConfiguration({
      // The video resolution.
      resolution: {
        width: 640,
        height: 480,
      },
      // The video frame rate (fps). We recommend setting it as 15. Do not set it to a value greater than 30.
      frameRate: {
        min: 15,
        max: 30,
      },
      // The video bitrate (Kbps). Refer to the video profile table below to set this parameter.
      bitrate: {
        min: 1000,
        max: 5000,
      },
    })
@srs888001
Copy link

You can modify it in file agora-rtc-client.ts. And in the createlocalstream method, after creating the localstream.

@suretrust
Copy link
Author

Thanks a lot, @srs888001. 🖖 That worked!

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

2 participants