QVideoEncoderSettingsclass provides a set of video encoder settings. 更多 …
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)
视频编码器设置对象用于指定视频编码器设置使用通过
QMediaRecorder. Video encoder settings are selected by constructing aQVideoEncoderSettingsobject, setting the desired properties and then passing it to aQMediaRecorderinstance using thesetEncodingSettings()函数。QVideoEncoderSettings videoSettings; videoSettings.setCodec("video/mpeg2"); videoSettings.setResolution(640, 480); recorder->setVideoSettings(videoSettings);
QVideoEncoderSettings
¶
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
(
)
¶
int
Returns bit rate of the encoded video stream in bits per second.
另请参阅
PySide2.QtMultimedia.QVideoEncoderSettings.
codec
(
)
¶
unicode
Returns the video codec.
另请参阅
PySide2.QtMultimedia.QVideoEncoderSettings.
encodingMode
(
)
¶
EncodingMode
返回视频编码模式。
另请参阅
setEncodingMode()
EncodingMode
PySide2.QtMultimedia.QVideoEncoderSettings.
encodingOption
(
option
)
¶
option – unicode
object
Returns the value of encoding
option
.
PySide2.QtMultimedia.QVideoEncoderSettings.
encodingOptions
(
)
¶
Returns the all the encoding options as
QVariantMap
.
PySide2.QtMultimedia.QVideoEncoderSettings.
frameRate
(
)
¶
qreal
返回视频帧速率。
另请参阅
PySide2.QtMultimedia.QVideoEncoderSettings.
isNull
(
)
¶
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
)
¶
other
–
QVideoEncoderSettings
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
)
¶
other
–
QVideoEncoderSettings
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
(
)
¶
EncodingQuality
返回视频编码品质。
另请参阅
PySide2.QtMultimedia.QVideoEncoderSettings.
resolution
(
)
¶
QSize
Returns the resolution of the encoded video.
另请参阅
PySide2.QtMultimedia.QVideoEncoderSettings.
setBitRate
(
bitrate
)
¶
bitrate
–
int
Sets the bit rate of the encoded video stream to
value
.
另请参阅
PySide2.QtMultimedia.QVideoEncoderSettings.
setCodec
(
arg__1
)
¶
arg__1 – unicode
Sets the video
codec
.
另请参阅
PySide2.QtMultimedia.QVideoEncoderSettings.
setEncodingMode
(
arg__1
)
¶
arg__1
–
EncodingMode
Sets the video encoding
mode
.
若
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.
另请参阅
encodingMode()
EncodingMode
PySide2.QtMultimedia.QVideoEncoderSettings.
setEncodingOption
(
option
,
value
)
¶
option – unicode
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
)
¶
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
)
¶
rate
–
qreal
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.
另请参阅
PySide2.QtMultimedia.QVideoEncoderSettings.
setQuality
(
quality
)
¶
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.
quality
settings parameter is only used in the
constant
quality
encoding
mode
。
quality
settings parameter is only used in the
constant
quality
encoding
mode
.
另请参阅
PySide2.QtMultimedia.QVideoEncoderSettings.
setResolution
(
arg__1
)
¶
arg__1
–
QSize
设置
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.
另请参阅
PySide2.QtMultimedia.QVideoEncoderSettings.
setResolution
(
width
,
height
)
¶
width
–
int
height
–
int
设置
width
and
height
of the resolution of the encoded video.
这是重载函数。