defined quality based encoding, and remove strict-rc option
because it's not needed ( thou maybe someone needs vbr-transcoding
with some hint of bitrate without quality-based encoding ? )
Should fix transcoding bitrate bug and close ticket #1463
ENC_VT_LONGTEXT, true );
add_bool( ENC_CFG_PREFIX "pre-me", 0, NULL, ENC_PRE_ME_TEXT,
ENC_PRE_ME_LONGTEXT, true );
ENC_VT_LONGTEXT, true );
add_bool( ENC_CFG_PREFIX "pre-me", 0, NULL, ENC_PRE_ME_TEXT,
ENC_PRE_ME_LONGTEXT, true );
- add_bool( ENC_CFG_PREFIX "strict-rc", 0, NULL, ENC_RC_STRICT_TEXT,
- ENC_RC_STRICT_LONGTEXT, true );
add_integer( ENC_CFG_PREFIX "rc-buffer-size", 224*1024*8, NULL,
ENC_RC_BUF_TEXT, ENC_RC_BUF_LONGTEXT, true );
add_float( ENC_CFG_PREFIX "rc-buffer-aggressivity", 1.0, NULL,
add_integer( ENC_CFG_PREFIX "rc-buffer-size", 224*1024*8, NULL,
ENC_RC_BUF_TEXT, ENC_RC_BUF_LONGTEXT, true );
add_float( ENC_CFG_PREFIX "rc-buffer-aggressivity", 1.0, NULL,
#define ENC_PRE_ME_LONGTEXT N_( "Enable the pre-motion " \
"estimation algorithm.")
#define ENC_PRE_ME_LONGTEXT N_( "Enable the pre-motion " \
"estimation algorithm.")
-#define ENC_RC_STRICT_TEXT N_( "Strict rate control" )
-#define ENC_RC_STRICT_LONGTEXT N_( "Enable the strict rate " \
- "control algorithm." )
-
#define ENC_RC_BUF_TEXT N_( "Rate control buffer size" )
#define ENC_RC_BUF_LONGTEXT N_( "Rate control " \
"buffer size (in kbytes). A bigger buffer will allow for better rate " \
#define ENC_RC_BUF_TEXT N_( "Rate control buffer size" )
#define ENC_RC_BUF_LONGTEXT N_( "Rate control " \
"buffer size (in kbytes). A bigger buffer will allow for better rate " \
int i_qmin;
int i_qmax;
int i_hq;
int i_qmin;
int i_qmax;
int i_hq;
int i_rc_buffer_size;
float f_rc_buffer_aggressivity;
bool b_pre_me;
int i_rc_buffer_size;
float f_rc_buffer_aggressivity;
bool b_pre_me;
};
static const char *const ppsz_enc_options[] = {
};
static const char *const ppsz_enc_options[] = {
- "keyint", "bframes", "vt", "qmin", "qmax", "hq", "strict-rc",
+ "keyint", "bframes", "vt", "qmin", "qmax", "hq",
"rc-buffer-size", "rc-buffer-aggressivity", "pre-me", "hurry-up",
"interlace", "i-quant-factor", "noise-reduction", "mpeg4-matrix",
"trellis", "qscale", "strict", "lumi-masking", "dark-masking",
"rc-buffer-size", "rc-buffer-aggressivity", "pre-me", "hurry-up",
"interlace", "i-quant-factor", "noise-reduction", "mpeg4-matrix",
"trellis", "qscale", "strict", "lumi-masking", "dark-masking",
p_sys->i_noise_reduction = 1;
}
p_sys->i_noise_reduction = 1;
}
- var_Get( p_enc, ENC_CFG_PREFIX "strict-rc", &val );
- p_sys->b_strict_rc = val.b_bool;
var_Get( p_enc, ENC_CFG_PREFIX "rc-buffer-size", &val );
p_sys->i_rc_buffer_size = val.i_int;
var_Get( p_enc, ENC_CFG_PREFIX "rc-buffer-aggressivity", &val );
var_Get( p_enc, ENC_CFG_PREFIX "rc-buffer-size", &val );
p_sys->i_rc_buffer_size = val.i_int;
var_Get( p_enc, ENC_CFG_PREFIX "rc-buffer-aggressivity", &val );
p_enc->fmt_in.i_codec = GetVlcChroma( p_context->pix_fmt );
}
p_enc->fmt_in.i_codec = GetVlcChroma( p_context->pix_fmt );
}
- if ( p_sys->b_strict_rc )
- {
- p_context->rc_qsquish = 1.0;
- p_context->rc_max_rate = p_enc->fmt_out.i_bitrate;
- p_context->rc_min_rate = p_enc->fmt_out.i_bitrate;
- p_context->rc_buffer_size = p_sys->i_rc_buffer_size;
- /* This is from ffmpeg's ffmpeg.c : */
- p_context->rc_initial_buffer_occupancy
- = p_sys->i_rc_buffer_size * 3/4;
- p_context->rc_buffer_aggressivity = p_sys->f_rc_buffer_aggressivity;
- }
if ( p_sys->f_i_quant_factor != 0.0 )
p_context->i_quant_factor = p_sys->f_i_quant_factor;
if ( p_sys->f_i_quant_factor != 0.0 )
p_context->i_quant_factor = p_sys->f_i_quant_factor;
{
p_context->flags |= CODEC_FLAG_QSCALE;
p_context->global_quality = p_sys->i_quality;
{
p_context->flags |= CODEC_FLAG_QSCALE;
p_context->global_quality = p_sys->i_quality;
+ }
+ else
+ {
+ p_context->rc_qsquish = 1.0;
+ p_context->rc_max_rate = p_enc->fmt_out.i_bitrate;
+ p_context->rc_min_rate = p_enc->fmt_out.i_bitrate;
+ p_context->rc_buffer_size = p_sys->i_rc_buffer_size;
+ /* This is from ffmpeg's ffmpeg.c : */
+ p_context->rc_initial_buffer_occupancy
+ = p_sys->i_rc_buffer_size * 3/4;
+ p_context->rc_buffer_aggressivity = p_sys->f_rc_buffer_aggressivity;
}
}
else if( p_enc->fmt_in.i_cat == AUDIO_ES )
}
}
else if( p_enc->fmt_in.i_cat == AUDIO_ES )
if ( p_enc->fmt_out.i_codec == VLC_FOURCC('m','p','4','a') )
{
/* XXX: FAAC does resample only when setting the INPUT samplerate
if ( p_enc->fmt_out.i_codec == VLC_FOURCC('m','p','4','a') )
{
/* XXX: FAAC does resample only when setting the INPUT samplerate
- * to the desired value (-R option of the faac frontend) */
- p_enc->fmt_in.audio.i_rate = p_context->sample_rate;
+ * to the desired value (-R option of the faac frontend)
+ p_enc->fmt_in.audio.i_rate = p_context->sample_rate;*/
#if LIBAVCODEC_VERSION_INT >= ((51<<16)+(40<<8)+4)
/* Ignore FF_PROFILE_UNKNOWN */
if( p_sys->i_aac_profile >= FF_PROFILE_AAC_MAIN )
#if LIBAVCODEC_VERSION_INT >= ((51<<16)+(40<<8)+4)
/* Ignore FF_PROFILE_UNKNOWN */
if( p_sys->i_aac_profile >= FF_PROFILE_AAC_MAIN )