Subject: Re: [rtcweb] Alternative Proposal for Dynamic Codec Parameter Change (Was: Re: Resolution negotiation - a contribution)

From: Magnus Westerlund <[email-masked]>
Date: Wed, 2 May 2012 15:13:07 +0200

On 2012-05-01 05:02, Justin Uberti wrote:

> 
>     According to my Colleague Per-Erik you can use video.width and
>     video.height to set the resolution the video element should have.
> 
>     see
>     http://dev.w3.org/html5/spec/the-video-element.html#the-video-element
> 
>     Thus the code you presented should be something like.
> 
>     video.src = webkitURL.createObjectURL(s);
>     video.width = 300;
>     video.height = 300;
>     canvas.getContext("2d").drawImage(video, 0, 0, 300, 300);
> 
>     That would set the video objects size to a 300, 300 video resolution.
>     The drawImage call I have removed the part which selects a cropping of
>     the source video to automatically show the full video in the specified
>     area.
> 
>     The adaptation of the video will of course not happen instantly so until
>     that happens the video will be scaled to the specified width and height.
>     And the actual delivered resolution will depend on the COP request and
>     what the sender support.
> 
> 
> I think this is a reasonable way to approach the problem as long as a
> <video/> element stays in the path. But as Harald mentions we have
> already considered several usages where a <video/> would not be in the
> path, i.e. connecting a MediaStream to a file, or perhaps as input to
> another PeerConnection.

I think in both these cases there is a need to take the information from
these sinks about what they request/desire in resolution and apply that
towards upstream. When it comes to relaying, this is no different what a
conference mixer will need to do in a multi-party session. Take in the
request from the multiple consumers of the media. Merge them into the
most suitable request and then send that to the media source.

For recording, which I don't think there exist a standardized interface
yet, it will need to indicate at what quality level the recording should
happen. I know that Per-Erik commented on this back in 2010, see:
http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2010-November/029069.html

To my understanding this discussion was part of what resulted in the
removal of the proposed recorder interface.

> 
> Perhaps we need to provide hooks directly on the MediaStream to allow
> the resolution to be specified, and these hooks are invoked
> automatically when the MediaStream is connected to a <video/>.
> 

When it comes to video resolution, I still haven't seen an case where
the sink for the video still aren't able to specify a preferred resolution.

As I see it this isn't only about resolution for video. There is a bunch
of other parameters that also needs to be considered and they are
different depending on media type, audio, video, real-time text etc.

We are working on a Internet draft that goes into more details as a
response to Harald's draft-alvestrand-rtcweb-resolution-00. However, it
will take some more working days to complete and go through Ericsson's
internal process.

Cheers

Magnus Westerlund

----------------------------------------------------------------------
Multimedia Technologies, Ericsson Research EAB/TVM
----------------------------------------------------------------------
Ericsson AB                | Phone  +46 10 7148287
Färögatan 6                | Mobile +46 73 0949079
SE-164 80 Stockholm, Sweden| mailto: [email-masked]
----------------------------------------------------------------------