GstEncodingProfile
Functions to create and handle encoding profiles.
Encoding profiles describe the media types and settings one wishes to use for an encoding process. The top-level profiles are commonly GstEncodingContainerProfile(s) (which contains a user-readable name and description along with which container format to use). These, in turn, reference one or more GstEncodingProfile(s) which indicate which encoding format should be used on each individual streams.
GstEncodingProfile(s) can be provided to the 'encodebin' element, which will take care of selecting and setting up the required elements to produce an output stream conforming to the specifications of the profile.
The encoding profiles do not necessarily specify which GstElement to use for the various encoding and muxing steps, as they allow to specifying the format one wishes to use.
Encoding profiles can be created at runtime by the application or loaded from (and saved to) file using the GstEncodingTarget API.
The encoding profile serialization format
Encoding profiles can be serialized to be used in the command line tools or to set it on other other GObject-s using gst_util_set_object_arg for example.
The serialization format aims at being simple to understand although flexible enough to describe any possible encoding profile. There are several ways to describe the profile depending on the context but the general idea is that it is a colon separated list of EncodingProfiles descriptions, the first one needs to describe a GstEncodingContainerProfile and the following ones describe elementary streams.
Using encoders and muxer element factory name
muxer_factory_name:video_encoder_factory_name:audio_encoder_factory_name
For example to encode a stream into a WebM container, with an OGG audio stream and a VP8 video stream, the serialized GstEncodingProfile looks like:
webmmux:vp8enc:vorbisenc
Define the encoding profile in a generic way using caps:
muxer_source_caps:video_encoder_source_caps:audio_encoder_source_caps
For example to encode a stream into a WebM container, with an OGG audio stream and a VP8 video stream, the serialized GstEncodingProfile looks like:
video/webm:video/x-vp8:audio/x-vorbis
It is possible to mix caps and element type names so you can specify a specific video encoder while using caps for other encoders/muxer.
Using preset
You can also set the preset name of the encoding profile using the caps+preset_name syntax as in:
video/webm:video/x-vp8+youtube-preset:audio/x-vorbis
Setting properties on muxers or on the encoding profile itself
Moreover, you can set the extra properties:
-
|element-properties,property1=true
(See gst_encoding_profile_set_element_properties) -
|presence=true
(See See gst_encoding_profile_get_presence) -
|single-segment=true
(See gst_encoding_profile_set_single_segment) -
|single-segment=true
(See gst_encoding_video_profile_set_variableframerate) -
|factory-name=element-factory-name
(See gst_encoding_profile_set_preset_name)
for example:
video/webm:video/x-vp8|presence=1|element-properties,target-bitrate=500000:audio/x-vorbis
Enforcing properties to the stream itself (video size, number of audio channels, etc..)
You can also use the restriction_caps->encoded_format_caps
syntax to
specify the restriction caps to be set on a GstEncodingProfile
It corresponds to the restriction GstCaps to apply before the encoder that will be used in the profile (See gst_encoding_profile_get_restriction). The fields present in restriction caps are properties of the raw stream (that is, before encoding), such as height and width for video and depth and sampling rate for audio. This property does not make sense for muxers. See gst_encoding_profile_get_restriction for more details.
To force a video stream to be encoded with a Full HD resolution (using WebM as the container format, VP8 as the video codec and Vorbis as the audio codec), you should use:
"video/webm:video/x-raw,width=1920,height=1080->video/x-vp8:audio/x-vorbis"
NOTE: Make sure to enclose into quotes to avoid '>' to be reinterpreted by the shell.
In the case you are specifying encoders directly, the following is also possible:
matroskamux:x264enc,width=1920,height=1080:audio/x-vorbis
Some serialized encoding formats examples
MP3 audio and H264 in MP4**
video/quicktime,variant=iso:video/x-h264:audio/mpeg,mpegversion=1,layer=3
Vorbis and theora in OGG
application/ogg:video/x-theora:audio/x-vorbis
AC3 and H264 in MPEG-TS
video/mpegts:video/x-h264:audio/x-ac3
Loading a profile from encoding targets
Anywhere you have to use a string to define a GstEncodingProfile, you can use load it from a GstEncodingTarget using the following syntaxes:
target_name[/profilename/category]
or
/path/to/target.gep:profilename
Examples
Creating a profile
#include <gst/pbutils/encoding-profile.h>
...
GstEncodingProfile *
create_ogg_theora_profile(void)
{
GstEncodingContainerProfile *prof;
GstCaps *caps;
caps = gst_caps_from_string("application/ogg");
prof = gst_encoding_container_profile_new("Ogg audio/video",
"Standard OGG/THEORA/VORBIS",
caps, NULL);
gst_caps_unref (caps);
caps = gst_caps_from_string("video/x-theora");
gst_encoding_container_profile_add_profile(prof,
(GstEncodingProfile*) gst_encoding_video_profile_new(caps, NULL, NULL, 0));
gst_caps_unref (caps);
caps = gst_caps_from_string("audio/x-vorbis");
gst_encoding_container_profile_add_profile(prof,
(GstEncodingProfile*) gst_encoding_audio_profile_new(caps, NULL, NULL, 0));
gst_caps_unref (caps);
return (GstEncodingProfile*) prof;
}
Example: Using an encoder preset with a profile
#include <gst/pbutils/encoding-profile.h>
...
GstEncodingProfile *
create_ogg_theora_profile(void)
{
GstEncodingVideoProfile *v;
GstEncodingAudioProfile *a;
GstEncodingContainerProfile *prof;
GstCaps *caps;
GstPreset *preset;
caps = gst_caps_from_string ("application/ogg");
prof = gst_encoding_container_profile_new ("Ogg audio/video",
"Standard OGG/THEORA/VORBIS",
caps, NULL);
gst_caps_unref (caps);
preset = GST_PRESET (gst_element_factory_make ("theoraenc", "theorapreset"));
g_object_set (preset, "bitrate", 1000, NULL);
// The preset will be saved on the filesystem,
// so try to use a descriptive name
gst_preset_save_preset (preset, "theora_bitrate_preset");
gst_object_unref (preset);
caps = gst_caps_from_string ("video/x-theora");
v = gst_encoding_video_profile_new (caps, "theora_bitrate_preset", NULL, 0);
gst_encoding_container_profile_add_profile (prof, (GstEncodingProfile*) v);
gst_caps_unref (caps);
caps = gst_caps_from_string ("audio/x-vorbis");
a = gst_encoding_audio_profile_new (caps, NULL, NULL, 0);
gst_encoding_container_profile_add_profile (prof, (GstEncodingProfile*) a);
gst_caps_unref (caps);
return (GstEncodingProfile*) prof;
}
Listing categories, targets and profiles
#include <gst/pbutils/encoding-profile.h>
...
GstEncodingProfile *prof;
GList *categories, *tmpc;
GList *targets, *tmpt;
...
categories = gst_encoding_list_available_categories ();
... Show available categories to user ...
for (tmpc = categories; tmpc; tmpc = tmpc->next) {
gchar *category = (gchar *) tmpc->data;
... and we can list all targets within that category ...
targets = gst_encoding_list_all_targets (category);
... and show a list to our users ...
g_list_foreach (targets, (GFunc) gst_encoding_target_unref, NULL);
g_list_free (targets);
}
g_list_foreach (categories, (GFunc) g_free, NULL);
g_list_free (categories);
...
GstEncodingAudioProfile
GObject ╰──GstEncodingProfile ╰──GstEncodingAudioProfile
Variant of GstEncodingProfile for audio streams.
Class structure
GstEncodingAudioProfileClass
GstPbutils.EncodingAudioProfileClass
GstPbutils.EncodingAudioProfileClass
GstPbutils.EncodingAudioProfile
GObject.Object ╰──GstPbutils.EncodingProfile ╰──GstPbutils.EncodingAudioProfile
Variant of GstPbutils.EncodingProfile for audio streams.
GstPbutils.EncodingAudioProfile
GObject.Object ╰──GstPbutils.EncodingProfile ╰──GstPbutils.EncodingAudioProfile
Variant of GstPbutils.EncodingProfile for audio streams.
Constructors
gst_encoding_audio_profile_new
GstEncodingAudioProfile * gst_encoding_audio_profile_new (GstCaps * format, const gchar * preset, GstCaps * restriction, guint presence)
Creates a new GstEncodingAudioProfile
All provided allocatable arguments will be internally copied, so can be safely freed/unreferenced after calling this method.
Parameters:
format
(
[transfer: none])
–
the GstCaps
preset
(
[nullable])
–
the preset(s) to use on the encoder, can be NULL
restriction
(
[nullable])
–
the GstCaps used to restrict the input to the encoder, can be NULL. See gst_encoding_profile_get_restriction for more details.
presence
–
the number of time this stream must be used. 0 means any number of times (including never)
the newly created GstEncodingAudioProfile.
GstPbutils.EncodingAudioProfile.prototype.new
function GstPbutils.EncodingAudioProfile.prototype.new(format: Gst.Caps, preset: String, restriction: Gst.Caps, presence: Number): {
// javascript wrapper for 'gst_encoding_audio_profile_new'
}
Creates a new GstPbutils.EncodingAudioProfile
All provided allocatable arguments will be internally copied, so can be safely freed/unreferenced after calling this method.
Parameters:
the Gst.Caps used to restrict the input to the encoder, can be NULL. See GstPbutils.EncodingProfile.prototype.get_restriction for more details.
the number of time this stream must be used. 0 means any number of times (including never)
the newly created GstPbutils.EncodingAudioProfile.
GstPbutils.EncodingAudioProfile.new
def GstPbutils.EncodingAudioProfile.new (format, preset, restriction, presence):
#python wrapper for 'gst_encoding_audio_profile_new'
Creates a new GstPbutils.EncodingAudioProfile
All provided allocatable arguments will be internally copied, so can be safely freed/unreferenced after calling this method.
Parameters:
the Gst.Caps used to restrict the input to the encoder, can be NULL. See GstPbutils.EncodingProfile.get_restriction for more details.
the number of time this stream must be used. 0 means any number of times (including never)
the newly created GstPbutils.EncodingAudioProfile.
GstEncodingContainerProfile
GObject ╰──GstEncodingProfile ╰──GstEncodingContainerProfile
Encoding profiles for containers. Keeps track of a list of GstEncodingProfile
Class structure
GstEncodingContainerProfileClass
GstPbutils.EncodingContainerProfileClass
GstPbutils.EncodingContainerProfileClass
GstPbutils.EncodingContainerProfile
GObject.Object ╰──GstPbutils.EncodingProfile ╰──GstPbutils.EncodingContainerProfile
Encoding profiles for containers. Keeps track of a list of GstPbutils.EncodingProfile
GstPbutils.EncodingContainerProfile
GObject.Object ╰──GstPbutils.EncodingProfile ╰──GstPbutils.EncodingContainerProfile
Encoding profiles for containers. Keeps track of a list of GstPbutils.EncodingProfile
Constructors
gst_encoding_container_profile_new
GstEncodingContainerProfile * gst_encoding_container_profile_new (const gchar * name, const gchar * description, GstCaps * format, const gchar * preset)
Creates a new GstEncodingContainerProfile.
Parameters:
name
(
[nullable])
–
The name of the container profile, can be NULL
description
(
[nullable])
–
The description of the container profile, can be NULL
format
(
[transfer: none])
–
The format to use for this profile
preset
(
[nullable])
–
The preset to use for this profile.
The newly created GstEncodingContainerProfile.
GstPbutils.EncodingContainerProfile.prototype.new
function GstPbutils.EncodingContainerProfile.prototype.new(name: String, description: String, format: Gst.Caps, preset: String): {
// javascript wrapper for 'gst_encoding_container_profile_new'
}
Creates a new GstPbutils.EncodingContainerProfile.
Parameters:
The format to use for this profile
The preset to use for this profile.
The newly created GstPbutils.EncodingContainerProfile.
GstPbutils.EncodingContainerProfile.new
def GstPbutils.EncodingContainerProfile.new (name, description, format, preset):
#python wrapper for 'gst_encoding_container_profile_new'
Creates a new GstPbutils.EncodingContainerProfile.
Parameters:
The format to use for this profile
The preset to use for this profile.
The newly created GstPbutils.EncodingContainerProfile.
Methods
gst_encoding_container_profile_add_profile
gboolean gst_encoding_container_profile_add_profile (GstEncodingContainerProfile * container, GstEncodingProfile * profile)
Add a GstEncodingProfile to the list of profiles handled by container.
No copy of profile will be made, if you wish to use it elsewhere after this method you should increment its reference count.
Parameters:
container
–
the GstEncodingContainerProfile to use
profile
(
[transfer: full])
–
the GstEncodingProfile to add.
GstPbutils.EncodingContainerProfile.prototype.add_profile
function GstPbutils.EncodingContainerProfile.prototype.add_profile(profile: GstPbutils.EncodingProfile): {
// javascript wrapper for 'gst_encoding_container_profile_add_profile'
}
Add a GstPbutils.EncodingProfile to the list of profiles handled by container.
No copy of profile will be made, if you wish to use it elsewhere after this method you should increment its reference count.
GstPbutils.EncodingContainerProfile.add_profile
def GstPbutils.EncodingContainerProfile.add_profile (self, profile):
#python wrapper for 'gst_encoding_container_profile_add_profile'
Add a GstPbutils.EncodingProfile to the list of profiles handled by container.
No copy of profile will be made, if you wish to use it elsewhere after this method you should increment its reference count.
gst_encoding_container_profile_contains_profile
gboolean gst_encoding_container_profile_contains_profile (GstEncodingContainerProfile * container, GstEncodingProfile * profile)
Checks if container contains a GstEncodingProfile identical to profile.
TRUE if container contains a GstEncodingProfile identical to profile, else FALSE.
GstPbutils.EncodingContainerProfile.prototype.contains_profile
function GstPbutils.EncodingContainerProfile.prototype.contains_profile(profile: GstPbutils.EncodingProfile): {
// javascript wrapper for 'gst_encoding_container_profile_contains_profile'
}
Checks if container contains a GstPbutils.EncodingProfile identical to profile.
Parameters:
true if container contains a GstPbutils.EncodingProfile identical to profile, else false.
GstPbutils.EncodingContainerProfile.contains_profile
def GstPbutils.EncodingContainerProfile.contains_profile (self, profile):
#python wrapper for 'gst_encoding_container_profile_contains_profile'
Checks if container contains a GstPbutils.EncodingProfile identical to profile.
Parameters:
True if container contains a GstPbutils.EncodingProfile identical to profile, else False.
gst_encoding_container_profile_get_profiles
const GList * gst_encoding_container_profile_get_profiles (GstEncodingContainerProfile * profile)
Parameters:
profile
–
(element-type GstPbutils.EncodingProfile) (transfer none): the list of contained GstEncodingProfile.
GstPbutils.EncodingContainerProfile.prototype.get_profiles
function GstPbutils.EncodingContainerProfile.prototype.get_profiles(): {
// javascript wrapper for 'gst_encoding_container_profile_get_profiles'
}
Parameters:
(element-type GstPbutils.EncodingProfile) (transfer none): the list of contained GstPbutils.EncodingProfile.
GstPbutils.EncodingContainerProfile.get_profiles
def GstPbutils.EncodingContainerProfile.get_profiles (self):
#python wrapper for 'gst_encoding_container_profile_get_profiles'
Parameters:
(element-type GstPbutils.EncodingProfile) (transfer none): the list of contained GstPbutils.EncodingProfile.
GstEncodingProfile
GObject ╰──GstEncodingProfile ╰──GstEncodingAudioProfile ╰──GstEncodingContainerProfile ╰──GstEncodingVideoProfile
The opaque base class object for all encoding profiles. This contains generic information like name, description, format and preset.
Class structure
GstEncodingProfileClass
GstPbutils.EncodingProfileClass
GstPbutils.EncodingProfileClass
GstPbutils.EncodingProfile
GObject.Object ╰──GstPbutils.EncodingProfile ╰──GstPbutils.EncodingAudioProfile ╰──GstPbutils.EncodingContainerProfile ╰──GstPbutils.EncodingVideoProfile
The opaque base class object for all encoding profiles. This contains generic information like name, description, format and preset.
GstPbutils.EncodingProfile
GObject.Object ╰──GstPbutils.EncodingProfile ╰──GstPbutils.EncodingAudioProfile ╰──GstPbutils.EncodingContainerProfile ╰──GstPbutils.EncodingVideoProfile
The opaque base class object for all encoding profiles. This contains generic information like name, description, format and preset.
Methods
gst_encoding_profile_copy
GstEncodingProfile * gst_encoding_profile_copy (GstEncodingProfile * self)
Makes a deep copy of self
Parameters:
self
–
The GstEncodingProfile to copy
The copy of self
Since : 1.12
GstPbutils.EncodingProfile.prototype.copy
function GstPbutils.EncodingProfile.prototype.copy(): {
// javascript wrapper for 'gst_encoding_profile_copy'
}
Makes a deep copy of self
Parameters:
The GstPbutils.EncodingProfile to copy
The copy of self
Since : 1.12
GstPbutils.EncodingProfile.copy
def GstPbutils.EncodingProfile.copy (self):
#python wrapper for 'gst_encoding_profile_copy'
Makes a deep copy of self
Parameters:
The GstPbutils.EncodingProfile to copy
The copy of self
Since : 1.12
gst_encoding_profile_get_allow_dynamic_output
gboolean gst_encoding_profile_get_allow_dynamic_output (GstEncodingProfile * profile)
Get whether the format that has been negotiated in at some point can be renegotiated later during the encoding.
Parameters:
profile
–
GstPbutils.EncodingProfile.prototype.get_allow_dynamic_output
function GstPbutils.EncodingProfile.prototype.get_allow_dynamic_output(): {
// javascript wrapper for 'gst_encoding_profile_get_allow_dynamic_output'
}
Get whether the format that has been negotiated in at some point can be renegotiated later during the encoding.
Parameters:
GstPbutils.EncodingProfile.get_allow_dynamic_output
def GstPbutils.EncodingProfile.get_allow_dynamic_output (self):
#python wrapper for 'gst_encoding_profile_get_allow_dynamic_output'
Get whether the format that has been negotiated in at some point can be renegotiated later during the encoding.
Parameters:
gst_encoding_profile_get_description
const gchar * gst_encoding_profile_get_description (GstEncodingProfile * profile)
Parameters:
profile
–
the description of the profile, can be NULL.
GstPbutils.EncodingProfile.prototype.get_description
function GstPbutils.EncodingProfile.prototype.get_description(): {
// javascript wrapper for 'gst_encoding_profile_get_description'
}
Parameters:
GstPbutils.EncodingProfile.get_description
def GstPbutils.EncodingProfile.get_description (self):
#python wrapper for 'gst_encoding_profile_get_description'
Parameters:
gst_encoding_profile_get_element_properties
GstStructure * gst_encoding_profile_get_element_properties (GstEncodingProfile * self)
Parameters:
self
–
The properties that are going to be set on the underlying element
Since : 1.20
GstPbutils.EncodingProfile.prototype.get_element_properties
function GstPbutils.EncodingProfile.prototype.get_element_properties(): {
// javascript wrapper for 'gst_encoding_profile_get_element_properties'
}
Parameters:
The properties that are going to be set on the underlying element
Since : 1.20
GstPbutils.EncodingProfile.get_element_properties
def GstPbutils.EncodingProfile.get_element_properties (self):
#python wrapper for 'gst_encoding_profile_get_element_properties'
Parameters:
The properties that are going to be set on the underlying element
Since : 1.20
gst_encoding_profile_get_file_extension
const gchar * gst_encoding_profile_get_file_extension (GstEncodingProfile * profile)
Parameters:
profile
–
a suitable file extension for profile, or NULL.
GstPbutils.EncodingProfile.prototype.get_file_extension
function GstPbutils.EncodingProfile.prototype.get_file_extension(): {
// javascript wrapper for 'gst_encoding_profile_get_file_extension'
}
Parameters:
a suitable file extension for profile, or NULL.
GstPbutils.EncodingProfile.get_file_extension
def GstPbutils.EncodingProfile.get_file_extension (self):
#python wrapper for 'gst_encoding_profile_get_file_extension'
Parameters:
a suitable file extension for profile, or NULL.
gst_encoding_profile_get_format
GstCaps * gst_encoding_profile_get_format (GstEncodingProfile * profile)
Parameters:
profile
–
(nullable): the GstCaps corresponding to the media format used in the profile. Unref after usage.
GstPbutils.EncodingProfile.prototype.get_format
function GstPbutils.EncodingProfile.prototype.get_format(): {
// javascript wrapper for 'gst_encoding_profile_get_format'
}
Parameters:
GstPbutils.EncodingProfile.get_format
def GstPbutils.EncodingProfile.get_format (self):
#python wrapper for 'gst_encoding_profile_get_format'
Parameters:
gst_encoding_profile_get_input_caps
GstCaps * gst_encoding_profile_get_input_caps (GstEncodingProfile * profile)
Computes the full output caps that this profile will be able to consume.
Parameters:
profile
–
The full caps the given profile can consume. Call gst_caps_unref when you are done with the caps.
GstPbutils.EncodingProfile.prototype.get_input_caps
function GstPbutils.EncodingProfile.prototype.get_input_caps(): {
// javascript wrapper for 'gst_encoding_profile_get_input_caps'
}
Computes the full output caps that this profile will be able to consume.
Parameters:
The full caps the given profile can consume. Call gst_caps_unref (not introspectable) when you are done with the caps.
GstPbutils.EncodingProfile.get_input_caps
def GstPbutils.EncodingProfile.get_input_caps (self):
#python wrapper for 'gst_encoding_profile_get_input_caps'
Computes the full output caps that this profile will be able to consume.
Parameters:
The full caps the given profile can consume. Call gst_caps_unref (not introspectable) when you are done with the caps.
gst_encoding_profile_get_name
const gchar * gst_encoding_profile_get_name (GstEncodingProfile * profile)
Parameters:
profile
–
the name of the profile, can be NULL.
GstPbutils.EncodingProfile.prototype.get_name
function GstPbutils.EncodingProfile.prototype.get_name(): {
// javascript wrapper for 'gst_encoding_profile_get_name'
}
Parameters:
GstPbutils.EncodingProfile.get_name
def GstPbutils.EncodingProfile.get_name (self):
#python wrapper for 'gst_encoding_profile_get_name'
Parameters:
gst_encoding_profile_get_presence
guint gst_encoding_profile_get_presence (GstEncodingProfile * profile)
Parameters:
profile
–
The number of times the profile is used in its parent container profile. If 0, it is not a mandatory stream.
GstPbutils.EncodingProfile.prototype.get_presence
function GstPbutils.EncodingProfile.prototype.get_presence(): {
// javascript wrapper for 'gst_encoding_profile_get_presence'
}
Parameters:
The number of times the profile is used in its parent container profile. If 0, it is not a mandatory stream.
GstPbutils.EncodingProfile.get_presence
def GstPbutils.EncodingProfile.get_presence (self):
#python wrapper for 'gst_encoding_profile_get_presence'
Parameters:
The number of times the profile is used in its parent container profile. If 0, it is not a mandatory stream.
gst_encoding_profile_get_preset
const gchar * gst_encoding_profile_get_preset (GstEncodingProfile * profile)
Parameters:
profile
–
the name of the GstPreset to be used in the profile. This is the name that has been set when saving the preset.
GstPbutils.EncodingProfile.prototype.get_preset
function GstPbutils.EncodingProfile.prototype.get_preset(): {
// javascript wrapper for 'gst_encoding_profile_get_preset'
}
Parameters:
the name of the Gst.Preset to be used in the profile. This is the name that has been set when saving the preset.
GstPbutils.EncodingProfile.get_preset
def GstPbutils.EncodingProfile.get_preset (self):
#python wrapper for 'gst_encoding_profile_get_preset'
Parameters:
the name of the Gst.Preset to be used in the profile. This is the name that has been set when saving the preset.
gst_encoding_profile_get_preset_name
const gchar * gst_encoding_profile_get_preset_name (GstEncodingProfile * profile)
Parameters:
profile
–
the name of the GstPreset factory to be used in the profile.
GstPbutils.EncodingProfile.prototype.get_preset_name
function GstPbutils.EncodingProfile.prototype.get_preset_name(): {
// javascript wrapper for 'gst_encoding_profile_get_preset_name'
}
Parameters:
the name of the Gst.Preset factory to be used in the profile.
GstPbutils.EncodingProfile.get_preset_name
def GstPbutils.EncodingProfile.get_preset_name (self):
#python wrapper for 'gst_encoding_profile_get_preset_name'
Parameters:
the name of the Gst.Preset factory to be used in the profile.
gst_encoding_profile_get_restriction
GstCaps * gst_encoding_profile_get_restriction (GstEncodingProfile * profile)
Parameters:
profile
–
The restriction GstCaps to apply before the encoder that will be used in the profile. The fields present in restriction caps are properties of the raw stream (that is before encoding), such as height and width for video and depth and sampling rate for audio. Does not apply to GstEncodingContainerProfile (since there is no corresponding raw stream). Can be NULL. Unref after usage.
GstPbutils.EncodingProfile.prototype.get_restriction
function GstPbutils.EncodingProfile.prototype.get_restriction(): {
// javascript wrapper for 'gst_encoding_profile_get_restriction'
}
Parameters:
The restriction Gst.Caps to apply before the encoder that will be used in the profile. The fields present in restriction caps are properties of the raw stream (that is before encoding), such as height and width for video and depth and sampling rate for audio. Does not apply to GstPbutils.EncodingContainerProfile (since there is no corresponding raw stream). Can be null. Unref after usage.
GstPbutils.EncodingProfile.get_restriction
def GstPbutils.EncodingProfile.get_restriction (self):
#python wrapper for 'gst_encoding_profile_get_restriction'
Parameters:
The restriction Gst.Caps to apply before the encoder that will be used in the profile. The fields present in restriction caps are properties of the raw stream (that is before encoding), such as height and width for video and depth and sampling rate for audio. Does not apply to GstPbutils.EncodingContainerProfile (since there is no corresponding raw stream). Can be None. Unref after usage.
gst_encoding_profile_get_single_segment
gboolean gst_encoding_profile_get_single_segment (GstEncodingProfile * profile)
Parameters:
profile
–
Since : 1.18
GstPbutils.EncodingProfile.prototype.get_single_segment
function GstPbutils.EncodingProfile.prototype.get_single_segment(): {
// javascript wrapper for 'gst_encoding_profile_get_single_segment'
}
Parameters:
Since : 1.18
GstPbutils.EncodingProfile.get_single_segment
def GstPbutils.EncodingProfile.get_single_segment (self):
#python wrapper for 'gst_encoding_profile_get_single_segment'
Parameters:
Since : 1.18
gst_encoding_profile_get_type_nick
const gchar * gst_encoding_profile_get_type_nick (GstEncodingProfile * profile)
Parameters:
profile
–
the human-readable name of the type of profile.
GstPbutils.EncodingProfile.prototype.get_type_nick
function GstPbutils.EncodingProfile.prototype.get_type_nick(): {
// javascript wrapper for 'gst_encoding_profile_get_type_nick'
}
Parameters:
the human-readable name of the type of profile.
GstPbutils.EncodingProfile.get_type_nick
def GstPbutils.EncodingProfile.get_type_nick (self):
#python wrapper for 'gst_encoding_profile_get_type_nick'
Parameters:
the human-readable name of the type of profile.
gst_encoding_profile_is_enabled
gboolean gst_encoding_profile_is_enabled (GstEncodingProfile * profile)
Parameters:
profile
–
GstPbutils.EncodingProfile.prototype.is_enabled
function GstPbutils.EncodingProfile.prototype.is_enabled(): {
// javascript wrapper for 'gst_encoding_profile_is_enabled'
}
Parameters:
GstPbutils.EncodingProfile.is_enabled
def GstPbutils.EncodingProfile.is_enabled (self):
#python wrapper for 'gst_encoding_profile_is_enabled'
Parameters:
gst_encoding_profile_is_equal
gboolean gst_encoding_profile_is_equal (GstEncodingProfile * a, GstEncodingProfile * b)
Checks whether the two GstEncodingProfile are equal
GstPbutils.EncodingProfile.prototype.is_equal
function GstPbutils.EncodingProfile.prototype.is_equal(b: GstPbutils.EncodingProfile): {
// javascript wrapper for 'gst_encoding_profile_is_equal'
}
Checks whether the two GstPbutils.EncodingProfile are equal
Parameters:
GstPbutils.EncodingProfile.is_equal
def GstPbutils.EncodingProfile.is_equal (self, b):
#python wrapper for 'gst_encoding_profile_is_equal'
Checks whether the two GstPbutils.EncodingProfile are equal
Parameters:
gst_encoding_profile_set_allow_dynamic_output
gst_encoding_profile_set_allow_dynamic_output (GstEncodingProfile * profile, gboolean allow_dynamic_output)
Sets whether the format that has been negotiated in at some point can be renegotiated later during the encoding.
Parameters:
profile
–
allow_dynamic_output
–
Whether the format that has been negotiated first can be renegotiated during the encoding
GstPbutils.EncodingProfile.prototype.set_allow_dynamic_output
function GstPbutils.EncodingProfile.prototype.set_allow_dynamic_output(allow_dynamic_output: Number): {
// javascript wrapper for 'gst_encoding_profile_set_allow_dynamic_output'
}
Sets whether the format that has been negotiated in at some point can be renegotiated later during the encoding.
Parameters:
Whether the format that has been negotiated first can be renegotiated during the encoding
GstPbutils.EncodingProfile.set_allow_dynamic_output
def GstPbutils.EncodingProfile.set_allow_dynamic_output (self, allow_dynamic_output):
#python wrapper for 'gst_encoding_profile_set_allow_dynamic_output'
Sets whether the format that has been negotiated in at some point can be renegotiated later during the encoding.
Parameters:
Whether the format that has been negotiated first can be renegotiated during the encoding
gst_encoding_profile_set_description
gst_encoding_profile_set_description (GstEncodingProfile * profile, const gchar * description)
Set description as the given description for the profile. A copy of description will be made internally.
Parameters:
profile
–
description
(
[nullable])
–
the description to set on the profile
GstPbutils.EncodingProfile.prototype.set_description
function GstPbutils.EncodingProfile.prototype.set_description(description: String): {
// javascript wrapper for 'gst_encoding_profile_set_description'
}
Set description as the given description for the profile. A copy of description will be made internally.
Parameters:
the description to set on the profile
GstPbutils.EncodingProfile.set_description
def GstPbutils.EncodingProfile.set_description (self, description):
#python wrapper for 'gst_encoding_profile_set_description'
Set description as the given description for the profile. A copy of description will be made internally.
Parameters:
the description to set on the profile
gst_encoding_profile_set_element_properties
gst_encoding_profile_set_element_properties (GstEncodingProfile * self, GstStructure * element_properties)
This allows setting the muxing/encoding element properties.
Set properties generically
[element-properties, boolean-prop=true, string-prop="hi"]
Mapping properties with well known element factories
element-properties-map, map = {
[openh264enc, gop-size=32, ],
[x264enc, key-int-max=32, tune=zerolatency],
}
Parameters:
self
–
element_properties
(
[transfer: full])
–
A GstStructure defining the properties to be set to the element the profile represents.
Since : 1.20
GstPbutils.EncodingProfile.prototype.set_element_properties
function GstPbutils.EncodingProfile.prototype.set_element_properties(element_properties: Gst.Structure): {
// javascript wrapper for 'gst_encoding_profile_set_element_properties'
}
This allows setting the muxing/encoding element properties.
Set properties generically
[element-properties, boolean-prop=true, string-prop="hi"]
Mapping properties with well known element factories
element-properties-map, map = {
[openh264enc, gop-size=32, ],
[x264enc, key-int-max=32, tune=zerolatency],
}
Parameters:
A Gst.Structure defining the properties to be set to the element the profile represents.
Since : 1.20
GstPbutils.EncodingProfile.set_element_properties
def GstPbutils.EncodingProfile.set_element_properties (self, element_properties):
#python wrapper for 'gst_encoding_profile_set_element_properties'
This allows setting the muxing/encoding element properties.
Set properties generically
[element-properties, boolean-prop=true, string-prop="hi"]
Mapping properties with well known element factories
element-properties-map, map = {
[openh264enc, gop-size=32, ],
[x264enc, key-int-max=32, tune=zerolatency],
}
Parameters:
A Gst.Structure defining the properties to be set to the element the profile represents.
Since : 1.20
gst_encoding_profile_set_enabled
gst_encoding_profile_set_enabled (GstEncodingProfile * profile, gboolean enabled)
Set whether the profile should be used or not.
Since : 1.6
GstPbutils.EncodingProfile.prototype.set_enabled
function GstPbutils.EncodingProfile.prototype.set_enabled(enabled: Number): {
// javascript wrapper for 'gst_encoding_profile_set_enabled'
}
Set whether the profile should be used or not.
Parameters:
Since : 1.6
GstPbutils.EncodingProfile.set_enabled
def GstPbutils.EncodingProfile.set_enabled (self, enabled):
#python wrapper for 'gst_encoding_profile_set_enabled'
Set whether the profile should be used or not.
Parameters:
Since : 1.6
gst_encoding_profile_set_format
gst_encoding_profile_set_format (GstEncodingProfile * profile, GstCaps * format)
Sets the media format used in the profile.
Parameters:
profile
–
format
(
[transfer: none])
–
the media format to use in the profile.
GstPbutils.EncodingProfile.prototype.set_format
function GstPbutils.EncodingProfile.prototype.set_format(format: Gst.Caps): {
// javascript wrapper for 'gst_encoding_profile_set_format'
}
Sets the media format used in the profile.
Parameters:
the media format to use in the profile.
GstPbutils.EncodingProfile.set_format
def GstPbutils.EncodingProfile.set_format (self, format):
#python wrapper for 'gst_encoding_profile_set_format'
Sets the media format used in the profile.
Parameters:
the media format to use in the profile.
gst_encoding_profile_set_name
gst_encoding_profile_set_name (GstEncodingProfile * profile, const gchar * name)
Set name as the given name for the profile. A copy of name will be made internally.
GstPbutils.EncodingProfile.prototype.set_name
function GstPbutils.EncodingProfile.prototype.set_name(name: String): {
// javascript wrapper for 'gst_encoding_profile_set_name'
}
Set name as the given name for the profile. A copy of name will be made internally.
Parameters:
the name to set on the profile
GstPbutils.EncodingProfile.set_name
def GstPbutils.EncodingProfile.set_name (self, name):
#python wrapper for 'gst_encoding_profile_set_name'
Set name as the given name for the profile. A copy of name will be made internally.
Parameters:
the name to set on the profile
gst_encoding_profile_set_presence
gst_encoding_profile_set_presence (GstEncodingProfile * profile, guint presence)
Set the number of time the profile is used in its parent container profile. If 0, it is not a mandatory stream
GstPbutils.EncodingProfile.prototype.set_presence
function GstPbutils.EncodingProfile.prototype.set_presence(presence: Number): {
// javascript wrapper for 'gst_encoding_profile_set_presence'
}
Set the number of time the profile is used in its parent container profile. If 0, it is not a mandatory stream
Parameters:
the number of time the profile can be used
GstPbutils.EncodingProfile.set_presence
def GstPbutils.EncodingProfile.set_presence (self, presence):
#python wrapper for 'gst_encoding_profile_set_presence'
Set the number of time the profile is used in its parent container profile. If 0, it is not a mandatory stream
Parameters:
the number of time the profile can be used
gst_encoding_profile_set_preset
gst_encoding_profile_set_preset (GstEncodingProfile * profile, const gchar * preset)
Sets the name of the preset to be used in the profile.
This is the name that has been set when saving the preset.
You can list the available presets for a specific element factory
using $ gst-inspect-1.0 element-factory-name
, for example for
x264enc
:
$ gst-inspect-1.0 x264enc
...
Presets:
"Profile Baseline": Baseline Profile
"Profile High": High Profile
"Profile Main": Main Profile
"Profile YouTube": YouTube recommended settings (https://support.google.com/youtube/answer/1722171)
"Quality High": High quality
"Quality Low": Low quality
"Quality Normal": Normal quality
"Zero Latency"
}
GstPbutils.EncodingProfile.prototype.set_preset
function GstPbutils.EncodingProfile.prototype.set_preset(preset: String): {
// javascript wrapper for 'gst_encoding_profile_set_preset'
}
Sets the name of the preset to be used in the profile.
This is the name that has been set when saving the preset.
You can list the available presets for a specific element factory
using $ gst-inspect-1.0 element-factory-name
, for example for
x264enc
:
$ gst-inspect-1.0 x264enc
...
Presets:
"Profile Baseline": Baseline Profile
"Profile High": High Profile
"Profile Main": Main Profile
"Profile YouTube": YouTube recommended settings (https://support.google.com/youtube/answer/1722171)
"Quality High": High quality
"Quality Low": Low quality
"Quality Normal": Normal quality
"Zero Latency"
}
Parameters:
the element preset to use
GstPbutils.EncodingProfile.set_preset
def GstPbutils.EncodingProfile.set_preset (self, preset):
#python wrapper for 'gst_encoding_profile_set_preset'
Sets the name of the preset to be used in the profile.
This is the name that has been set when saving the preset.
You can list the available presets for a specific element factory
using $ gst-inspect-1.0 element-factory-name
, for example for
x264enc
:
$ gst-inspect-1.0 x264enc
...
Presets:
"Profile Baseline": Baseline Profile
"Profile High": High Profile
"Profile Main": Main Profile
"Profile YouTube": YouTube recommended settings (https://support.google.com/youtube/answer/1722171)
"Quality High": High quality
"Quality Low": Low quality
"Quality Normal": Normal quality
"Zero Latency"
}
Parameters:
the element preset to use
gst_encoding_profile_set_preset_name
gst_encoding_profile_set_preset_name (GstEncodingProfile * profile, const gchar * preset_name)
Sets the name of the GstPreset's factory to be used in the profile. This is the name of the element factory that implements the GstPreset interface not the name of the preset itself (see gst_encoding_profile_set_preset).
Parameters:
profile
–
preset_name
(
[nullable])
–
The name of the element factory to use in this profile.
GstPbutils.EncodingProfile.prototype.set_preset_name
function GstPbutils.EncodingProfile.prototype.set_preset_name(preset_name: String): {
// javascript wrapper for 'gst_encoding_profile_set_preset_name'
}
Sets the name of the Gst.Preset's factory to be used in the profile. This is the name of the element factory that implements the Gst.Preset interface not the name of the preset itself (see GstPbutils.EncodingProfile.prototype.set_preset).
Parameters:
The name of the element factory to use in this profile.
GstPbutils.EncodingProfile.set_preset_name
def GstPbutils.EncodingProfile.set_preset_name (self, preset_name):
#python wrapper for 'gst_encoding_profile_set_preset_name'
Sets the name of the Gst.Preset's factory to be used in the profile. This is the name of the element factory that implements the Gst.Preset interface not the name of the preset itself (see GstPbutils.EncodingProfile.set_preset).
Parameters:
The name of the element factory to use in this profile.
gst_encoding_profile_set_restriction
gst_encoding_profile_set_restriction (GstEncodingProfile * profile, GstCaps * restriction)
Set the restriction GstCaps to apply before the encoder that will be used in the profile. See gst_encoding_profile_get_restriction for more about restrictions. Does not apply to GstEncodingContainerProfile.
Parameters:
profile
–
restriction
(
[nullable][transfer: full])
–
the restriction to apply
GstPbutils.EncodingProfile.prototype.set_restriction
function GstPbutils.EncodingProfile.prototype.set_restriction(restriction: Gst.Caps): {
// javascript wrapper for 'gst_encoding_profile_set_restriction'
}
Set the restriction Gst.Caps to apply before the encoder that will be used in the profile. See GstPbutils.EncodingProfile.prototype.get_restriction for more about restrictions. Does not apply to GstPbutils.EncodingContainerProfile.
Parameters:
the restriction to apply
GstPbutils.EncodingProfile.set_restriction
def GstPbutils.EncodingProfile.set_restriction (self, restriction):
#python wrapper for 'gst_encoding_profile_set_restriction'
Set the restriction Gst.Caps to apply before the encoder that will be used in the profile. See GstPbutils.EncodingProfile.get_restriction for more about restrictions. Does not apply to GstPbutils.EncodingContainerProfile.
Parameters:
the restriction to apply
gst_encoding_profile_set_single_segment
gst_encoding_profile_set_single_segment (GstEncodingProfile * profile, gboolean single_segment)
If using a single segment, buffers will be retimestamped and segments will be eat so as to appear as one segment.
NOTE: Single segment is not property supported when using avoid-reencoding
Parameters:
profile
–
Since : 1.18
GstPbutils.EncodingProfile.prototype.set_single_segment
function GstPbutils.EncodingProfile.prototype.set_single_segment(single_segment: Number): {
// javascript wrapper for 'gst_encoding_profile_set_single_segment'
}
If using a single segment, buffers will be retimestamped and segments will be eat so as to appear as one segment.
NOTE: Single segment is not property supported when using avoid-reencoding (not introspectable)
Parameters:
Since : 1.18
GstPbutils.EncodingProfile.set_single_segment
def GstPbutils.EncodingProfile.set_single_segment (self, single_segment):
#python wrapper for 'gst_encoding_profile_set_single_segment'
If using a single segment, buffers will be retimestamped and segments will be eat so as to appear as one segment.
NOTE: Single segment is not property supported when using avoid-reencoding (not introspectable)
Parameters:
Since : 1.18
gst_encoding_profile_to_string
gchar * gst_encoding_profile_to_string (GstEncodingProfile * profile)
Converts a GstEncodingProfile to a string in the "Encoding Profile serialization format".
Parameters:
profile
(
[transfer: none])
–
The GstEncodingProfile to convert.
A string representation of the GstEncodingProfile.
Since : 1.26
GstPbutils.EncodingProfile.prototype.to_string
function GstPbutils.EncodingProfile.prototype.to_string(): {
// javascript wrapper for 'gst_encoding_profile_to_string'
}
Converts a GstEncodingProfile to a string in the "Encoding Profile serialization format".
Parameters:
The GstEncodingProfile to convert.
A string representation of the GstEncodingProfile.
Since : 1.26
GstPbutils.EncodingProfile.to_string
def GstPbutils.EncodingProfile.to_string (self):
#python wrapper for 'gst_encoding_profile_to_string'
Converts a GstEncodingProfile to a string in the "Encoding Profile serialization format".
Parameters:
The GstEncodingProfile to convert.
A string representation of the GstEncodingProfile.
Since : 1.26
Functions
gst_encoding_profile_find
GstEncodingProfile * gst_encoding_profile_find (const gchar * targetname, const gchar * profilename, const gchar * category)
Find the GstEncodingProfile with the specified name and category.
Parameters:
targetname
(
[transfer: none])
–
The name of the target
profilename
(
[transfer: none][nullable])
–
The name of the profile, if NULL
provided, it will default to the encoding profile called default
.
category
(
[transfer: none][nullable])
–
The target category. Can be NULL
The matching GstEncodingProfile or NULL.
GstPbutils.EncodingProfile.prototype.find
function GstPbutils.EncodingProfile.prototype.find(targetname: String, profilename: String, category: String): {
// javascript wrapper for 'gst_encoding_profile_find'
}
Find the GstPbutils.EncodingProfile with the specified name and category.
Parameters:
The name of the target
The name of the profile, if null
provided, it will default to the encoding profile called default
.
The matching GstPbutils.EncodingProfile or null.
GstPbutils.EncodingProfile.find
def GstPbutils.EncodingProfile.find (targetname, profilename, category):
#python wrapper for 'gst_encoding_profile_find'
Find the GstPbutils.EncodingProfile with the specified name and category.
Parameters:
The name of the target
The name of the profile, if None
provided, it will default to the encoding profile called default
.
The matching GstPbutils.EncodingProfile or None.
gst_encoding_profile_from_discoverer
GstEncodingProfile * gst_encoding_profile_from_discoverer (GstDiscovererInfo * info)
Creates a GstEncodingProfile matching the formats from the given GstDiscovererInfo. Streams other than audio or video (eg, subtitles), are currently ignored.
Parameters:
info
(
[transfer: none])
–
The GstDiscovererInfo to read from
The new GstEncodingProfile or NULL.
GstPbutils.EncodingProfile.prototype.from_discoverer
function GstPbutils.EncodingProfile.prototype.from_discoverer(info: GstPbutils.DiscovererInfo): {
// javascript wrapper for 'gst_encoding_profile_from_discoverer'
}
Creates a GstPbutils.EncodingProfile matching the formats from the given GstPbutils.DiscovererInfo. Streams other than audio or video (eg, subtitles), are currently ignored.
Parameters:
The GstPbutils.DiscovererInfo to read from
The new GstPbutils.EncodingProfile or null.
GstPbutils.EncodingProfile.from_discoverer
def GstPbutils.EncodingProfile.from_discoverer (info):
#python wrapper for 'gst_encoding_profile_from_discoverer'
Creates a GstPbutils.EncodingProfile matching the formats from the given GstPbutils.DiscovererInfo. Streams other than audio or video (eg, subtitles), are currently ignored.
Parameters:
The GstPbutils.DiscovererInfo to read from
The new GstPbutils.EncodingProfile or None.
gst_encoding_profile_from_string
GstEncodingProfile * gst_encoding_profile_from_string (const gchar * string)
Converts a string in the "encoding profile serialization format" into a GstEncodingProfile. Refer to the encoding-profile documentation for details on the format.
Parameters:
string
–
The string to convert into a GstEncodingProfile.
A newly created GstEncodingProfile or NULL if the input string is not a valid encoding profile serialization format.
Since : 1.26
GstPbutils.EncodingProfile.prototype.from_string
function GstPbutils.EncodingProfile.prototype.from_string(string: String): {
// javascript wrapper for 'gst_encoding_profile_from_string'
}
Converts a string in the "encoding profile serialization format" into a GstEncodingProfile. Refer to the encoding-profile documentation for details on the format.
Parameters:
The string to convert into a GstEncodingProfile.
A newly created GstEncodingProfile or NULL if the input string is not a valid encoding profile serialization format.
Since : 1.26
GstPbutils.EncodingProfile.from_string
def GstPbutils.EncodingProfile.from_string (string):
#python wrapper for 'gst_encoding_profile_from_string'
Converts a string in the "encoding profile serialization format" into a GstEncodingProfile. Refer to the encoding-profile documentation for details on the format.
Parameters:
The string to convert into a GstEncodingProfile.
A newly created GstEncodingProfile or NULL if the input string is not a valid encoding profile serialization format.
Since : 1.26
Properties
element-properties
“element-properties” GstStructure *
A GstStructure defining the properties to be set to the element the profile represents.
For example for av1enc
:
element-properties,row-mt=true, end-usage=vbr
Flags : Read / Write
Since : 1.20
element-properties
“element-properties” Gst.Structure
A Gst.Structure defining the properties to be set to the element the profile represents.
For example for av1enc
:
element-properties,row-mt=true, end-usage=vbr
Flags : Read / Write
Since : 1.20
element_properties
“self.props.element_properties” Gst.Structure
A Gst.Structure defining the properties to be set to the element the profile represents.
For example for av1enc
:
element-properties,row-mt=true, end-usage=vbr
Flags : Read / Write
Since : 1.20
GstEncodingVideoProfile
GObject ╰──GstEncodingProfile ╰──GstEncodingVideoProfile
Variant of GstEncodingProfile for video streams, allows specifying the pass.
Class structure
GstEncodingVideoProfileClass
GstPbutils.EncodingVideoProfileClass
GstPbutils.EncodingVideoProfileClass
GstPbutils.EncodingVideoProfile
GObject.Object ╰──GstPbutils.EncodingProfile ╰──GstPbutils.EncodingVideoProfile
Variant of GstPbutils.EncodingProfile for video streams, allows specifying the pass.
GstPbutils.EncodingVideoProfile
GObject.Object ╰──GstPbutils.EncodingProfile ╰──GstPbutils.EncodingVideoProfile
Variant of GstPbutils.EncodingProfile for video streams, allows specifying the pass.
Constructors
gst_encoding_video_profile_new
GstEncodingVideoProfile * gst_encoding_video_profile_new (GstCaps * format, const gchar * preset, GstCaps * restriction, guint presence)
Creates a new GstEncodingVideoProfile
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 gst_encoding_video_profile_set_pass documentation.
If you wish to use/force a constant framerate please refer to the gst_encoding_video_profile_set_variableframerate documentation.
Parameters:
format
(
[transfer: none])
–
the GstCaps
preset
(
[nullable])
–
the preset(s) to use on the encoder, can be NULL
restriction
(
[nullable])
–
the GstCaps used to restrict the input to the encoder, can be NULL. See gst_encoding_profile_get_restriction for more details.
presence
–
the number of time this stream must be used. 0 means any number of times (including never)
the newly created GstEncodingVideoProfile.
GstPbutils.EncodingVideoProfile.prototype.new
function GstPbutils.EncodingVideoProfile.prototype.new(format: Gst.Caps, preset: String, restriction: Gst.Caps, presence: Number): {
// javascript wrapper for 'gst_encoding_video_profile_new'
}
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.prototype.set_pass documentation.
If you wish to use/force a constant framerate please refer to the GstPbutils.EncodingVideoProfile.prototype.set_variableframerate documentation.
Parameters:
the Gst.Caps used to restrict the input to the encoder, can be NULL. See GstPbutils.EncodingProfile.prototype.get_restriction for more details.
the number of time this stream must be used. 0 means any number of times (including never)
the newly created GstPbutils.EncodingVideoProfile.
GstPbutils.EncodingVideoProfile.new
def GstPbutils.EncodingVideoProfile.new (format, preset, restriction, presence):
#python wrapper for 'gst_encoding_video_profile_new'
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.
Parameters:
the Gst.Caps used to restrict the input to the encoder, can be NULL. See GstPbutils.EncodingProfile.get_restriction for more details.
the number of time this stream must be used. 0 means any number of times (including never)
the newly created GstPbutils.EncodingVideoProfile.
Methods
gst_encoding_video_profile_get_pass
guint gst_encoding_video_profile_get_pass (GstEncodingVideoProfile * prof)
Get the pass number if this is part of a multi-pass profile.
Parameters:
prof
–
The pass number. Starts at 1 for multi-pass. 0 if this is not a multi-pass profile
GstPbutils.EncodingVideoProfile.prototype.get_pass
function GstPbutils.EncodingVideoProfile.prototype.get_pass(): {
// javascript wrapper for 'gst_encoding_video_profile_get_pass'
}
Get the pass number if this is part of a multi-pass profile.
Parameters:
The pass number. Starts at 1 for multi-pass. 0 if this is not a multi-pass profile
GstPbutils.EncodingVideoProfile.get_pass
def GstPbutils.EncodingVideoProfile.get_pass (self):
#python wrapper for 'gst_encoding_video_profile_get_pass'
Get the pass number if this is part of a multi-pass profile.
Parameters:
The pass number. Starts at 1 for multi-pass. 0 if this is not a multi-pass profile
gst_encoding_video_profile_get_variableframerate
gboolean gst_encoding_video_profile_get_variableframerate (GstEncodingVideoProfile * prof)
NOTE: Fixed framerate won't be enforced when avoid-reencoding is set.
Parameters:
prof
–
Whether non-constant video framerate is allowed for encoding.
GstPbutils.EncodingVideoProfile.prototype.get_variableframerate
function GstPbutils.EncodingVideoProfile.prototype.get_variableframerate(): {
// javascript wrapper for 'gst_encoding_video_profile_get_variableframerate'
}
NOTE: Fixed framerate won't be enforced when avoid-reencoding (not introspectable) is set.
Parameters:
Whether non-constant video framerate is allowed for encoding.
GstPbutils.EncodingVideoProfile.get_variableframerate
def GstPbutils.EncodingVideoProfile.get_variableframerate (self):
#python wrapper for 'gst_encoding_video_profile_get_variableframerate'
NOTE: Fixed framerate won't be enforced when avoid-reencoding (not introspectable) is set.
Parameters:
Whether non-constant video framerate is allowed for encoding.
gst_encoding_video_profile_set_pass
gst_encoding_video_profile_set_pass (GstEncodingVideoProfile * prof, guint pass)
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).
GstPbutils.EncodingVideoProfile.prototype.set_pass
function GstPbutils.EncodingVideoProfile.prototype.set_pass(pass: Number): {
// javascript wrapper for 'gst_encoding_video_profile_set_pass'
}
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).
Parameters:
the pass number for this profile
GstPbutils.EncodingVideoProfile.set_pass
def GstPbutils.EncodingVideoProfile.set_pass (self, pass):
#python wrapper for 'gst_encoding_video_profile_set_pass'
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).
Parameters:
the pass number for this profile
gst_encoding_video_profile_set_variableframerate
gst_encoding_video_profile_set_variableframerate (GstEncodingVideoProfile * prof, gboolean variableframerate)
If set to TRUE, then the incoming stream will be allowed to have non-constant framerate. If set to FALSE (default value), then the incoming stream will be normalized by dropping/duplicating frames in order to produce a constance framerate.
GstPbutils.EncodingVideoProfile.prototype.set_variableframerate
function GstPbutils.EncodingVideoProfile.prototype.set_variableframerate(variableframerate: Number): {
// javascript wrapper for 'gst_encoding_video_profile_set_variableframerate'
}
If set to true, then the incoming stream will be allowed to have non-constant framerate. If set to false (default value), then the incoming stream will be normalized by dropping/duplicating frames in order to produce a constance framerate.
Parameters:
a boolean
GstPbutils.EncodingVideoProfile.set_variableframerate
def GstPbutils.EncodingVideoProfile.set_variableframerate (self, variableframerate):
#python wrapper for 'gst_encoding_video_profile_set_variableframerate'
If set to True, then the incoming stream will be allowed to have non-constant framerate. If set to False (default value), then the incoming stream will be normalized by dropping/duplicating frames in order to produce a constance framerate.
Parameters:
a boolean
Function Macros
gst_encoding_profile_ref
#define gst_encoding_profile_ref(profile) (g_object_ref ((GObject*) profile))
Increases the reference count of the profile.
Parameters:
profile
–
gst_encoding_profile_unref
#define gst_encoding_profile_unref(profile) (g_object_unref ((GObject*) profile))
Decreases the reference count of the profile, possibly freeing the profile.
Parameters:
profile
–
Constants
GST_TYPE_ENCODING_AUDIO_PROFILE
#define GST_TYPE_ENCODING_AUDIO_PROFILE \ (gst_encoding_audio_profile_get_type ())
GST_TYPE_ENCODING_CONTAINER_PROFILE
#define GST_TYPE_ENCODING_CONTAINER_PROFILE \ (gst_encoding_container_profile_get_type ())
GST_TYPE_ENCODING_PROFILE
#define GST_TYPE_ENCODING_PROFILE \ (gst_encoding_profile_get_type ())
GST_TYPE_ENCODING_VIDEO_PROFILE
#define GST_TYPE_ENCODING_VIDEO_PROFILE \ (gst_encoding_video_profile_get_type ())
The results of the search are