<ARG>
<NAME>GstX264Enc::pass</NAME>
-<TYPE>guint</TYPE>
-<RANGE><= 3</RANGE>
+<TYPE>GstX264EncPass</TYPE>
+<RANGE></RANGE>
<FLAGS>rw</FLAGS>
-<NICK>Pass</NICK>
-<BLURB>Pass of multipass encoding (0=single pass; 1=first pass, 2=middle pass, 3=last pass).</BLURB>
-<DEFAULT>0</DEFAULT>
+<NICK>Encoding pass/type</NICK>
+<BLURB>Encoding pass/type.</BLURB>
+<DEFAULT>Constant Bitrate Encoding</DEFAULT>
</ARG>
<ARG>
<ARG>
<NAME>GstX264Enc::threads</NAME>
<TYPE>guint</TYPE>
-<RANGE>[1,4]</RANGE>
+<RANGE><= 4</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Threads</NICK>
-<BLURB>Number of threads used by the codec.</BLURB>
+<BLURB>Number of threads used by the codec (0 for automatic).</BLURB>
<DEFAULT>1</DEFAULT>
</ARG>
<DEFAULT>FALSE</DEFAULT>
</ARG>
+<ARG>
+<NAME>GstX264Enc::b-adapt</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>B-Adapt</NICK>
+<BLURB>Automatically decide how many B-frames to use.</BLURB>
+<DEFAULT>TRUE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstX264Enc::interlaced</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Interlaced</NICK>
+<BLURB>Interlaced material.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstX264Enc::ip-factor</NAME>
+<TYPE>gfloat</TYPE>
+<RANGE>[0,2]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>IP-Factor</NICK>
+<BLURB>Quantizer factor between I- and P-frames.</BLURB>
+<DEFAULT>1.4</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstX264Enc::noise-reduction</NAME>
+<TYPE>guint</TYPE>
+<RANGE><= 100000</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Noise Reducation</NICK>
+<BLURB>Noise reduction strength.</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstX264Enc::pb-factor</NAME>
+<TYPE>gfloat</TYPE>
+<RANGE>[0,2]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>PB-Factor</NICK>
+<BLURB>Quantizer factor between P- and B-frames.</BLURB>
+<DEFAULT>1.3</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstX264Enc::qp-max</NAME>
+<TYPE>guint</TYPE>
+<RANGE>[1,51]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Maximum Quantizer</NICK>
+<BLURB>Maximum quantizer.</BLURB>
+<DEFAULT>51</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstX264Enc::qp-min</NAME>
+<TYPE>guint</TYPE>
+<RANGE>[1,51]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Minimum Quantizer</NICK>
+<BLURB>Minimum quantizer.</BLURB>
+<DEFAULT>10</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstX264Enc::qp-step</NAME>
+<TYPE>guint</TYPE>
+<RANGE>[1,50]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Maximum Quantizer Difference</NICK>
+<BLURB>Maximum quantizer difference between frames.</BLURB>
+<DEFAULT>4</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstX264Enc::quantizer</NAME>
+<TYPE>guint</TYPE>
+<RANGE>[1,50]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Constant Quantizer</NICK>
+<BLURB>Constant quantizer or quality to apply.</BLURB>
+<DEFAULT>21</DEFAULT>
+</ARG>
+
<ARG>
<NAME>GstNasSink::host</NAME>
<TYPE>gchar*</TYPE>
* SECTION:element-x264enc
* @see_also: faac
*
- * This element encodes raw video into a H264 compressed data,
+ * This element encodes raw video into H264 compressed data,
* also otherwise known as MPEG-4 AVC (Advanced Video Codec).
*
- * The #GstX264Enc:pass-new property controls the type of encoding. In case of Constant
+ * The #GstX264Enc:pass property controls the type of encoding. In case of Constant
* Bitrate Encoding (actually ABR), the #GstX264Enc: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.
* AVI container, while ensuring a sane minimum quantization factor to avoid
* some (excessive) waste.
* |[
- * gst-launch -v videotestsrc num-buffers=1000 ! x264enc pass-new=quant ! \
+ * gst-launch -v videotestsrc num-buffers=1000 ! x264enc pass=quant ! \
* matroskamux ! filesink location=videotestsrc.avi
* ]| This example pipeline will encode a test video source to H264 using fixed
* quantization, and muxes it in a Matroska container.
ARG_0,
ARG_THREADS,
ARG_PASS,
- ARG_PASS_NEW,
ARG_QUANTIZER,
ARG_STATS_FILE,
ARG_BYTE_STREAM,
#define ARG_THREADS_DEFAULT 1
#define ARG_PASS_DEFAULT 0
-#define ARG_PASS_NEW_DEFAULT 0
#define ARG_QUANTIZER_DEFAULT 21
#define ARG_STATS_FILE_DEFAULT "x264.log"
#define ARG_BYTE_STREAM_DEFAULT FALSE
enum
{
GST_X264_ENC_PASS_CBR = 0,
- GST_X264_ENC_PASS_QUANT,
+ GST_X264_ENC_PASS_QUANT = 0x04,
GST_X264_ENC_PASS_QUAL,
GST_X264_ENC_PASS_PASS1 = 0x11,
GST_X264_ENC_PASS_PASS2,
g_param_spec_uint ("threads", "Threads",
"Number of threads used by the codec (0 for automatic)",
0, 4, ARG_THREADS_DEFAULT, G_PARAM_READWRITE));
- g_object_class_install_property (gobject_class, ARG_PASS_NEW,
- g_param_spec_enum ("pass-new", "Encoding pass/type",
- "Encoding pass/type", GST_X264_ENC_PASS_TYPE,
- ARG_PASS_NEW_DEFAULT, G_PARAM_READWRITE));
- /* FIXME 0.11: remove pass property and use the one above */
g_object_class_install_property (gobject_class, ARG_PASS,
- g_param_spec_uint ("pass", "Pass",
- "Pass of multipass encoding (0=single pass; 1=first pass, 2=middle pass, 3=last pass)",
- 0, 3, ARG_PASS_DEFAULT, G_PARAM_READWRITE));
+ g_param_spec_enum ("pass", "Encoding pass/type",
+ "Encoding pass/type", GST_X264_ENC_PASS_TYPE,
+ ARG_PASS_DEFAULT, G_PARAM_READWRITE));
g_object_class_install_property (gobject_class, ARG_QUANTIZER,
g_param_spec_uint ("quantizer", "Constant Quantizer",
"Constant quantizer or quality to apply",
/* properties */
encoder->threads = ARG_THREADS_DEFAULT;
- encoder->pass = ARG_PASS_NEW_DEFAULT;
+ encoder->pass = ARG_PASS_DEFAULT;
encoder->quantizer = ARG_QUANTIZER_DEFAULT;
encoder->stats_file = g_strdup (ARG_STATS_FILE_DEFAULT);
encoder->byte_stream = ARG_BYTE_STREAM_DEFAULT;
encoder->x264param.rc.b_stat_read = 0;
encoder->x264param.rc.b_stat_write = 1;
break;
- /* FIXME 0.11: settings for these passes must be swapped; 2: ro, 3: r/w */
case 2:
encoder->x264param.rc.b_stat_read = 1;
- encoder->x264param.rc.b_stat_write = 1;
+ encoder->x264param.rc.b_stat_write = 0;
break;
case 3:
encoder->x264param.rc.b_stat_read = 1;
- encoder->x264param.rc.b_stat_write = 0;
+ encoder->x264param.rc.b_stat_write = 1;
break;
}
encoder->x264param.rc.psz_stat_in = encoder->stats_file;
encoder->threads = g_value_get_uint (value);
break;
case ARG_PASS:
- {
- guint pass = g_value_get_uint (value);
-
- if (pass)
- encoder->pass = GST_X264_ENC_PASS_PASS1 + (pass - 1);
- else
- encoder->pass = GST_X264_ENC_PASS_CBR;
- break;
- }
- case ARG_PASS_NEW:
encoder->pass = g_value_get_enum (value);
break;
case ARG_QUANTIZER:
g_value_set_uint (value, encoder->threads);
break;
case ARG_PASS:
- if (encoder->pass < GST_X264_ENC_PASS_PASS1)
- g_value_set_uint (value, 0);
- else
- g_value_set_uint (value, encoder->pass - GST_X264_ENC_PASS_PASS1 + 1);
- break;
- case ARG_PASS_NEW:
g_value_set_enum (value, encoder->pass);
break;
case ARG_QUANTIZER: