webrtc.models.rtp_encoding_parameters#
- class webrtc.models.rtp_encoding_parameters.RtpEncodingParameters(active: Optional[bool] = True, max_bitrate: Optional[int] = None, max_framerate: Optional[float] = None, rid: Optional[str] = None, scale_resolution_down_by: Optional[float] = None)#
Bases:
webrtc.base.WebRTCObject
Model describes a single configuration of a codec for an
webrtc.RTCRtpSender
.- property active: bool#
If true, the described encoding is currently actively being used. That is, for RTP senders, the encoding is currently being used to send data, while for receivers, the encoding is being used to decode received data. The default value is true.
- Type
bool
- property maxBitrate: Optional[int]#
Alias for
max_bitrate
- property maxFramerate: Optional[int]#
Alias for
max_framerate
- property max_bitrate: Optional[int]#
An unsigned long integer indicating the maximum number of bits per second to allow for this encoding. Other parameters may further constrain the bit rate, such as the value of
max_framerate
or transport or physical network limitations.- Type
int
, optional
- property max_framerate: Optional[int]#
A double-precision floating-point value specifying the maximum number of frames per second to allow for this encoding.
- Type
int
, optional
- property rid: Optional[str]#
A string which, if set, specifies an RTP stream ID (RID) to be sent using the RID header extension. This parameter cannot be modified using
webrtc.RTCRtpSender.set_parameters
. Its value can only be set when the transceiver is first created.- Type
str
, optional
- property scaleResolutionDownBy: Optional[float]#
Alias for
scale_resolution_down_by
- property scale_resolution_down_by: Optional[float]#
Only used for senders whose track’s kind is video, this is a double-precision floating-point value specifying a factor by which to scale down the video during encoding. The default value, 1.0, means that the sent video’s size will be the same as the original. A value of 2.0 scales the video frames down by a factor of 2 in each dimension, resulting in a video 1/4 the size of the original. The value must not be less than 1.0 (you can’t use this to scale the video up).
- Type
float
, optional