QVideoEncoderSettings

The QVideoEncoderSettings class provides a set of video encoder settings. More

Inheritance diagram of PySide2.QtMultimedia.QVideoEncoderSettings

Synopsis

Functions

Detailed Description

A video encoder settings object is used to specify the video encoder settings used by QMediaRecorder . Video encoder settings are selected by constructing a QVideoEncoderSettings object, setting the desired properties and then passing it to a QMediaRecorder instance using the setEncodingSettings() function.

QVideoEncoderSettings videoSettings;
videoSettings.setCodec("video/mpeg2");
videoSettings.setResolution(640, 480);

recorder->setVideoSettings(videoSettings);
class PySide2.QtMultimedia.QVideoEncoderSettings

PySide2.QtMultimedia.QVideoEncoderSettings(other)

param other:

PySide2.QtMultimedia.QVideoEncoderSettings

Constructs a null video encoder settings object.

Constructs a copy of the video encoder settings object other .

PySide2.QtMultimedia.QVideoEncoderSettings.bitRate()
Return type:

int

Returns bit rate of the encoded video stream in bits per second.

See also

setBitRate()

PySide2.QtMultimedia.QVideoEncoderSettings.codec()
Return type:

str

Returns the video codec.

See also

setCodec()

PySide2.QtMultimedia.QVideoEncoderSettings.encodingMode()
Return type:

EncodingMode

Returns the video encoding mode.

See also

setEncodingMode() EncodingMode

PySide2.QtMultimedia.QVideoEncoderSettings.encodingOption(option)
Parameters:

option – str

Return type:

object

Returns the value of encoding option .

PySide2.QtMultimedia.QVideoEncoderSettings.encodingOptions()
Return type:

Returns the all the encoding options as QVariantMap .

PySide2.QtMultimedia.QVideoEncoderSettings.frameRate()
Return type:

float

Returns the video frame rate.

See also

setFrameRate()

PySide2.QtMultimedia.QVideoEncoderSettings.isNull()
Return type:

bool

Identifies if a video encoder settings object is uninitalized.

Returns true if the settings are null, and false if they are not.

PySide2.QtMultimedia.QVideoEncoderSettings.__ne__(other)
Parameters:

otherPySide2.QtMultimedia.QVideoEncoderSettings

Return type:

bool

Determines if other is of equal value to a video encoder settings object.

Returns true if the settings objects are not of equal value, and false if they are of equal value.

PySide2.QtMultimedia.QVideoEncoderSettings.__eq__(other)
Parameters:

otherPySide2.QtMultimedia.QVideoEncoderSettings

Return type:

bool

Determines if other is of equal value to a video encoder settings object.

Returns true if the settings objects are of equal value, and false if they are not of equal value.

PySide2.QtMultimedia.QVideoEncoderSettings.quality()
Return type:

EncodingQuality

Returns the video encoding quality.

See also

setQuality()

PySide2.QtMultimedia.QVideoEncoderSettings.resolution()
Return type:

PySide2.QtCore.QSize

Returns the resolution of the encoded video.

See also

setResolution()

PySide2.QtMultimedia.QVideoEncoderSettings.setBitRate(bitrate)
Parameters:

bitrate – int

Sets the bit rate of the encoded video stream to value .

See also

bitRate()

PySide2.QtMultimedia.QVideoEncoderSettings.setCodec(arg__1)
Parameters:

arg__1 – str

Sets the video codec .

See also

codec()

PySide2.QtMultimedia.QVideoEncoderSettings.setEncodingMode(arg__1)
Parameters:

arg__1EncodingMode

Sets the video encoding mode .

If ConstantQualityEncoding is set, the quality encoding parameter is used and bit rate is ignored, otherwise the bitrate is used.

The rest of encoding settings are respected regardless of encoding mode.

See also

encodingMode() EncodingMode

PySide2.QtMultimedia.QVideoEncoderSettings.setEncodingOption(option, value)
Parameters:
  • option – str

  • value – object

Set the encoding option value .

The supported set and meaning of encoding options are system and selected codec specific.

PySide2.QtMultimedia.QVideoEncoderSettings.setEncodingOptions(options)
Parameters:

options

Replace all the encoding options with options .

The supported set and meaning of encoding options are system and selected codec specific.

PySide2.QtMultimedia.QVideoEncoderSettings.setFrameRate(rate)
Parameters:

rate – float

Sets the video frame rate .

A value of 0 indicates the encoder should make an optimal choice based on what is available from the video source and the limitations of the codec.

See also

frameRate()

PySide2.QtMultimedia.QVideoEncoderSettings.setQuality(quality)
Parameters:

qualityEncodingQuality

Sets the video encoding quality .

Setting the video quality parameter allows backend to choose the balanced set of encoding parameters to achieve the desired quality level.

The quality settings parameter is only used in the constant quality encoding mode . The quality settings parameter is only used in the constant quality encoding mode .

See also

quality()

PySide2.QtMultimedia.QVideoEncoderSettings.setResolution(arg__1)
Parameters:

arg__1PySide2.QtCore.QSize

Sets the resolution of the encoded video.

An empty QSize indicates the encoder should make an optimal choice based on what is available from the video source and the limitations of the codec.

See also

resolution()

PySide2.QtMultimedia.QVideoEncoderSettings.setResolution(width, height)
Parameters:
  • width – int

  • height – int

Sets the width and height of the resolution of the encoded video.

This is an overloaded function.