summaryrefslogtreecommitdiffstats
path: root/debian/transcode/transcode-1.1.7/encode/x264.cfg
blob: c08641ff4156d75d0448cdc07e0ae2078f976434 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
###############################
# General encoding parameters #
###############################

# threads = <N>
#     Sets the number of threads to be used for processing.  N must be
#     between 1 and 4 inclusive.
#threads = 1

# 2pass_bug_workaround
#     Enables a workaround for an x264 bug which sometimes causes the
#     second pass of a 2-pass encode to fail while reading the 2-pass
#     logfile.
2pass_bug_workaround


###########################
# Video stream properties #
###########################

# level_idc = <N>
#     Sets the H.264 level to use for encoding.  N can be any of the
#     following (note that the resolutions given are only examples; see
#     e.g. http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC):
#
#      N  Level  Max. bitrate   Resolution (WxH@FPS)
#     --  -----  ------------  ------------
#     10    1      64 kbit/s    176x144@15
#     11   1.1    192 kbit/s    320x240@10
#     12   1.2    384 kbit/s    320x240@20
#     13   1.3    768 kbit/s    352x288@30
#     20    2       2 Mbit/s    352x288@30
#     21   2.1      4 Mbit/s    352x480@30
#     22   2.2      4 Mbit/s    720x480@15
#     30    3      10 Mbit/s    720x480@30
#     31   3.1     14 Mbit/s   1280x720@30
#     32   3.2     20 Mbit/s   1280x720@60
#     40    4      20 Mbit/s   1920x1088@30
#     41   4.1     50 Mbit/s   1920x1088@30
#     42   4.2     50 Mbit/s   1920x1088@60
#     50    5     135 Mbit/s   2560x1920@30
#     51   5.1    240 Mbit/s   4096x2048@30
#level_idc = 51

# overscan = <N>
# vidformat = <N>
# fullrange | nofullrange
# colorprim = <N>
# transfer = <N>
# colmatrix = <N>
# chroma_loc = <N>
#     Set H.264 VUI properties.  See the source code for details.
#overscan = 0
#vidformat = 5
#nofullrange
#colorprim = 2
#transfer = 2
#colmatrix = 2
#chroma_loc = 0


########################
# Bitstream parameters #
########################

# frameref = <N>
#     Specifies the maximum number of reference frames to use (1-16).
#frameref = 1

# keyint_min = <N>
# keyint_max = <N>
#     Specify the minimum and maximum keyframe intervals.
#keyint_min = 25
#keyint_max = 250

# scenecut = <N>
#     Specifies the scene change detection threshold as a percentage
#     (0-100), or -1 to disable.
#scenecut = 40

# bframes = <N>
#     Specifies the number of B-frames between two reference frames (0-16).
#bframes = 0

# b_adapt | nob_adapt
#     Specifies whether or not to use adaptive B-frame encoding.
#b_adapt

# b_bias = <N>
#     Influences how often B-frames are used.  <N> is from -90 to 100
#     inclusive.
#b_bias = 0

# b_pyramid | nob_pyramid
#     Specifies whether to allow B-frames to be used as references.
#nob_pyramid

# deblock | nodeblock
#     Selects whether to use the deblocking filter.
# deblockalpha = <A>
# deblockbeta = <B>
#     Specify parameters for the deblocking filter.  <A> and <B> are
#     between -6 and 6 inclusive.
#deblock
#deblockalpha = 0
#deblockbeta = 0

# cabac | nocabac
#     Selects whether to use CABAC (context-adaptive binary arithmetic
#     coding).
# cabac_init_idc = <N>
#     Specifies an internal CABAC parameter.
#cabac
#cabac_init_idc = 0

# cqm = <N>
#     Specifies the type of quantization matrices to use:
#         0: Flat matrices
#         1: JVT matrices
#         2: Custom matrices
# cqm_file = <path>
#     Specifies the pathname for the custom matrix file with "cqm 2".
#cqm = 0
#cqm_file = /dev/null


###############################
# Encoder analyzer parameters #
###############################

# 8x8dct | no8x8dct
#     Specifies whether to allow integer 8x8 DCT transforms.
#no8x8dct

# weight_b | noweight_b
#     Specifies whether to use implicit weighting for B-frames.
#noweight_b

# direct_pred = <N>
#     Selects the type of motion vector (MV) prediction to use:
#     0: none, 1: spatial, 2: temporal, 3: auto
#direct_pred = 1

# direct_8x8 | nodirect_8x8
#     Specifies whether to DISallow 4x4 direct partitions.  Default depends
#     on level_idc.
#nodirect_8x8

# chroma_qp_offset = <N>
#     Specifies the QP offset between chroma and luma (-12 to +12).
#chroma_qp_offset = 0

# me = <N>
#     Selects the motion estimation algorithm to use:
#         0: diagonal search, radius 1 (fast)
#         1: hexagonal search, radius 2
#         2: uneven multi-hexagon search
#         3: exhaustive search (slow)
#me = 1

# me_range = <N>
#     Specifies the motion estimation search range (from the predicted MV),
#     4 to 64 inclusive.
#me_range = 16

# mv_range = <N>
#     Specifies the maximum length of a motion vector, 32-2048 pixels.
#     Default depends on level_idc.
#mv_range = 512

# subq = <N>
#     Specifies the subpixel motion estimation quality, from 1 (fastest)
#     to 7 (best).
#subq = 5

# chroma_me | nochroma_me
#     Specifies whether to use chroma in motion estimation.
#chroma_me

# mixed_refs | nomixed_refs
#     Specifies whether to allow macroblock partitions in P-frames to have
#     individual references.
#nomixed_refs

# trellis = <N>
#     Specifies whether to use trellis RD quantization.  Requires CABAC.
#     <N> is one of:
#         0: disabled
#         1: enabled only for final encoding of a macroblock
#         2: enabled for all mode decisions
#trellis = 0

# fast_pskip | nofast_pskip
#     Specifies whether to use early SKIP detection for P-frames.
#fast_pskip

# dct_decimate | nodct_decimate
#     Specifies whether to use transform coefficient thresholding on P-frames.
#dct_decimate

# nr = <N>
#     Specifies noise reduction level (0-65536).
#nr = 0

# psnr | nopsnr
# ssim | nossim
#     Specify whether to calculate PSNR/SSIM statistics (consumes some CPU
#     time).
#psnr
#ssim


###########################
# Rate control parameters #
###########################

# qp_min = <N>
# qp_max = <N>
#     Specify the minimum and maximum allowed QP values (0-51, 0=lossless).
# qp_step = <N>
#     Specifies the maximum difference between QP in consecutive frames.
#qp_min = 10
#qp_max = 51
#qp_step = 4

# crf = <N>
#     Specifies the nominal QP for 1-pass VBR encoding.
#crf = 0

# ratetol = <N>
#     Specifies the allowed variance from the average bitrate.
#ratetol = 1.0

# vbv_maxrate = <N>
#     Specifies the maximum allowed local bitrate, in kbit/s.
#vbv_maxrate = 0

# vbv_bufsize = <N>
#     Specifies the size of the VBV buffer for CBR encoding, in kbit.
#vbv_bufsize = 0

# vbv_init = <N>
#     Specifies the initial occupancy of the VBV buffer as a decimal value.
#vbv_init = 0.9

# ip_ratio = <N>
#     Specifies the QP ratio between I-frames and P-frames.
#ip_ratio = 1.4

# pb_ratio
#     Specifies the QP ratio between P-frames and B-frames.
#pb_ratio = 1.3

# rc_eq = <string>
#     Specifies the rate control equation.
#rc_eq = blurCplx^(1-qComp)

# qcomp = <N>
#     Specifies the QP curve compression ratio.  0.0 gives constant bitrate
#     encoding, while 1.0 gives constant quality encoding.
#qcomp = 0.6

# cplx_blur = <N>
#     Specifies the amount by which to blur complexity before QP compression.
#cplx_blur = 20.0

# qblur = <N>
#     Specifies the amount by which to blur the QP value after QP compression.
#qblur = 0.5

# zones = <string>
#     Specifies exceptions to the rate control handling for particular
#     frame ranges.  The string is a slash-separated sequence of zones,
#     where each zone takes the form "start-frame,end-frame,option".
#     "start-frame" and "end-frame" define the zone, and "option" is one of:
#         q=<QP>: force QP to <QP> (0-51)
#         b=<factor>: multiply bitrate by <factor> (decimal value)
#zones = 0,100,q=10/200,300,b=1.5