summaryrefslogtreecommitdiffstats
path: root/debian/transcode/transcode-1.1.7/export/xvid4.cfg
blob: 6d6202fd1d654c00dd5b420107ee12176ef5fd63 (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
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
# ############################################################################
# XviD 1.0 configuration file for transcode
# ############################################################################


# ----------------------------------------------------------------------------
#
# Section: Features
#
# The fist section of this configuration file concerns what is labeled as
# "features". This allows you to turn on/off some options to adapt XviD to
# your needs.
# ----------------------------------------------------------------------------

[features]

# MPEG4 allows two methods to compress the image, the first one is derived
# from h263, the other one is inspired by the MPEG2 matrix quantization.
#
# NB: defaults to h263 if a typing mistake is done.
#     defaults to mpeg if custom matrices filenames are specified.
#
# Values = h263 | mpeg

quant_type = h263


# This option controls the motion estimation subsystem. The higher the value,
# the more precise the estimation should be. The more precise the motion
# estimation is, the more bits can be saved. Precision is gained at the
# expense of CPU time so decrease this setting if you need realtime encoding.
#
# Values = [0..6]
#
#   0 None
#   1 Very Low
#   2 Low
#   3 Medium
#   4 High
#   5 Very High
#   6 Ultra High
#
# Default = 6

motion = 6

# Motion estimation involves lot of refinement steps. Usually these steps help
# reaching better quality, but not by much, and they use a fair amount of CPU.
# So if you want to speedup Motion Estimation by skipping some refinement steps
# and using simplified ME functions, you can activate the turbo mode.
#
# This setting turns on the ME turbo mode.
#
# Values = 0 (no) | 1 (yes)
# Default = 0

turbo = 0

# The usual motion estimation algorithm uses only the luminance information
# to find the best motion vector. However for some video material, using
# the chromatic planes can help find better vectors.
#
# This setting turns on/off the use of chroma planes for Motion Estimation
#
# Values = 0 (no) | 1 (yes)
# Default = 1

chromame = 1


# The motion search algorithm is based on a search in the usual color domain
# and tries to find a motion vector that minimizes the difference between
# the reference frame and the encoded frame.
#
# Activating this setting, XviD will also use the frequency domain (DCT) to
# search a motion vector that minimizes not only the spatial difference but
# also the encoding length of the block. The higher, the more precise and more
# CPU intensive
#
# Values = [0..4]
#
#   0 Disabled
#   1 Mode decision
#   2 Limited search
#   3 Medium search
#   4 Wide search
#
# Default = 1

vhq = 1


# BFrames are the third type of frames available in MPEG4, they are predicted
# thanks to 2 reference frames. Thus, bframes help usually in two cases:
#   1/ saving bitrate w/o loss of quality
#   2/ increasing the quality for a same bitrate
#
# This setting controls how many bframes the xvid encoder can output in a row.
#
# You must be aware that the higher max_bframes is, the more distant reference
# frames are from each other. Thus prediction of reference frames become hard
# and results in poor quality. If the reference frames have poor quality, so
# the bframes will have. So as a rule of thumb, this setting has to be tuned
# according to your exact needs. CVommon values are [0..2] for "natural movies
# and a bit higher values for anime/cartoons with great amounts of constant color
# areas.
#
# Values = >=0 (0 disables bframes usage)
# Default = 1

max_bframes = 1


# As explained before, BFrames are highly correlated to its reference frames
# Thus XviD computes their quantizer to its reference's quantizers.
#
# This two settings allow you to tune the formula:
#
# Values = [0..200]
# Default = ratio 150 & offset 100

bquant_ratio = 150
bquant_offset = 100


# Sometimes BFrames do not look good, and introduce artefacts when most of the
# frame is static and some small zones have high motion (a static scene with a
# man talking, his mouth will probably look bad if what is surrounding the man
# and his mouth is completly static)
#
# This setting allow you to favorize or not, the use of bframes. The higher the
# value, the more a bframe has chance to be used.
#
# Values [-255..255]
# Default = 0

bframe_threshold = 0


# MPEG4 uses a half pixel precision for its motion search by default. The
# standard proposes a mode where encoders are allowed to use quarter pixel
# precision.
#
# This option usually results in sharper image. But it has great impact on
# bitrate and sometimes the higher use of bitrate will prevent it from giving
# a better image quality at a fixed bitrate. The better is to test w and w/o it
# and choose after this test, if it's worth activting it.
#
# Values = 0 (no) | 1 (yes)
# Default = 0

quarterpel = 0


# Makes XviD generates Sprite Frame which describe best Pan/Zoom/Rotating
# images. Deciding wether or not you must activate it depends highly on the
# video material
#
# Values = 0 (no) | 1 (yes)
# Default = 0

gmc = 0


# Trellis Quantization is a kind of adaptive quantization method that saves
# bits modifying quantized coefficients to make them more compressable by the
# entropy encoder.
#
# Its impact on quality is good, and if VHQ uses too much CPU for you, this
# setting can be a good alternative to save a few bits (and gain quality at
# fixed bitrate) at a minimum expense.
# than VHQ
#
# Values = 0 (no) | 1 (yes)
# Default = 0

trellis = 0


# Depending on the container and frontend API, sometimes it is good to ask XviD
# to group the first bframe of a group with its forward reference frame, that
# prevents A/V desync
#
# This setting would be useful if it was used with VFW 1.1 encoders (Windows)
# because this API does not allow audio contention when no video frames are
# output.
#
# But transcode does not suffer from that API problem and the xvid4 module
# informs transcode to delay frames when needed, so this option is mostly not
# needed with transcode.
#
# Values = 0 (no) | 1 (yes)
# Default = 0

packed = 0


# A GOP is a Group Of Pictures. Its bounded by two Intra Frames.
#
# This option controls if XviD must close a GOP, which means that a GOP is
# independent from the next GOP. This implies just that the last frame of
# the GOP is eiter a PFrame or a SFrame but not a BFrame. This is usually
# a good idea to turn on the option
#
# Values = 0 (no) | 1 (yes)
# Default = 1

closed_gop = 1


# For interlaced video material, turn this option to on.
#
# Values = 0 (no) | 1 (yes)
# Default = 0

interlaced = 0


# Activate this if your encoded sequence is an Anime/Cartoon. It modifies some
# XviD internal thresholds so XviD takes better decisions on frame types and
# motion vectors for flat looking cartoons.
#
# Values = 0 (no) | 1 (yes)
# Default = 0

cartoon = 0


# Activates High Quality AC coefficient prediction from neighboor blocks.
#
# Values = 0 (no) | 1 (yes)
# Default = 1

hqacpred = 1


# XviD keeps track of block coding type (skipped, predicted, intra). The skipped
# block counter can be used to choose wether a frame is so close to its reference
# that it can be _completly_ skipped.
#
# This setting allows you to choose the (100 - value) threshold for skipping a
# frame.
#
# Values = [0..100] (0 -> never skip a frame, 100 -> skip all frames)
# Default = 0

frame_drop_ratio = 0

# XviD discard chroma planes bitstream so the encoded video is greyscale only.
# Note that this does not speed up encoding, that just prevent chroma data
# from being written in the last stage of encoding.
#
# This setting enable Chroma color discarding.
#
# Values = 0 (no) | 1 (yes)
# Default = 0

greyscale = 0

# For testing purposes, or quality measurement, XviD can return some stats
# about the encoded frames.
#
# This option activates PSNR measurement, the average PSNR is displayed at the
# end of the encoding session. This option is probably something a Joe user
# does not really care. This option makes the encoding a bit slower.
#
# Values = 0 (no) | 1 (yes)
# Default = 0

stats = 0

# When doing the first pass of a 2-pass encode, the encoder takes some
# shortcuts and does not produce a full quality encode. Must users have
# no reason to do this, since the first pass is usually discarded.
#
# Setting this option forces the encoder to produce a full quality first
# pass at Q2. Enabling this makes the first pass a lot slower, and should
# only be enabled if you're using the resuts of the first pass for something.
#
# Values = 0 (standard first pass) | 1 (full quality first pass)
# Default = 0

full1pass = 0

# ----------------------------------------------------------------------------
#
# Section: Quantizer
#
# This section allows you to tune quantizing process.
# ----------------------------------------------------------------------------

[quantizer]

# The next 6 settings control the valid range of quantizers for a specific frame
# type
#
# a [2..31] range is probably good for all sequences, you can decrease the higher
# bound limit if you notice some scenes with artefacts. However, restricting the
# valid range can make the bitrate controller fails to achieve the desired bitrate
#
# Use this ranges with MUCH care
#
# Values = [0..31]
#  1-> small quantizer -> better quality
# 31-> high quantizer -> bad quality
#  0 has a special meaning, it lets XviD uses its own default values

min_iquant = 2
max_iquant = 31
min_pquant = 2
max_pquant = 31
min_bquant = 2
max_bquant = 31

# With the MPEG quantization method you can provide custom matrices optimized
# your video material.
#
# A matrix file is just a file where 64 decimal values ranged in 1..255 are
# specified separated by  space chars (newline, space, tabs)
#
# The 8x8 matrix is then rebuilt like that
#
# [ first coeff, second coeff, ... eighth coeff]
# [ ninth coeff, ...                           ]
# [ ...                                        ]
# [                                            ]
# [                                            ]
# [                                            ]
# [                                            ]
# [                                            ]
#
# Value = filename of the matrix
# Default : none (no custom matrix)

#quant_intra_matrix =
#quant_inter_matrix =


# ----------------------------------------------------------------------------
#
# Section: CBR
#
# This section allows you to tune the Constant Bitrate settings.
# ----------------------------------------------------------------------------

[cbr]

# This parameter controls the delay in frames before the CBR rate controller
# will react to bitrate changes and will try to compensate the change to obtain
# a constant bitrate over an averaging range of frames (see below).
#
# Value = >=0
# Default = 16
# 0 has a special meaning, it lets XviD uses its own default values

reaction_delay_factor = 16


# Real CBR is hard to achieve. Depending on the video material, bitrate can be
# variable, and hard to predict. That's why XviD uses an averaging period for
# which it guarantees a given amount of bits (minus a small variation).
#
# This settings express the "number of frames" for which XviD averages bitrate
# and tries to achieve CBR.
#
# Value = >=0
# Default = 100
# 0 has a special meaning, it lets XviD uses its own default values

averaging_period = 100


# Todo: find its exact meaning
#
# Value = >=0
# Default = 100
# 0 has a special meaning, it lets XviD uses its own default values

buffer = 100

# ----------------------------------------------------------------------------
#
# Section: VBR
#
# This section allows you to tune the Variable Bitrate controller settings.
# (2nd pass control in simpler words)
# ----------------------------------------------------------------------------

[vbr]

# The two pass algorithm scales the initial bitrate curve to obtain one that
# respect both the user target bitrate and the natural shape of the first pass
# curve. However it is possible to give an additionnal amount of bits for Intra
# frames.
#
# This setting tells how many additional amount of bits, Intra Frames are
# supposed to be given (this "bossting" amount of bits is compensated by
# subtracting the same amount of bits from other frame types pool)
#
# Value = [0..100]
# Default = 0

keyframe_boost = 0


# This settigs control how much the upper part of the curve has to get closer
# to the average bitrate value. The upper part of the curve is the set of values
# that are higher than the curve average. It is expressed in %.
#
# Think of that setting like a shrinking factor for the upper part of the
# curve.
#
# Value = [0..100]
# Default = 0

curve_compression_high = 0


# This settigs control how much the lower part of the curve has to get closer
# to the average bitrate value. The lower part of the curve is the set of values
# that are lower than the curve average. It is expressed in %.
#
# Think of that setting like a growing factor for the lower part of the
# curve.
#
# Value = [0..100]
# Default = 0

curve_compression_low = 0


# During two pass, a scaled bitrate curve is computed. The difference between
# that expected curve and the result obtained during encoding is called
# overflow. Obviously, the two pass Rate Controller tries to compensate
# that overflow distributing it over next frames to be encoded.
#
# This setting controls how much overflow is distributed at each new frame.
# Low values allow lazy overflow control, big rate bursts are compensated more
# slowly (could lead to lack of precision for small clips). High values
# make RC compensate very hard the overflow, this can have a very bad impact on
# quality during rate bursts.
#
# NB: This setting impacts quality a lot, play with it carefully !
#
# Value = [0..100]
# Default = 0
# 0 has a special meaning, it lets XviD uses its own default values

overflow_control_strength = 5

# During the frame bit allocation, overflow control may increase the frame
# size. This parameter controls how much the overflow control is allowed
# to increase the frame size in percent compared to the ideal curve allocation
#
# Value = >=0
# Default = 60
# 0 has a special meaning, it lets XviD uses its own default values

max_overflow_improvement = 5


# During the frame bit allocation, overflow control may decrease the frame
# size. This parameter controls how much the overflow control is allowed
# to decrease the frame size in percent compared to the ideal curve allocation
#
# Value = >=0
# Default = 60
# 0 has a special meaning, it lets XviD uses its own default values

max_overflow_degradation = 5


# This reduction factor is the maximum allowed keyframe penalty applied to
# a frame in a ivop sequence. The more the frame is distant from the last
# ivop in the consecutive ivop sequence, the more penalty it is applied.
# This ensures a maximum bitrate allocation to the last ivop, thus favorizing
# a good reference frame for following p/s/b vops.
#
# Value = >=0
# Default = 20
# 0 has a special meaning, it lets XviD uses its own default values

kfreduction = 20


# Distance between two ivops so that it is not decresed its bit allocation by
# the ivop reduction mechanism.
#
# Value = >=0
# Default = 1
# 0 has a special meaning, it lets XviD uses its own default values

kfthreshold = 1


# Most of the time users express their target bitrate for video w/o taking care
# of the video container overhead. This small but (mostly) constant overhead
# can make the target file size is not respected (oversized result). We decided
# to allow users to set the amount of overhead per frame the container generates
# (give only an average per frame)
#
# Value = >=0
# Default = 24 (AVI frame average overhead per frame in bytes)
# 0 has a special meaning, it lets XviD uses its own default values

container_frame_overhead = 24

##############################################################################
# Do not modify this tag comment
# arch-tag: bb7970c1-33fb-4c8c-8d1b-742ff2e53336 xvid config file