W3C home > Mailing lists > Public > public-webrtc@w3.org > March 2014

Re: How to set the video quality sent to a peer

From: Martin Thomson <martin.thomson@gmail.com>
Date: Tue, 18 Mar 2014 12:09:14 -0700
Message-ID: <CABkgnnX1mxbHgNAebr=rr_kQppcGsbekgUqy6e9-hO-usbWU_A@mail.gmail.com>
To: Harald Alvestrand <harald@alvestrand.no>
Cc: "public-webrtc@w3.org" <public-webrtc@w3.org>
Actually, you are all making it harder than it needs to be.

If the browsers are doing their jobs correctly, you shouldn't need to
do anything at all.  Construct peer connections to different peers and
send the same media to both.  The link that has lower bandwidth will
be detected as such and the browser will reduce the send rate
accordingly; if it makes sense to do so, the resolution will be
reduced to avoid quality degrading too significantly.

Building all these extra hacks might be necessary in the short term,
but only to the extent that you are effectively working around a bug
in early implementations.

On 18 March 2014 11:57, Harald Alvestrand <harald@alvestrand.no> wrote:
> On 03/17/2014 06:10 PM, giuseppe pes wrote:
> I need a bit of help with this new amazing technology called webRTC.
> Let's consider this scenario for a WebRTC mesh network with three peers..
> The Peer A has an HD stream from its cam and it is sharing with the other 2
> peers B and C. B and C are not sending any data. The connection between A
> and B is rather good and the peer B can enjoy the video at full HD. While
> the connection between A and C is not as good as that between  A and B and
> it does not support an HD stream, thus B is not having a smooth video
> stream. Nevertheless, the connection between  C and A  would smoothly
> support a lower quality video, for instance 640x480.
> I would like to provide a smooth video experience to both clients. I could
> reduce the quality video of the source calling getUserMedia with a lower
> quality but this is not a good solution because it would reduce the quality
> of the video even for the peers that support HD (B) .
> What I would like to have is that the source peer ( A ) gets a stream at its
> maximum quality, in this case HD. Then the quality of the video to be sent
> to a peer is chosen according to the connection characteristic between the
> source and that peer. In our previous example :
>                    HD (1280x720)
>               /------------------->     B
>      A       /
>   stream HD /
>  (1280x720) \
>              \    HD (640x480)
>               \------------------->     C
> How can I achieve this result? Can I modify the SDP descriptor to set the
> video resolution just for that session?
> What the spec says you should be able to do:
> streama =
> getUserMedia({video:{mandatory:{width:{max:1280},height:{max:720}}}, ....)
> streamb = streama.clone()
> streamc = streama.clone()
> // add streams to the various peerconnections
> streamc.getVideoStreams[0].applyConstraints({mandatory{width: {max:  640},
> height:{max:480}}})
> But I don't think any browser actually implements this yet.
Received on Tuesday, 18 March 2014 19:09:41 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:38 UTC