![]() |
![]() |
![]() |
GStreamer Base Plugins 0.10 Plugins Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Properties |
"bitrate" gint : Read / Write "border" GstTheoraEncBorderMode : Read / Write "center" gboolean : Read / Write "keyframe-auto" gboolean : Read / Write "keyframe-force" gint : Read / Write "keyframe-freq" gint : Read / Write "keyframe-mindistance" gint : Read / Write "keyframe-threshold" gint : Read / Write "noise-sensitivity" gint : Read / Write "quality" gint : Read / Write "quick" gboolean : Read / Write "sharpness" gint : Read / Write "speed-level" gint : Read / Write / Construct "cap-overflow" gboolean : Read / Write "cap-underflow" gboolean : Read / Write "drop-frames" gboolean : Read / Write "rate-buffer" gint : Read / Write "vp3-compatible" gboolean : Read / Write "multipass-cache-file" gchar* : Read / Write "multipass-mode" GstTheoraEncMultipassMode : Read / Write
This element encodes raw video into a Theora stream. Theora is a royalty-free video codec maintained by the Xiph.org Foundation, based on the VP3 codec.
The theora codec internally only supports encoding of images that are a multiple of 16 pixels in both X and Y direction. It is however perfectly possible to encode images with other dimensions because an arbitrary rectangular cropping region can be set up. This element will automatically set up a correct cropping region if the dimensions are not multiples of 16 pixels.
To control the quality of the encoding, the "bitrate" and "quality" properties can be used. These two properties are mutualy exclusive. Setting the bitrate property will produce a constant bitrate (CBR) stream while setting the quality property will produce a variable bitrate (VBR) stream.
1 |
gst-launch -v videotestsrc num-buffers=1000 ! theoraenc ! oggmux ! filesink location=videotestsrc.ogg |
Last reviewed on 2006-03-01 (0.10.4)
typedef struct { GstElement element; GstPad *sinkpad; GstPad *srcpad; GstSegment segment; ogg_stream_state to; th_enc_ctx *encoder; th_info info; th_comment comment; gboolean initialised; gint video_bitrate; /* bitrate target for Theora video */ gboolean bitrate_changed; gint video_quality; /* Theora quality selector 0 = low, 63 = high */ gboolean quality_changed; gboolean keyframe_auto; gint keyframe_freq; gint keyframe_force; gint info_width, info_height; gint width, height; gint fps_n, fps_d; GstClockTime next_ts; GstClockTime expected_ts; gboolean next_discont; gboolean force_keyframe; guint packetno; guint64 bytes_out; guint64 granulepos_offset; guint64 timestamp_offset; gint speed_level; gboolean vp3_compatible; gboolean drop_frames; gboolean cap_overflow; gboolean cap_underflow; int rate_buffer; GstTheoraEncMultipassMode multipass_mode; GIOChannel *multipass_cache_fd; GstAdapter *multipass_cache_adapter; gchar *multipass_cache_file; } GstTheoraEnc;
Opaque data structure.
"bitrate"
property "bitrate" gint : Read / Write
Compressed video bitrate (kbps).
Allowed values: [0,16777215]
Default value: 0
"border"
property"border" GstTheoraEncBorderMode : Read / Write
ignored and kept for API compat only.
Default value: Black Border
"center"
property "center" gboolean : Read / Write
ignored and kept for API compat only.
Default value: TRUE
"keyframe-auto"
property "keyframe-auto" gboolean : Read / Write
Automatic keyframe detection.
Default value: TRUE
"keyframe-force"
property "keyframe-force" gint : Read / Write
Force keyframe every N frames.
Allowed values: [1,32768]
Default value: 64
"keyframe-freq"
property "keyframe-freq" gint : Read / Write
Keyframe frequency.
Allowed values: [1,32768]
Default value: 64
"keyframe-mindistance"
property "keyframe-mindistance" gint : Read / Write
ignored and kept for API compat only.
Allowed values: [1,32768]
Default value: 8
"keyframe-threshold"
property "keyframe-threshold" gint : Read / Write
ignored and kept for API compat only.
Allowed values: [0,32768]
Default value: 80
"noise-sensitivity"
property "noise-sensitivity" gint : Read / Write
ignored and kept for API compat only.
Allowed values: [0,32768]
Default value: 1
"quality"
property "quality" gint : Read / Write
Video quality.
Allowed values: [0,63]
Default value: 48
"quick"
property "quick" gboolean : Read / Write
ignored and kept for API compat only.
Default value: TRUE
"sharpness"
property "sharpness" gint : Read / Write
ignored and kept for API compat only.
Allowed values: [0,2]
Default value: 0
"speed-level"
property "speed-level" gint : Read / Write / Construct
Controls the amount of analysis performed when encoding. Higher values trade compression quality for speed. This property requires libtheora version >= 1.0, and the maximum value may vary based on encoder version.
Allowed values: [0,2]
Default value: 1
"cap-overflow"
property "cap-overflow" gboolean : Read / Write
Enable capping of bit reservoir overflows.
Default value: TRUE
"cap-underflow"
property "cap-underflow" gboolean : Read / Write
Enable capping of bit reservoir underflows.
Default value: FALSE
"drop-frames"
property "drop-frames" gboolean : Read / Write
Allow or disallow frame dropping.
Default value: TRUE
"rate-buffer"
property "rate-buffer" gint : Read / Write
Sets the size of the rate control buffer, in units of frames. The default value of 0 instructs the encoder to automatically select an appropriate value.
Allowed values: [0,1000]
Default value: 0
"vp3-compatible"
property "vp3-compatible" gboolean : Read / Write
Disables non-VP3 compatible features.
Default value: FALSE
"multipass-cache-file"
property "multipass-cache-file" gchar* : Read / Write
Multipass cache file.
Default value: NULL