mirror of https://github.com/mpv-player/mpv
better default parameter,added counterpart option, better names for few options, 3-pass support and improved documentation.
patch by Loren Merritt git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13497 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
189a46b6a5
commit
ab6b2a7c5d
|
@ -6770,20 +6770,13 @@ Sets the bitrate to be used in kbits/\:second (default: off).
|
||||||
This is required if you want a CBR (constant bitrate) encode.
|
This is required if you want a CBR (constant bitrate) encode.
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
.B iframe=<value>
|
.B keyint=<value>
|
||||||
Sets maximum interval between I frames.
|
Sets maximum interval between I frames.
|
||||||
Larger values save bits, thus improve quality, at the cost of seeking
|
Larger values save bits, thus improve quality, at the cost of seeking
|
||||||
precision (default: 60).
|
precision (default: 250).
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
.B frameref=<1\-15>
|
.B idrint=<value>
|
||||||
Number of previous frames used as predictors in a P frame (default: 1).
|
|
||||||
This is effective in Anime, but seems to make little difference in
|
|
||||||
live-action source material.
|
|
||||||
Some decoders are unable to deal with large frameref values.
|
|
||||||
.
|
|
||||||
.TP
|
|
||||||
.B idrframe=<value>
|
|
||||||
Each <value> I-Frames are IDR-Frames (default: 2).
|
Each <value> I-Frames are IDR-Frames (default: 2).
|
||||||
In H.264, I-Frames do not necessarily bound a closed GOP because it is
|
In H.264, I-Frames do not necessarily bound a closed GOP because it is
|
||||||
allowable for a P-frame to be predicted from more frames than just the one
|
allowable for a P-frame to be predicted from more frames than just the one
|
||||||
|
@ -6793,11 +6786,18 @@ IDR-Frames restrict subsequent P-frames from referring to any frame
|
||||||
prior to the IDR-Frame.
|
prior to the IDR-Frame.
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
.B bframe=<value>
|
.B frameref=<1\-15>
|
||||||
number of B-Frames between I- and P-Frames (default: 0)
|
Number of previous frames used as predictors in a P frame (default: 1).
|
||||||
|
This is effective in Anime, but seems to make little difference in
|
||||||
|
live-action source material.
|
||||||
|
Some decoders are unable to deal with large frameref values.
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
.B deblock=<0|1>
|
.B bframes=<0\-16>
|
||||||
|
number of consecutive B-Frames between I- and P-Frames (default: 0)
|
||||||
|
.
|
||||||
|
.TP
|
||||||
|
.B deblock | nodeblock
|
||||||
Use deblocking filter (default: on).
|
Use deblocking filter (default: on).
|
||||||
As it takes very little time compared to its quality gain, it's not
|
As it takes very little time compared to its quality gain, it's not
|
||||||
recommend to disable it.
|
recommend to disable it.
|
||||||
|
@ -6824,10 +6824,10 @@ Beta parameter of deblocking filter (default: 0).
|
||||||
Affects the maximum allowed gradient within two adjacent blocks.
|
Affects the maximum allowed gradient within two adjacent blocks.
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
.B cabac\ \ \
|
.B cabac | nocabac
|
||||||
Use CABAC (Context-Adaptive Binary Arithmetic Coding).
|
Use CABAC (Context-Adaptive Binary Arithmetic Coding) (default: on).
|
||||||
Slows down encoding but should save 10-15% of the bits.
|
Slightly slows down encoding and decoding, but should save 10-15% bitrate.
|
||||||
Unless you are looking for speed, you should activate it.
|
Unless you are looking for speed, you should not disable it.
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
.B cabacidc=<value>
|
.B cabacidc=<value>
|
||||||
|
@ -6847,7 +6847,7 @@ directly affect distortion.
|
||||||
.REss
|
.REss
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
.B qp_constant=<2\-51>
|
.B qp_constant=<1\-51>
|
||||||
This selects the quantizer to use.
|
This selects the quantizer to use.
|
||||||
20\-40 is a useful range (default: 26).
|
20\-40 is a useful range (default: 26).
|
||||||
Lower values result in better fidelity, but higher bitrates.
|
Lower values result in better fidelity, but higher bitrates.
|
||||||
|
@ -6858,11 +6858,11 @@ is about a factor of 10.
|
||||||
Useful quantizers in H.264 tend to be very large compared to MPEG[124].
|
Useful quantizers in H.264 tend to be very large compared to MPEG[124].
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
.B qp_min=<2\-51> (CBR only)
|
.B qp_min=<1\-51> (CBR or 2 pass)
|
||||||
Minimum quantizer, 15\-35 seems to be a useful range (default: 10).
|
Minimum quantizer, 15\-35 seems to be a useful range (default: 10).
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
.B qp_max=<2\-51> (CBR only)
|
.B qp_max=<1\-51> (CBR or 2 pass)
|
||||||
maximum quantizer (default: 51)
|
maximum quantizer (default: 51)
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
|
@ -6912,7 +6912,7 @@ Lower values allow the quantizer value to jump around more,
|
||||||
higher values force it to vary more smoothly.
|
higher values force it to vary more smoothly.
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
.B fullinter
|
.B fullinter | nofullinter
|
||||||
Use all available interframe macroblock types (i16x16, i4x4, p16x16-4x4)
|
Use all available interframe macroblock types (i16x16, i4x4, p16x16-4x4)
|
||||||
The idea is to find the type and size that best describe a certain area
|
The idea is to find the type and size that best describe a certain area
|
||||||
of the picture, i.e.\& very effective for Anime, which usually contains
|
of the picture, i.e.\& very effective for Anime, which usually contains
|
||||||
|
@ -6921,22 +6921,6 @@ Depending on the source material, it can improve or degrade quality, use
|
||||||
it with care.
|
it with care.
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
.B log=<-1\-3>
|
|
||||||
Adjust the amount of logging info printed to the screen.
|
|
||||||
.RSs
|
|
||||||
-1: none
|
|
||||||
.br
|
|
||||||
0: Print errors only.
|
|
||||||
.br
|
|
||||||
1: warnings
|
|
||||||
.br
|
|
||||||
2: PSNR, encoding times, and other analysis stats when the encode finishes
|
|
||||||
(default)
|
|
||||||
.br
|
|
||||||
3: PSNR, QP, frametype, size, and other stats for every frame
|
|
||||||
.REss
|
|
||||||
.
|
|
||||||
.TP
|
|
||||||
.B subq=<0\-5>
|
.B subq=<0\-5>
|
||||||
Adjust subpel refinement quality.
|
Adjust subpel refinement quality.
|
||||||
This parameter controls quality versus speed tradeoffs involved in the motion
|
This parameter controls quality versus speed tradeoffs involved in the motion
|
||||||
|
@ -6957,8 +6941,24 @@ It can improve quality significantly.
|
||||||
.REss
|
.REss
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
.B psnr\ \ \
|
.B log=<-1\-3>
|
||||||
Print signal-to-noise ratio statistics.
|
Adjust the amount of logging info printed to the screen.
|
||||||
|
.RSs
|
||||||
|
-1: none
|
||||||
|
.br
|
||||||
|
0: Print errors only.
|
||||||
|
.br
|
||||||
|
1: warnings
|
||||||
|
.br
|
||||||
|
2: PSNR, encoding times, and other analysis stats when the encode finishes
|
||||||
|
(default)
|
||||||
|
.br
|
||||||
|
3: PSNR, QP, frametype, size, and other stats for every frame
|
||||||
|
.REss
|
||||||
|
.
|
||||||
|
.TP
|
||||||
|
.B psnr | nopsnr
|
||||||
|
Print signal-to-noise ratio statistics (default: off).
|
||||||
.
|
.
|
||||||
.
|
.
|
||||||
.\" --------------------------------------------------------------------------
|
.\" --------------------------------------------------------------------------
|
||||||
|
|
|
@ -61,13 +61,13 @@ extern char* passtmpfile;
|
||||||
static int bitrate = -1;
|
static int bitrate = -1;
|
||||||
static int qp_constant = 26;
|
static int qp_constant = 26;
|
||||||
static int frame_ref = 1;
|
static int frame_ref = 1;
|
||||||
static int iframe = 60;
|
static int iframe = 250;
|
||||||
static int idrframe = 2;
|
static int idrframe = 2;
|
||||||
static int bframe = 0;
|
static int bframe = 0;
|
||||||
static int deblock = 1;
|
static int deblock = 1;
|
||||||
static int deblockalpha = 0;
|
static int deblockalpha = 0;
|
||||||
static int deblockbeta = 0;
|
static int deblockbeta = 0;
|
||||||
static int cabac = 0;
|
static int cabac = 1;
|
||||||
static int cabacidc = -1;
|
static int cabacidc = -1;
|
||||||
static int fullinter = 0;
|
static int fullinter = 0;
|
||||||
static float ip_factor = 2.0;
|
static float ip_factor = 2.0;
|
||||||
|
@ -89,16 +89,19 @@ static int log_level = 2;
|
||||||
m_option_t x264encopts_conf[] = {
|
m_option_t x264encopts_conf[] = {
|
||||||
{"bitrate", &bitrate, CONF_TYPE_INT, CONF_RANGE, 0, 24000000, NULL},
|
{"bitrate", &bitrate, CONF_TYPE_INT, CONF_RANGE, 0, 24000000, NULL},
|
||||||
{"qp_constant", &qp_constant, CONF_TYPE_INT, CONF_RANGE, 1, 51, NULL},
|
{"qp_constant", &qp_constant, CONF_TYPE_INT, CONF_RANGE, 1, 51, NULL},
|
||||||
{"frameref", &frame_ref, CONF_TYPE_INT, CONF_RANGE, 1, 100, NULL},
|
{"frameref", &frame_ref, CONF_TYPE_INT, CONF_RANGE, 1, 15, NULL},
|
||||||
{"iframe", &iframe, CONF_TYPE_INT, CONF_RANGE, 1, 24000000, NULL},
|
{"keyint", &iframe, CONF_TYPE_INT, CONF_RANGE, 1, 24000000, NULL},
|
||||||
{"idrframe", &idrframe, CONF_TYPE_INT, CONF_RANGE, 1, 24000000, NULL},
|
{"idrint", &idrframe, CONF_TYPE_INT, CONF_RANGE, 1, 24000000, NULL},
|
||||||
{"bframe", &bframe, CONF_TYPE_INT, CONF_RANGE, 0, 10, NULL},
|
{"bframes", &bframe, CONF_TYPE_INT, CONF_RANGE, 0, 16, NULL},
|
||||||
{"deblock", &deblock, CONF_TYPE_INT, CONF_RANGE, 0, 1, NULL},
|
{"deblock", &deblock, CONF_TYPE_FLAG, 0, 0, 1, NULL},
|
||||||
|
{"nodeblock", &deblock, CONF_TYPE_FLAG, 0, 1, 0, NULL},
|
||||||
{"deblockalpha", &deblockalpha, CONF_TYPE_INT, CONF_RANGE, -6, 6, NULL},
|
{"deblockalpha", &deblockalpha, CONF_TYPE_INT, CONF_RANGE, -6, 6, NULL},
|
||||||
{"deblockbeta", &deblockbeta, CONF_TYPE_INT, CONF_RANGE, -6, 6, NULL},
|
{"deblockbeta", &deblockbeta, CONF_TYPE_INT, CONF_RANGE, -6, 6, NULL},
|
||||||
{"cabac", &cabac, CONF_TYPE_FLAG, 0, 0, 1, NULL},
|
{"cabac", &cabac, CONF_TYPE_FLAG, 0, 0, 1, NULL},
|
||||||
|
{"nocabac", &cabac, CONF_TYPE_FLAG, 0, 1, 0, NULL},
|
||||||
{"cabacidc", &cabacidc, CONF_TYPE_INT, CONF_RANGE, -1, 2, NULL},
|
{"cabacidc", &cabacidc, CONF_TYPE_INT, CONF_RANGE, -1, 2, NULL},
|
||||||
{"fullinter", &fullinter, CONF_TYPE_FLAG, 0, 0, 1, NULL},
|
{"fullinter", &fullinter, CONF_TYPE_FLAG, 0, 0, 1, NULL},
|
||||||
|
{"nofullinter", &fullinter, CONF_TYPE_FLAG, 0, 1, 0, NULL},
|
||||||
{"ip_factor", &ip_factor, CONF_TYPE_FLOAT, CONF_RANGE, -10.0, 10.0, NULL},
|
{"ip_factor", &ip_factor, CONF_TYPE_FLOAT, CONF_RANGE, -10.0, 10.0, NULL},
|
||||||
{"pb_factor", &pb_factor, CONF_TYPE_FLOAT, CONF_RANGE, -10.0, 10.0, NULL},
|
{"pb_factor", &pb_factor, CONF_TYPE_FLOAT, CONF_RANGE, -10.0, 10.0, NULL},
|
||||||
{"rc_buffer_size", &rc_buffer_size, CONF_TYPE_INT, CONF_RANGE, 0, 24000000, NULL},
|
{"rc_buffer_size", &rc_buffer_size, CONF_TYPE_INT, CONF_RANGE, 0, 24000000, NULL},
|
||||||
|
@ -113,6 +116,7 @@ m_option_t x264encopts_conf[] = {
|
||||||
{"qblur", &qblur, CONF_TYPE_FLOAT, CONF_RANGE, 0, 99, NULL},
|
{"qblur", &qblur, CONF_TYPE_FLOAT, CONF_RANGE, 0, 99, NULL},
|
||||||
{"subq", &subq, CONF_TYPE_INT, CONF_RANGE, 0, 5, NULL},
|
{"subq", &subq, CONF_TYPE_INT, CONF_RANGE, 0, 5, NULL},
|
||||||
{"psnr", &psnr, CONF_TYPE_FLAG, 0, 0, 1, NULL},
|
{"psnr", &psnr, CONF_TYPE_FLAG, 0, 0, 1, NULL},
|
||||||
|
{"nopsnr", &psnr, CONF_TYPE_FLAG, 0, 1, 0, NULL},
|
||||||
{"log", &log_level, CONF_TYPE_INT, CONF_RANGE, -1, 3, NULL},
|
{"log", &log_level, CONF_TYPE_INT, CONF_RANGE, -1, 3, NULL},
|
||||||
{NULL, NULL, 0, 0, 0, 0, NULL}
|
{NULL, NULL, 0, 0, 0, 0, NULL}
|
||||||
};
|
};
|
||||||
|
@ -168,6 +172,10 @@ static int config(struct vf_instance_s* vf, int width, int height, int d_width,
|
||||||
mod->param.rc.b_stat_write = 0;
|
mod->param.rc.b_stat_write = 0;
|
||||||
mod->param.rc.b_stat_read = 1;
|
mod->param.rc.b_stat_read = 1;
|
||||||
break;
|
break;
|
||||||
|
case 3:
|
||||||
|
mod->param.rc.b_stat_write = 1;
|
||||||
|
mod->param.rc.b_stat_read = 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if(bitrate > 0) {
|
if(bitrate > 0) {
|
||||||
if(rc_buffer_size <= 0)
|
if(rc_buffer_size <= 0)
|
||||||
|
|
Loading…
Reference in New Issue