GstPbutils.EncodingVideoProfile¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class GstPbutils.EncodingVideoProfile(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Variant of
GstPbutils.EncodingProfile
for video streams, allows specifying the pass.- classmethod new(format, preset, restriction, presence)[source]¶
- Parameters:
preset (
str
orNone
) – the preset(s) to use on the encoder, can beNone
restriction (
Gst.Caps
orNone
) – theGst.Caps
used to restrict the input to the encoder, can beNone
. SeeGstPbutils.EncodingProfile.get_restriction
() for more details.presence (
int
) – the number of time this stream must be used. 0 means any number of times (including never)
- Returns:
the newly created
GstPbutils.EncodingVideoProfile
.- Return type:
Creates a new
GstPbutils.EncodingVideoProfile
All provided allocatable arguments will be internally copied, so can be safely freed/unreferenced after calling this method.
If you wish to control the pass number (in case of multi-pass scenarios), please refer to the
GstPbutils.EncodingVideoProfile.set_pass
() documentation.If you wish to use/force a constant framerate please refer to the
GstPbutils.EncodingVideoProfile.set_variableframerate
() documentation.
- get_pass()[source]¶
- Returns:
The pass number. Starts at 1 for multi-pass. 0 if this is not a multi-pass profile
- Return type:
Get the pass number if this is part of a multi-pass profile.
- get_variableframerate()[source]¶
- Returns:
Whether non-constant video framerate is allowed for encoding.
- Return type:
*NOTE*: Fixed framerate won’t be enforced when #encodebin:avoid-reencoding is set.
- set_pass(pass_)[source]¶
- Parameters:
pass (
int
) – the pass number for this profile
Sets the pass number of this video profile. The first pass profile should have this value set to 1. If this video profile isn’t part of a multi-pass profile, you may set it to 0 (the default value).
- set_variableframerate(variableframerate)[source]¶
- Parameters:
variableframerate (
bool
) – a boolean
If set to
True
, then the incoming stream will be allowed to have non-constant framerate. If set toFalse
(default value), then the incoming stream will be normalized by dropping/duplicating frames in order to produce a constance framerate.