![]() |
![]() |
![]() |
GStreamer Ugly Plugins 0.10 Plugins Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
"analyse" GstX264EncAnalyse : Read / Write "aud" gboolean : Read / Write "b-adapt" gboolean : Read / Write "b-pyramid" gboolean : Read / Write "bframes" guint : Read / Write "bitrate" guint : Read / Write "byte-stream" gboolean : Read / Write "cabac" gboolean : Read / Write "dct8x8" gboolean : Read / Write "interlaced" gboolean : Read / Write "ip-factor" gfloat : Read / Write "key-int-max" guint : Read / Write "me" GstX264EncMe : Read / Write "multipass-cache-file" gchar* : Read / Write "noise-reduction" guint : Read / Write "pass" GstX264EncPass : Read / Write "pb-factor" gfloat : Read / Write "qp-max" guint : Read / Write "qp-min" guint : Read / Write "qp-step" guint : Read / Write "quantizer" guint : Read / Write "ref" guint : Read / Write "sps-id" guint : Read / Write "stats-file" gchar* : Read / Write "subme" guint : Read / Write "threads" guint : Read / Write "trellis" gboolean : Read / Write "vbv-buf-capacity" guint : Read / Write "weightb" gboolean : Read / Write "intra-refresh" gboolean : Read / Write "mb-tree" gboolean : Read / Write "rc-lookahead" gint : Read / Write "sliced-threads" gboolean : Read / Write "sync-lookahead" gint : Read / Write "option-string" gchar* : Read / Write "profile" GstX264EncProfile : Read / Write "psy-tune" GstX264EncPsyTune : Read / Write "speed-preset" GstX264EncPreset : Read / Write "tune" GstX264EncTune : Read / Write
This element encodes raw video into H264 compressed data, also otherwise known as MPEG-4 AVC (Advanced Video Codec).
The "pass" property controls the type of encoding. In case of Constant Bitrate Encoding (actually ABR), the "bitrate" will determine the quality of the encoding. This will similarly be the case if this target bitrate is to obtained in multiple (2 or 3) pass encoding. Alternatively, one may choose to perform Constant Quantizer or Quality encoding, in which case the "quantizer" property controls much of the outcome.
The H264 profile that is eventually used depends on a few settings. If "dct8x8" is enabled, then High profile is used. Otherwise, if "cabac" entropy coding is enabled or "bframes" are allowed, then Main Profile is in effect, and otherwise Baseline profile applies. No profile is imposed by default, which is fine for most software players and settings, but in some cases (e.g. hardware platforms) a more restricted profile/level may be necessary.
If a preset/tuning are specified then these will define the default values and the property defaults will be ignored. After this the option-string property is applied, followed by the user-set properties, fast first pass restrictions and finally the profile restrictions.
1 2 |
gst-launch -v videotestsrc num-buffers=1000 ! x264enc qp-min=18 ! \ avimux ! filesink location=videotestsrc.avi |
1 2 |
gst-launch -v videotestsrc num-buffers=1000 ! x264enc pass=quant ! \ matroskamux ! filesink location=videotestsrc.avi |
1 2 |
gst-launch -v videotestsrc num-buffers=1000 ! x264enc pass=5 quantizer=25 speed-preset=6 profile=1 ! \ qtmux ! filesink location=videotestsrc.mov |
1 2 |
gst-launch -v videotestsrc num-buffers=1000 ! tee name=t ! queue ! xvimagesink \ t. ! queue ! x264enc rc-lookahead=5 ! fakesink |
"aud"
property"aud" gboolean : Read / Write
Use AU (Access Unit) delimiter.
Default value: TRUE
"b-adapt"
property"b-adapt" gboolean : Read / Write
Automatically decide how many B-frames to use.
Default value: TRUE
"b-pyramid"
property"b-pyramid" gboolean : Read / Write
Keep some B-frames as references.
Default value: FALSE
"bframes"
property"bframes" guint : Read / Write
Number of B-frames between I and P.
Allowed values: <= 4
Default value: 0
"bitrate"
property"bitrate" guint : Read / Write
Bitrate in kbit/sec.
Allowed values: [1,102400]
Default value: 2048
"byte-stream"
property"byte-stream" gboolean : Read / Write
Generate byte stream format of NALU.
Default value: FALSE
"cabac"
property"cabac" gboolean : Read / Write
Enable CABAC entropy coding.
Default value: TRUE
"dct8x8"
property"dct8x8" gboolean : Read / Write
Adaptive spatial transform size.
Default value: FALSE
"interlaced"
property"interlaced" gboolean : Read / Write
Interlaced material.
Default value: FALSE
"ip-factor"
property"ip-factor" gfloat : Read / Write
Quantizer factor between I- and P-frames.
Allowed values: [0,2]
Default value: 1.4
"key-int-max"
property"key-int-max" guint : Read / Write
Maximal distance between two key-frames (0 for automatic).
Allowed values: <= G_MAXINT
Default value: 0
"me"
property "me" GstX264EncMe : Read / Write
Integer pixel motion estimation method.
Default value: hex
"multipass-cache-file"
property"multipass-cache-file" gchar* : Read / Write
Filename for multipass cache file.
Default value: "x264.log"
"noise-reduction"
property"noise-reduction" guint : Read / Write
Noise reduction strength.
Allowed values: <= 100000
Default value: 0
"pass"
property "pass" GstX264EncPass : Read / Write
Encoding pass/type.
Default value: Constant Bitrate Encoding
"pb-factor"
property"pb-factor" gfloat : Read / Write
Quantizer factor between P- and B-frames.
Allowed values: [0,2]
Default value: 1.3
"qp-max"
property"qp-max" guint : Read / Write
Maximum quantizer.
Allowed values: [1,51]
Default value: 51
"qp-min"
property"qp-min" guint : Read / Write
Minimum quantizer.
Allowed values: [1,51]
Default value: 10
"qp-step"
property"qp-step" guint : Read / Write
Maximum quantizer difference between frames.
Allowed values: [1,50]
Default value: 4
"quantizer"
property"quantizer" guint : Read / Write
Constant quantizer or quality to apply.
Allowed values: [1,50]
Default value: 21
"ref"
property"ref" guint : Read / Write
Number of reference frames.
Allowed values: [1,12]
Default value: 1
"sps-id"
property"sps-id" guint : Read / Write
SPS and PPS ID number.
Allowed values: <= 31
Default value: 0
"stats-file"
property"stats-file" gchar* : Read / Write
Filename for multipass statistics (deprecated, use multipass-cache-file).
Default value: "x264.log"
"subme"
property"subme" guint : Read / Write
Subpixel motion estimation and partition decision quality: 1=fast, 6=best.
Allowed values: [1,6]
Default value: 1
"threads"
property"threads" guint : Read / Write
Number of threads used by the codec (0 for automatic).
Allowed values: <= 4
Default value: 0
"trellis"
property"trellis" gboolean : Read / Write
Enable trellis searched quantization.
Default value: TRUE
"vbv-buf-capacity"
property"vbv-buf-capacity" guint : Read / Write
Size of the VBV buffer in milliseconds.
Allowed values: <= 10000
Default value: 600
"weightb"
property"weightb" gboolean : Read / Write
Weighted prediction for B-frames.
Default value: FALSE
"intra-refresh"
property"intra-refresh" gboolean : Read / Write
Use Periodic Intra Refresh instead of IDR frames.
Default value: FALSE
"mb-tree"
property"mb-tree" gboolean : Read / Write
Macroblock-Tree ratecontrol.
Default value: TRUE
"rc-lookahead"
property"rc-lookahead" gint : Read / Write
Number of frames for frametype lookahead.
Allowed values: [0,250]
Default value: 40
"sliced-threads"
property"sliced-threads" gboolean : Read / Write
Low latency but lower efficiency threading.
Default value: FALSE
"sync-lookahead"
property"sync-lookahead" gint : Read / Write
Number of buffer frames for threaded lookahead (-1 for automatic).
Allowed values: [G_MAXULONG,250]
Default value: -1
"option-string"
property"option-string" gchar* : Read / Write
String of x264 options (overridden by element properties).
Default value: ""
"profile"
property "profile" GstX264EncProfile : Read / Write
Apply restrictions to meet H.264 Profile constraints. This will override other properties if necessary.
Default value: main
"psy-tune"
property "psy-tune" GstX264EncPsyTune : Read / Write
Preset name for psychovisual tuning options.
Default value: No tuning
"speed-preset"
property "speed-preset" GstX264EncPreset : Read / Write
Preset name for speed/quality tradeoff options (can affect decode compatibility - impose restrictions separately for your target decoder).
Default value: medium