annotate DOCS/tech/libavc-options.txt @ 6108:cb1139661cff

lavc rate control tech-docs
author michael
date Fri, 17 May 2002 11:50:23 +0000
parents
children 55aacd56c5ef
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6108
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
1 Description of what all thouse libavcodec options do ...
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
2 WARNING: iam no encoding expert so the recomanditions might be bad ...
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
3 if u find any errors, missing stuff, ... send a patch or cvs commit if u have an cvs account :)
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
4
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
5 vqmin 1-31 (minimum quantizer) for pass1/2
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
6 1 is not recomanded (much larger file, little quality difference and possible other weird things)
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
7 2 is recommanded for normal mpeg4/mpeg1video encoding
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
8 3 is recommanded for h263(p)/msmpeg4 (default)
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
9 the reason for 3 instead of 2 is that 2 could lead to overflows (this will be fixed for h263(p)
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
10 by chageing the quanizer per MB in the future, but msmpeg4 doesnt support that so it cant be fixed
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
11 for that)
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
12
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
13 vqscale 1-31 quantizer for constant quantizer /constant quality encoding
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
14 1 is not recomanded (much larger file, little quality difference and possible other weird things)
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
15 lower means better quality but larger files
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
16 see vqmin
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
17
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
18 vqmax 1-31 (maximum quantizer) for pass1/2
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
19 15 default
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
20 10-31 should be a sane range
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
21
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
22 vqdiff 1-31 (maximum quantizer difference between I or P frames) for pass1/2
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
23 3 default
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
24
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
25 vmax_b_frames 0-4 (maximum number of b frames between non b frames)
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
26 0 no b frames (default)
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
27
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
28 vme 0-5 (motion estimation)
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
29 0 none (not recommanded, very lq)
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
30 1 full (not recommanded, too slow)
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
31 2 log (not recommanded, lq)
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
32 3 phods (not recommanded, lq)
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
33 4 EPZS (default)
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
34 5 X1
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
35
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
36 vhq (high quality mode)
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
37 encode each MB as in all modes and choose the best (this is slow but better filesize/quality)
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
38 disabled by default
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
39
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
40 v4mv
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
41 allow 4 MV per MB (little difference in filesize/quality)
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
42 disabled by default
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
43 cannot be used with b frames or in lq mode currently
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
44 disabled by default
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
45
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
46 keyint 0-300 (maximum interval between keyframes)
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
47 keyframes are needed for seeking as seeking is only possible to a keyframe but keyframes need more space
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
48 than non keyframes so larger numbers here mean slightly smaller files
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
49 0 no keyframes
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
50 >300 is not recomanded as the quality might be bad (depends upon decoder & encoder & luck)
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
51
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
52 vb_strategy 0-1 for pass 2
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
53 0 allways use the max number of b frames (default)
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
54 1 avoid b frames in high motion scenes (this will cause bitrate missprediction)
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
55
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
56 vpass
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
57 1 first pass
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
58 2 second pass
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
59
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
60 vbitrate (kbits per sec) for pass1/2
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
61 800 is default
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
62
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
63 vratetol (filesize tolerance in kbit) for pass1/2
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
64 this is just approximate, the real difference can be much smaller or larger
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
65 1000- 100000 is a sane range
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
66 8000 is default
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
67
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
68 vb_qfactor (1.0-31.0) (BFrame quantizer= PFrame quantizer * vb_qfactor) for pass1/2
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
69 2.0 is default
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
70 tip: to do constant quantizer encoding with different quantizers for I/P and B frames
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
71 u can use vqmin=<ip-quant>:vqmax=<ip-quant>:vb_qfactor=<b_quant/ip_quant>
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
72
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
73 vqblur (0.0-1.0) quantizer blur (for pass1)
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
74 0.0 qblur disabled
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
75 0.5 is the default
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
76 1.0 average the quantizer over all previous frames
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
77 larger values will average the quantizer over time more so that the quantizer will be changed slower
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
78
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
79 vqcomp (0.0-1.0) quantizer compression (for pass1/2)
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
80 0.0 constant bitrate encoding, so fast moton frames will get as many bits as low motion
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
81 (high motion scenes look bad)
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
82 0.5 (default)
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
83 1.0 constant quantizer encoding (low motion scenes look bad)
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
84
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
85 vrc_strategy (0,1,2)
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
86 FIXME
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
87
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
88 Notes: 1. lavc will strictly follows the quantizer limits vqmin, vqmax, vqdiff even if
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
89 it violates the bitrate / bitrate tolerance
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
90 2. changing some options between pass1 & 2 can reduce the quality
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
91
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
92 FAQ: Q: the file is much too small
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
93 A: vqmin=2 or 1 (be carefull with 1, it could cause strange things to happen)
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
94 Q: i want to use -pass 1 & -pass 2 with vmax_b_frames>0
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
95 A: read DOCS/tech/patches.txt and send a patch ;)
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
96
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
97 glossary:
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
98 MB Macroblock (16x16 luminance & 8x8 chrominance samples)
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
99 MV Motion vector
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
100 ME Motion estimation
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
101 MC Motion compensation
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
102
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
103 example:
cb1139661cff lavc rate control tech-docs
michael
parents:
diff changeset
104 mencoder foobar.avi -lavcopts vcodec=mpeg4:vhq:keyint=300:vqscale=2 -o new-foobar.avi