Mercurial > mplayer.hg
comparison DOCS/tech/libavc-options.txt @ 7088:9a0017ee11aa
support for the new ratecontrol code
author | michael |
---|---|
date | Sun, 25 Aug 2002 21:43:22 +0000 |
parents | 2eae7ac0fa8b |
children | a258b9b7669e |
comparison
equal
deleted
inserted
replaced
7087:cf14ac26980d | 7088:9a0017ee11aa |
---|---|
10 1 is not recommended (much larger file, little quality difference (if u are lucky) | 10 1 is not recommended (much larger file, little quality difference (if u are lucky) |
11 and other weird things (if u are less lucky)) | 11 and other weird things (if u are less lucky)) |
12 weird things: msmpeg4, h263 will be very low quality | 12 weird things: msmpeg4, h263 will be very low quality |
13 ratecontrol will be confused -> lower quality | 13 ratecontrol will be confused -> lower quality |
14 some decoders will not be able to decode it | 14 some decoders will not be able to decode it |
15 2 is recommended for normal mpeg4/mpeg1video encoding | 15 2 is recommended for normal mpeg4/mpeg1video encoding (default) |
16 3 is recommended for h263(p)/msmpeg4 (default) | 16 3 is recommended for h263(p)/msmpeg4 |
17 the reason for 3 instead of 2 is that 2 could lead to overflows | 17 the reason for 3 instead of 2 is that 2 could lead to overflows |
18 (this will be fixed for h263(p) by changing the quanizer per MB in | 18 (this will be fixed for h263(p) by changing the quanizer per MB in |
19 the future, but msmpeg4 doesnt support that so it cant be fixed for | 19 the future, but msmpeg4 doesnt support that so it cant be fixed for |
20 that) | 20 that) |
21 | 21 |
24 possible other weird things) | 24 possible other weird things) |
25 lower means better quality but larger files | 25 lower means better quality but larger files |
26 see vqmin | 26 see vqmin |
27 | 27 |
28 vqmax 1-31 (maximum quantizer) for pass1/2 | 28 vqmax 1-31 (maximum quantizer) for pass1/2 |
29 15 default | 29 31 default |
30 10-31 should be a sane range | 30 10-31 should be a sane range |
31 | 31 |
32 vqdiff 1-31 (maximum quantizer difference between I or P frames) for pass1/2 | 32 vqdiff 1-31 (maximum quantizer difference between I or P frames) for pass1/2 |
33 3 default | 33 3 default |
34 | 34 |
35 vmax_b_frames 0-4 (maximum number of B frames between non B frames) | 35 vmax_b_frames 0-4 (maximum number of B frames between non B frames) |
36 0 no b frames (default) | 36 0 no b frames (default) |
37 0-2 is a sane range for mpeg4 | |
37 | 38 |
38 vme 0-5 (motion estimation) | 39 vme 0-5 (motion estimation) |
39 0 none (not recommanded, very lq) | 40 0 none (not recommanded, very lq) |
40 1 full (not recommanded, too slow) | 41 1 full (not recommanded, too slow) |
41 2 log (not recommanded, lq) | 42 2 log (not recommanded, lq) |
58 keyframe but they need more space than non-keyframes so larger numbers here | 59 keyframe but they need more space than non-keyframes so larger numbers here |
59 mean slightly smaller files, but less precise seeking | 60 mean slightly smaller files, but less precise seeking |
60 0 no keyframes | 61 0 no keyframes |
61 >300 is not recommended as the quality might be bad (depends upon | 62 >300 is not recommended as the quality might be bad (depends upon |
62 decoder, encoder and luck) | 63 decoder, encoder and luck) |
64 for strict mpeg1/2/4 compliance this would have to be <=132 | |
63 | 65 |
64 vb_strategy 0-1 for pass 2 | 66 vb_strategy 0-1 for pass 2 |
65 0 allways use the max number of B frames (default) | 67 0 allways use the max number of B frames (default) |
66 1 avoid B frames in high motion scenes (this will cause bitrate | 68 1 avoid B frames in high motion scenes (this will cause bitrate |
67 misprediction) | 69 misprediction) |
79 this is just an approximation, the real difference can be much smaller | 81 this is just an approximation, the real difference can be much smaller |
80 or larger | 82 or larger |
81 1000-100000 is a sane range | 83 1000-100000 is a sane range |
82 8000 is default | 84 8000 is default |
83 | 85 |
84 vb_qfactor (1.0-31.0) for pass1/2 | 86 vrc_maxrate (maximum bitrate in kbit/sec) for pass1/2 |
85 (B-Frame quantizer = IP-Frame quantizer * vb_qfactor) | 87 vrc_minrate (minimum bitrate in kbit/sec) for pass1/2 |
86 2.0 is default | 88 vrc_buf_size (buffer size in kbit) for pass1/2 |
89 this is for stuff like VCD | |
90 VCD: FIXME | |
91 SVCD: ... | |
92 DVD: ... | |
93 Note: vratetol should not be too large during the 2.pass or there might | |
94 be problems if vrc_(min|max)rate is used | |
95 | |
96 vb_qfactor (-31.0-31.0) for pass1/2 | |
97 1.25 is default | |
98 vi_qfactor (-31.0-31.0) for pass1/2 | |
99 0.8 is default | |
100 vb_qoffset (-31.0-31.0) for pass1/2 | |
101 1.25 is default | |
102 vi_qoffset (-31.0-31.0) for pass1/2 | |
103 0.0 is default | |
104 if v{b|i}_qfactor > 0 | |
105 I/B-Frame quantizer = P-Frame quantizer * v{b|i}_qfactor + v{b|i}_qoffset | |
106 else | |
107 do normal ratecontrol (dont lock to next P frame quantizer) and | |
108 set q= -q * v{b|i}_qfactor + v{b|i}_qoffset | |
87 tip: to do constant quantizer encoding with different quantizers for | 109 tip: to do constant quantizer encoding with different quantizers for |
88 I/P and B frames you can use: | 110 I/P and B frames you can use: |
89 vqmin=<ip_quant>:vqmax=<ip_quant>:vb_qfactor=<b_quant/ip_quant> | 111 vqmin=<ip_quant>:vqmax=<ip_quant>:vb_qfactor=<b_quant/ip_quant> |
90 | 112 |
91 vqblur (0.0-1.0) quantizer blur (only for pass1) | 113 vqblur (0.0-1.0) quantizer blur (pass1) |
92 0.0 qblur disabled | 114 0.0 qblur disabled |
93 0.5 is the default | 115 0.5 is the default |
94 1.0 average the quantizer over all previous frames | 116 1.0 average the quantizer over all previous frames |
95 larger values will average the quantizer more over time so that it will | 117 larger values will average the quantizer more over time so that it will |
96 be changed slower | 118 be changed slower |
97 | 119 vqblur (0.0-99.0) quantizer blur (pass2) |
98 vqcomp (0.0-1.0) quantizer compression (for pass1/2) | 120 gaussian blur (gaussian blur cant be done during pass 1 as the future quantizers arent known) |
99 0.0 constant bitrate encoding, so fast motion frames will get as many | 121 0.5 is the default |
100 bits as low motion (high motion scenes look bad) | 122 larger values will average the quantizer more over time so that it will |
101 0.5 (default) | 123 be changed slower |
102 1.0 constant quantizer encoding (low motion scenes look bad) | 124 |
103 | 125 vqcomp quantizer compression (for pass1/2) |
104 vrc_strategy (0,1,2) | 126 depends upon vrc_eq |
105 FIXME (different rate control strategies) | 127 |
128 vrc_eq the main ratecontrol equation (for pass1/2) | |
129 1 constant bitrate | |
130 tex constant quality | |
131 1+(tex/avgTex-1)*qComp approximately the equation of the old ratecontrol code | |
132 tex^qComp with qcomp 0.5 or something like that (default) | |
133 | |
134 infix operators: +,-,*,/,^ | |
135 variables: | |
136 tex texture complexity | |
137 iTex,pTex intra, non intra texture complexity | |
138 avgTex average texture complexity | |
139 avgIITex average intra texture complexity in I frames | |
140 avgPITex average intra texture complexity in P frames | |
141 avgPPTex average non intra texture complexity in P frames | |
142 avgBPTex average non intra texture complexity in B frames | |
143 mv bits used for MVs | |
144 fCode maximum length of MV in log2 scale | |
145 iCount number of intra MBs / number of MBs | |
146 var spatial complexity | |
147 mcVar temporal complexity | |
148 qComp qcomp from the command line | |
149 isI, isP, isB is 1 if picture type is I/P/B else 0 | |
150 Pi,E see ur favorite math book | |
151 | |
152 functions: | |
153 max(a,b),min(a,b) maximum / minimum | |
154 gt(a,b) is 1 if a>b, 0 otherwise | |
155 lt(a,b) is 1 if a<b, 0 otherwise | |
156 eq(a,b) is 1 if a==b,0 otherwise | |
157 sin,cos,tan,sinh,cosh,tanh,exp,log,abs | |
158 | |
159 vrc_override user specified quality for specific parts (ending credits ...) (for pass1/2) | |
160 <start-frame>,<end-frame>,<quality>[/<start-frame>,<end-frame>,<quality>[/...]] | |
161 quality 2..31 -> quantizer | |
162 quality -500..0 -> quality correcture in % | |
163 | |
164 vrc_init_cplx (0-1000) initial complexity for pass1 | |
165 | |
166 vqsquish (0 or 1) for pass1/2 how to keep the quantizer between qmin & qmax | |
167 0 use cliping | |
168 1 use a nice differentiable function (default) | |
106 | 169 |
107 vlelim (-1000-1000) single coefficient elimination threshold for luminance | 170 vlelim (-1000-1000) single coefficient elimination threshold for luminance |
108 0 disabled (default) | 171 0 disabled (default) |
109 -4 (JVT recommendation) | 172 -4 (JVT recommendation) |
110 negative values will allso consider the dc coefficient | 173 negative values will allso consider the dc coefficient |
161 Q: Can I use -pass 1 & -pass 2 with vmax_b_frames>0 ? | 224 Q: Can I use -pass 1 & -pass 2 with vmax_b_frames>0 ? |
162 A: -pass x uses the divx4 twopass-encoding codem which is incompatible | 225 A: -pass x uses the divx4 twopass-encoding codem which is incompatible |
163 with the libavcodec encode. | 226 with the libavcodec encode. |
164 If you want to fix it read DOCS/tech/patches.txt and send a patch. | 227 If you want to fix it read DOCS/tech/patches.txt and send a patch. |
165 Q: What provides better error recovery while keeping the filesize low? | 228 Q: What provides better error recovery while keeping the filesize low? |
166 Should I increase data partitioning or the number of video packets? | 229 Should I use data partitioning or increase the number of video packets? |
167 A: Data partitioning is better in this case. | 230 A: Data partitioning is better in this case. |
168 | 231 |
169 Glossary: | 232 Glossary: |
170 MB Macroblock (16x16 luminance and 8x8 chrominance samples) | 233 MB Macroblock (16x16 luminance and 8x8 chrominance samples) |
171 MV Motion vector | 234 MV Motion vector |
172 ME Motion estimation | 235 ME Motion estimation |
173 MC Motion compensation | 236 MC Motion compensation |
237 RC Rate control | |
238 DCT Discrete Cosine Transform | |
239 IDCT Inverse Discrete Cosine Transform | |
174 JVT Joint Video Team Standard -- http://www.itu.int/ITU-T/news/jvtpro.html | 240 JVT Joint Video Team Standard -- http://www.itu.int/ITU-T/news/jvtpro.html |
175 | 241 |
176 Examples: | 242 Examples: |
177 mencoder foobar.avi -lavcopts vcodec=mpeg4:vhq:keyint=300:vqscale=2 -o new-foobar.avi | 243 mencoder foobar.avi -lavcopts vcodec=mpeg4:vhq:keyint=300:vqscale=2 -o new-foobar.avi |
178 mplayer foobar.avi -lavdopts bug=1 | 244 mplayer foobar.avi -lavdopts bug=1 |