Application developers can now view and alter parameters for how tracks are encoded and transmitted by using GetParameters/SetParameters with the RtpSender.
Of the RtpParameters, the current implementation returns the read-only RtcpParameters and RTPCodecParameters after negotiation and allows changing the active, max_bitrate_bps and bitrate_priority RtpEncodingParameters. The encoding parameters can be used for simulcast layers and are explained in more detail below.
active - Indicates if a stream is actively being encoded/sent. This can be set for a simulcast layer encoding or the RtpSender as a whole by setting the value at encodings[0].
max_bitrate_bps - Sets a stream’s max bitrate. This can be set for a simulcast layer encoding or the RtpSender as a whole by setting the value at encodings[0].
bitrate_priority - Sets the relative bitrate priority for the RtpSender. This is implemented for the RtpSender as a whole by setting the value at encodings[0].
This is supported in Chrome M68 with RTCRtpSender.get/setParameters, with the RTCRtpEncodingParameters. The maxBitrate and priority encoding parameters are not supported for simulcast layers, but the maxBitrate will be supported for simulcast layers in M69.
--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/251d9332-0b84-4f6b-85b3-665c23d68473%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/f80fb858-5fcf-486b-43c5-6cbb4da83b68%40gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/9efb6999-80fd-43b4-b1e2-ffdebc804d71%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/9efb6999-80fd-43b4-b1e2-ffdebc804d71%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/CAF3dAjjDjQcwErY%2Bo-VH4ZrKNDgg0sWjkazFP7PUtG5S14gD2g%40mail.gmail.com.To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/9efb6999-80fd-43b4-b1e2-ffdebc804d71%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/CAF3dAjjDjQcwErY%2Bo-VH4ZrKNDgg0sWjkazFP7PUtG5S14gD2g%40mail.gmail.com.
--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/CAChOqg77jXH6TVJGBxHs-Dz%2BLDYa8zQ0Q%2BtMni5zc2MG8dsWMw%40mail.gmail.com.
Excuse me, I meant to link this line:
On Fri, Jul 13, 2018 at 2:27 PM Seth Hampson <sham...@google.com> wrote:
Hi Brian, yes that looks correct. Have you tried setting a different value other than 0? If you would like to turn off the stream I suggest setting "params.encodings[0].active = false;" instead. It looks like in the code 0 is treated as an "unset" value and is not used:-Seth
On Fri, Jul 13, 2018 at 1:11 PM Brian Baldino <br...@jitsi.org> wrote:
Thanks Seth, so something like:var videoSender = pc.getSenders()[1]var params = videoSender.getParameters()params.encodings[0].maxBitrate = 0videoSender.setParameters(params);Should take effect immediately? Or does something else need to be done? I don't see the send bitrate change when trying that. This is on Canary 69.0.3489.0.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/9efb6999-80fd-43b4-b1e2-ffdebc804d71%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/CAF3dAjjDjQcwErY%2Bo-VH4ZrKNDgg0sWjkazFP7PUtG5S14gD2g%40mail.gmail.com.--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/CAChOqg77jXH6TVJGBxHs-Dz%2BLDYa8zQ0Q%2BtMni5zc2MG8dsWMw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/CAF3dAjgof-borkX9AEN%2BFw5d%2B__Fdo_oHFDrf5zztVdgPrR0Ew%40mail.gmail.com.To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
setting the bitrate to 1 instead of 0 works for me. Makes me wonder what the encoder makes of that target bitrate though :-)
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/9efb6999-80fd-43b4-b1e2-ffdebc804d71%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/CAF3dAjjDjQcwErY%2Bo-VH4ZrKNDgg0sWjkazFP7PUtG5S14gD2g%40mail.gmail.com.
--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/CAChOqg77jXH6TVJGBxHs-Dz%2BLDYa8zQ0Q%2BtMni5zc2MG8dsWMw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/CAF3dAjgof-borkX9AEN%2BFw5d%2B__Fdo_oHFDrf5zztVdgPrR0Ew%40mail.gmail.com.
--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/CADxkKiJ9x2hAWe8vzRSccZJVrbBy%2BfLdmDnupkMVkbx2GN%2BU_w%40mail.gmail.com.
Yeah, this was brought up in this bug (https://bugs.chromium.org/p/webrtc/issues/detail?id=9141) and the decision was made for the application to get what they want. Even if that's an undesirably low bitrate.
On Fri, Jul 13, 2018 at 2:37 PM 'Philipp Hancke' via discuss-webrtc <discuss-webrtc@googlegroups.com> wrote:
setting the bitrate to 1 instead of 0 works for me. Makes me wonder what the encoder makes of that target bitrate though :-)
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/9efb6999-80fd-43b4-b1e2-ffdebc804d71%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/CAF3dAjjDjQcwErY%2Bo-VH4ZrKNDgg0sWjkazFP7PUtG5S14gD2g%40mail.gmail.com.--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/CAChOqg77jXH6TVJGBxHs-Dz%2BLDYa8zQ0Q%2BtMni5zc2MG8dsWMw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/CAF3dAjgof-borkX9AEN%2BFw5d%2B__Fdo_oHFDrf5zztVdgPrR0Ew%40mail.gmail.com.--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/CADxkKiJ9x2hAWe8vzRSccZJVrbBy%2BfLdmDnupkMVkbx2GN%2BU_w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/CAF3dAji31HUU3p3kLhudif2et2ZNDsu_ec247BSbCC4c30Snsg%40mail.gmail.com.To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
Ah ha! Yeah that must be it. I did play with active = false a bit too and that works really well. Thanks.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/CAChOqg78jkAZAb%3DCpdNBqwqpu95AbFrtx%3DNVNTks8uwWt5Ybxw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/CADxkKiLd-T9aKhP%2B%3DMO4KMS2tDV6SGScihWF%2BYPgvQ4xsrZkfA%40mail.gmail.com.
You might want to check out various combinations of "disable 2 streams". I remember at one point there being confusion about which encoding is listed first - the smallest or the biggest. And I can't remember offhand how it was resolved.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/CAOqqYVHf3htoqdz7gNVFkBahuG9jZi2J9Z5jPaFZqY_iBHB7QQ%40mail.gmail.com.
for (const auto &sender : peer_connection->GetSenders()) {
if (std::string("video_track") == sender->id()) {
webrtc::RtpParameters rtpParameters = sender->GetParameters();
for(auto encoding : rtpParameters.encodings) {
encoding.max_bitrate_bps = bitrate;
PEER_CONNECTION_LOG("Find a encoding" + std::to_string(encoding.max_bitrate_bps.value()), INFO);
}
if (sender->SetParameters(rtpParameters).ok()) {
PEER_CONNECTION_LOG("Peer connection sender {" + sender->id() + "}change bitrate:" + std::to_string(bitrate), INFO);
}
}
}
To unsubscribe from this group and stop receiving emails from it, send an email to discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/9efb6999-80fd-43b4-b1e2-ffdebc804d71%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/6335df0f-7b19-4219-81e0-4321d3132c55%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/CAOqqYVG1ALg3S2beQGcUnbTeYq8Pt7E3_KxRxuodH5V3rZEofQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/6335df0f-7b19-4219-81e0-4321d3132c55%40googlegroups.com.
--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/CAOqqYVG1ALg3S2beQGcUnbTeYq8Pt7E3_KxRxuodH5V3rZEofQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/6335df0f-7b19-4219-81e0-4321d3132c55%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/CADRnnSVE7qk6rbMWAc6RRYjzTOaZOT2uRhsmoBcOycOoiF%3DG4A%40mail.gmail.com.