Mercurial > mplayer.hg
annotate DOCS/tech/libavc-options.txt @ 7312:1d0a877851d8
removed obsolete cyuvxa, completed qpeg, added some extra supported output formats to wmv8, removed bgr32 from dv as its buggy
author | alex |
---|---|
date | Sat, 07 Sep 2002 22:08:42 +0000 |
parents | b21e38a4fbec |
children | 4948c6c53bd7 |
rev | line source |
---|---|
6270
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
1 Description of what all those libavcodec options do ... |
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
2 WARNING: I am no encoding expert so the recommendations might be bad ... |
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
3 if you find any errors, missing stuff, ... send a patch or cvs commit if you |
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
4 have an cvs account :) |
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
5 |
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
6 lavcopts: (encoder options) |
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
7 --------------------------- |
6108 | 8 |
6700 | 9 vqmin 2-31 (minimum quantizer) for pass1/2 |
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)) | |
12 weird things: msmpeg4, h263 will be very low quality | |
13 ratecontrol will be confused -> lower quality | |
14 some decoders will not be able to decode it | |
7088 | 15 2 is recommended for normal mpeg4/mpeg1video encoding (default) |
16 3 is recommended for h263(p)/msmpeg4 | |
6270
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
17 the reason for 3 instead of 2 is that 2 could lead to overflows |
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
18 (this will be fixed for h263(p) by changing the quanizer per MB in |
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
19 the future, but msmpeg4 doesnt support that so it cant be fixed for |
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
20 that) |
6108 | 21 |
6270
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
22 vqscale 1-31 quantizer for constant quantizer / constant quality encoding |
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
23 1 is not recommended (much larger file, little quality difference and |
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
24 possible other weird things) |
6108 | 25 lower means better quality but larger files |
26 see vqmin | |
27 | |
28 vqmax 1-31 (maximum quantizer) for pass1/2 | |
7088 | 29 31 default |
6108 | 30 10-31 should be a sane range |
31 | |
32 vqdiff 1-31 (maximum quantizer difference between I or P frames) for pass1/2 | |
33 3 default | |
34 | |
6270
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
35 vmax_b_frames 0-4 (maximum number of B frames between non B frames) |
6108 | 36 0 no b frames (default) |
7088 | 37 0-2 is a sane range for mpeg4 |
6108 | 38 |
39 vme 0-5 (motion estimation) | |
40 0 none (not recommanded, very lq) | |
41 1 full (not recommanded, too slow) | |
42 2 log (not recommanded, lq) | |
43 3 phods (not recommanded, lq) | |
44 4 EPZS (default) | |
45 5 X1 | |
46 | |
47 vhq (high quality mode) | |
6270
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
48 encode each MB as in all modes and choose the best (this is slow but |
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
49 better filesize/quality) |
6108 | 50 disabled by default |
51 | |
52 v4mv | |
53 allow 4 MV per MB (little difference in filesize/quality) | |
54 disabled by default | |
6270
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
55 cannot be used with B frames (should now work in lq mode) |
6108 | 56 |
57 keyint 0-300 (maximum interval between keyframes) | |
6270
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
58 keyframes are needed for seeking as seeking is only possible to a |
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
59 keyframe but they need more space than non-keyframes so larger numbers here |
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
60 mean slightly smaller files, but less precise seeking |
6108 | 61 0 no keyframes |
6270
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
62 >300 is not recommended as the quality might be bad (depends upon |
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
63 decoder, encoder and luck) |
7088 | 64 for strict mpeg1/2/4 compliance this would have to be <=132 |
6108 | 65 |
66 vb_strategy 0-1 for pass 2 | |
6270
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
67 0 allways use the max number of B frames (default) |
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
68 1 avoid B frames in high motion scenes (this will cause bitrate |
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
69 misprediction) |
6108 | 70 |
71 vpass | |
72 1 first pass | |
73 2 second pass | |
6270
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
74 (only need to specify if two-pass encoding is used) |
6108 | 75 |
6270
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
76 vbitrate (kbits per second) for pass1/2 |
6108 | 77 800 is default |
6270
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
78 (if value is bigger then 16000 it is interpreted as bit not kbit!) |
6108 | 79 |
80 vratetol (filesize tolerance in kbit) for pass1/2 | |
6270
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
81 this is just an approximation, the real difference can be much smaller |
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
82 or larger |
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
83 1000-100000 is a sane range |
6108 | 84 8000 is default |
85 | |
7088 | 86 vrc_maxrate (maximum bitrate in kbit/sec) for pass1/2 |
87 vrc_minrate (minimum bitrate in kbit/sec) for pass1/2 | |
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 | |
6270
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
109 tip: to do constant quantizer encoding with different quantizers for |
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
110 I/P and B frames you can use: |
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
111 vqmin=<ip_quant>:vqmax=<ip_quant>:vb_qfactor=<b_quant/ip_quant> |
6108 | 112 |
7088 | 113 vqblur (0.0-1.0) quantizer blur (pass1) |
6108 | 114 0.0 qblur disabled |
115 0.5 is the default | |
116 1.0 average the quantizer over all previous frames | |
6270
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
117 larger values will average the quantizer more over time so that it will |
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
118 be changed slower |
7088 | 119 vqblur (0.0-99.0) quantizer blur (pass2) |
120 gaussian blur (gaussian blur cant be done during pass 1 as the future quantizers arent known) | |
121 0.5 is the default | |
122 larger values will average the quantizer more over time so that it will | |
123 be changed slower | |
6108 | 124 |
7088 | 125 vqcomp quantizer compression (for pass1/2) |
126 depends upon vrc_eq | |
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) | |
6108 | 133 |
7088 | 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) | |
6108 | 169 |
7039
2eae7ac0fa8b
same behavior for luma & chroma single coeff elimination
michael
parents:
7011
diff
changeset
|
170 vlelim (-1000-1000) single coefficient elimination threshold for luminance |
6256 | 171 0 disabled (default) |
7039
2eae7ac0fa8b
same behavior for luma & chroma single coeff elimination
michael
parents:
7011
diff
changeset
|
172 -4 (JVT recommendation) |
2eae7ac0fa8b
same behavior for luma & chroma single coeff elimination
michael
parents:
7011
diff
changeset
|
173 negative values will allso consider the dc coefficient |
2eae7ac0fa8b
same behavior for luma & chroma single coeff elimination
michael
parents:
7011
diff
changeset
|
174 should be at least -4 or lower for encoding at quant=1 |
6256 | 175 |
7039
2eae7ac0fa8b
same behavior for luma & chroma single coeff elimination
michael
parents:
7011
diff
changeset
|
176 vcelim (-1000-1000) single coefficient elimination threshold for chrominance |
6256 | 177 0 disabled (default) |
6270
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
178 7 (JVT recommendation) |
7039
2eae7ac0fa8b
same behavior for luma & chroma single coeff elimination
michael
parents:
7011
diff
changeset
|
179 negative values will allso consider the dc coefficient |
2eae7ac0fa8b
same behavior for luma & chroma single coeff elimination
michael
parents:
7011
diff
changeset
|
180 should be at least -4 or lower for encoding at quant=1 |
6256 | 181 |
6270
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
182 vstrict strict standard compliance |
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
183 only recommended if you want to feed the output into the mpeg4 reference |
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
184 decoder |
6256 | 185 |
186 vdpart data partitioning | |
6270
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
187 adds 2 byte per video packet |
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
188 improves error-resistance when transfering over unreliable channels (eg. |
6322 | 189 streaming over the internet) |
6256 | 190 |
6257 | 191 vpsize (0-10000) video packet size |
192 0 disabled (default) | |
193 500-1000 good choice | |
6270
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
194 improves error-resistance (see vdpart for more info) |
6257 | 195 |
6552 | 196 gray grayscale only encoding (a bit faster than with color ...) |
197 | |
7236 | 198 vfdct (0-99) dct algorithm |
7179 | 199 0 automatically select a good one (default) |
200 1 fast integer | |
201 2 accurate integer | |
202 3 mmx | |
203 4 mlib | |
204 | |
6256 | 205 lavdopts: (decoder options) |
6270
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
206 --------------------------- |
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
207 |
6256 | 208 ver error resilience |
6270
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
209 -1 needed for some very broken, encoders which completly ignore the |
7011 | 210 standards (one M4S2 asf sample know to need this) (default) |
211 0 | |
6270
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
212 1 more aggressive error detection, lavc might think that some correct |
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
213 streams contain errors |
6256 | 214 |
7011 | 215 bug manual workaround encoder bugs (cant be easily detected automatically) |
6256 | 216 0 (default) |
7011 | 217 1 for msmpeg4v3 workaround for some old lavc generated msmpeg4v3 files |
218 1 for mpeg4 workaround some opendivx? files | |
219 see http://heroinewarrior.com for some samples | |
7188 | 220 2 for mpeg4 workaround xvid interlacing bug |
6256 | 221 |
6549 | 222 gray grayscale only decoding (a bit faster than with color ...) |
223 | |
6256 | 224 |
6270
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
225 Notes: 1. lavc will strictly follow the quantizer limits vqmin, vqmax, vqdiff |
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
226 even if it violates the bitrate / bitrate tolerance |
6108 | 227 2. changing some options between pass1 & 2 can reduce the quality |
228 | |
6270
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
229 FAQ: Q: Why is the filesize much too small? |
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
230 A: Try to increase vqmin=2 or 1 (be carefull with 1, it could cause |
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
231 strange things to happen). |
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
232 Q: Can I use -pass 1 & -pass 2 with vmax_b_frames>0 ? |
6322 | 233 A: -pass x uses the divx4 twopass-encoding codem which is incompatible |
234 with the libavcodec encode. | |
235 If you want to fix it read DOCS/tech/patches.txt and send a patch. | |
6270
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
236 Q: What provides better error recovery while keeping the filesize low? |
7088 | 237 Should I use data partitioning or increase the number of video packets? |
6270
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
238 A: Data partitioning is better in this case. |
6108 | 239 |
6270
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
240 Glossary: |
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
241 MB Macroblock (16x16 luminance and 8x8 chrominance samples) |
6108 | 242 MV Motion vector |
243 ME Motion estimation | |
244 MC Motion compensation | |
7088 | 245 RC Rate control |
246 DCT Discrete Cosine Transform | |
247 IDCT Inverse Discrete Cosine Transform | |
6270
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
248 JVT Joint Video Team Standard -- http://www.itu.int/ITU-T/news/jvtpro.html |
6108 | 249 |
6270
8dfe9b162624
Spell checking, line wrapping for better readability, some additions/better explanations.
atmos4
parents:
6266
diff
changeset
|
250 Examples: |
6256 | 251 mencoder foobar.avi -lavcopts vcodec=mpeg4:vhq:keyint=300:vqscale=2 -o new-foobar.avi |
6547 | 252 mplayer foobar.avi -lavdopts bug=1 |
6322 | 253 |
7282 | 254 Links: |
255 short intro to mpeg coding: | |
256 http://www.eecs.umich.edu/~amarathe/mpeg.html | |
257 longer intro to jpeg/mpeg coding: | |
258 http://www.cs.sfu.ca/undergrad/CourseMaterials/CMPT479/material/notes/Chap4/Chap4.2/Chap4.2.html | |
259 | |
6322 | 260 -- |
261 Written 2002 by Michael Niedermayer and reviewed by Felix Buenemann. | |
262 Check the MPlayer documentation for contact-addresses. | |
263 |