open-webrtc-toolkit / owt-server

General server (streaming/conference/transcoding/anayltics) for OWT. (A.k.a. MediaServer)
https://01.org/open-webrtc-toolkit
Apache License 2.0
1.13k stars 368 forks source link

How to publish the max resolution video stream? #356

Open jbts6 opened 4 years ago

jbts6 commented 4 years ago

I use navigator.mediaDevices.getUserMedia to get the max resolution video stream(1920 * 1080).

But when I check the remote streams, It's only 360 * 240.

What happened?

How can I publish 1920 1080 and subscribe 1920 1080?

jbts6 commented 4 years ago
navigator.mediaDevices.getUserMedia({
        video: {
          width: {min: 1920, ideal: 1920, max: 4096},
          height: {min: 1080, ideal: 1080, max: 2160},
          deviceId: video,
          bitrate: 4000
        },
        audio: {
          deviceId: audio
        }
      })

Above is the get stream code, then I publish.

this.conference.publish(new Owt.Base.LocalStream(
      stream,
      streamSource,
      {username: this.username}
    ))
starwarfan commented 4 years ago

Hi, Have you checked the input and sent width/height through chrome://webrtc-internals? If the sent resolution does not reach the input's, the estimated bandwidth may be low.