QVideoEncoderSettings¶
The
QVideoEncoderSettings
class provides a set of video encoder settings. More…
Synopsis¶
Functions¶
def
__eq__
(other)def
__ne__
(other)def
bitRate
()def
codec
()def
encodingMode
()def
encodingOption
(option)def
encodingOptions
()def
frameRate
()def
isNull
()def
quality
()def
resolution
()def
setBitRate
(bitrate)def
setCodec
(arg__1)def
setEncodingMode
(arg__1)def
setEncodingOption
(option, value)def
setEncodingOptions
(options)def
setFrameRate
(rate)def
setQuality
(quality)def
setResolution
(arg__1)def
setResolution
(width, height)
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 aQVideoEncoderSettings
object, setting the desired properties and then passing it to aQMediaRecorder
instance using thesetEncodingSettings()
function.QVideoEncoderSettings videoSettings; videoSettings.setCodec("video/mpeg2"); videoSettings.setResolution(640, 480); recorder->setVideoSettings(videoSettings);
- class PySide2.QtMultimedia.QVideoEncoderSettings¶
PySide2.QtMultimedia.QVideoEncoderSettings(other)
- param other:
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
- PySide2.QtMultimedia.QVideoEncoderSettings.codec()¶
- Return type:
str
Returns the video codec.
See also
- PySide2.QtMultimedia.QVideoEncoderSettings.encodingMode()¶
- Return type:
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
.See also
- PySide2.QtMultimedia.QVideoEncoderSettings.encodingOptions()¶
- Return type:
Returns the all the encoding options as
QVariantMap
.See also
- PySide2.QtMultimedia.QVideoEncoderSettings.frameRate()¶
- Return type:
float
Returns the video frame rate.
See also
- 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:
- 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:
- 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:
Returns the video encoding quality.
See also
- PySide2.QtMultimedia.QVideoEncoderSettings.resolution()¶
- Return type:
Returns the resolution of the encoded video.
See also
- PySide2.QtMultimedia.QVideoEncoderSettings.setBitRate(bitrate)¶
- Parameters:
bitrate – int
Sets the bit rate of the encoded video stream to
value
.See also
- PySide2.QtMultimedia.QVideoEncoderSettings.setCodec(arg__1)¶
- Parameters:
arg__1 – str
Sets the video
codec
.See also
- PySide2.QtMultimedia.QVideoEncoderSettings.setEncodingMode(arg__1)¶
- Parameters:
arg__1 –
EncodingMode
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.
See also
- 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
- PySide2.QtMultimedia.QVideoEncoderSettings.setQuality(quality)¶
- Parameters:
quality –
EncodingQuality
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 theconstant quality
encoding mode
. Thequality
settings parameter is only used in theconstant quality
encoding mode
.See also
- PySide2.QtMultimedia.QVideoEncoderSettings.setResolution(arg__1)¶
- Parameters:
arg__1 –
PySide2.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
- PySide2.QtMultimedia.QVideoEncoderSettings.setResolution(width, height)
- Parameters:
width – int
height – int
Sets the
width
andheight
of the resolution of the encoded video.This is an overloaded function.
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.