forked from Breakthrough/PySceneDetect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
scenedetect.cfg
306 lines (221 loc) · 9.27 KB
/
scenedetect.cfg
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
#
# This file contains every possible PySceneDetect config option.
#
# A config file path can be specified via the -c/--config option, or by
# creating a `scenedetect.cfg` file the following location:
#
# Windows: C:/Users/%USERNAME%/AppData/Local/PySceneDetect/scenedetect.cfg
#
# Linux: ~/.config/PySceneDetect/scenedetect.cfg
# $XDG_CONFIG_HOME/scenedetect.cfg
#
# Mac: ~/Library/Preferences/PySceneDetect/scenedetect.cfg
#
# Run `scenedetect --help` to see the exact path on your system which will be
# used (it will be listed under the help text for the -c/--config option).
#
#
# GLOBAL OPTIONS
#
[global]
# Output directory for written files. If unset, defaults to working directory.
#output = /usr/tmp/scenedetect/
# Default detector to use.
# Must be one of: detect-adaptive, detect-content, detect-threshold, detect-hist
#default-detector = detect-adaptive
# Video backend interface, must be one of: opencv, pyav.
#backend = opencv
# Downscale frame using a ratio of N. Set to 1 for no downscaling. If unset,
# applied automatically based on input video resolution. Must be an integer value.
#downscale = 1
# Method to use for downscaling (nearest, linear, cubic, area, lanczos4).
#downscale-method = linear
# Minimum length of a given scene.
#min-scene-len = 0.6s
# Merge last scene if it is shorter than min-scene-len (yes/no). This can occur
# when a cut is detected just before the video ends.
#merge-last-scene = no
# Drop scenes shorter than min-scene-len instead of merging (yes/no).
#drop-short-scenes = no
# Verbosity of console output (debug, info, warning, error, or none).
# Set to none for the same behavior as specifying -q/--quiet.
#verbosity = debug
# Amount of frames to skip between performing scene detection. Not recommended.
#frame-skip = 0
#
# DETECTOR OPTIONS
#
[detect-adaptive]
# Frame score threshold, refers to the `adaptive_ratio` metric in stats file.
#threshold = 3
# Minimum threshold that `content_val` metric from detect-content must exceed.
#min-content-val = 15
# Window size (number of frames) before and after each frame to average together.
#frame-window = 2
# Minimum length of a given scene (overrides [global] option).
#min-scene-len = 0.6s
# The following parameters are the those used to calculate `content_val`.
# See [detect-content] for detailed descriptions of these parameters.
#weights = 1.0, 1.0, 1.0, 0.0
#luma-only = no
#kernel-size = -1
[detect-content]
# Sensitivity threshold from 0 to 255. Lower values are more sensitive.
#threshold = 27
# Minimum length of a given scene (overrides [global] option).
#min-scene-len = 0.6s
# Mode to use when filtering scenes to comply with min-scene-len:
# merge: Consecutive scenes shorter than min-scene-len are combined.
# suppress: No new scenes can be generated until min-scene-len passes.
#filter-mode = merge
# Weight to place on each component when calculating frame score (the value
# `threshold` is compared against). The components are in the order
# (delta_hue, delta_sat, delta_lum, delta_edges). Description of components:
# - delta_hue: Difference between hue values of adjacent frames
# - delta_sat: Difference between saturation values of adjacent frames
# - delta_lum: Difference between luma/brightness values of adjacent frames
# - delta_edges: Difference between calculated edges of adjacent frames
# The score of each frame ('content_val' in the statsfile) is calculated as
# the weighted sum of all components.
#weights = 1.0 1.0 1.0 0.0
# Discard colour information and only use luminance (yes/no).
# If yes, overrides weights with (0.0, 0.0, 1.0, 0.0).
#luma-only = no
# Size of kernel for expanding detected edges. Must be odd integer greater
# than or equal to 3. If None, automatically set using video resolution.
#kernel-size = -1
# Mode to use for enforcing min-scene-len:
# merge: Consecutive scenes shorter than min-scene-len are combined.
# suppress: No new scenes can be generated until min-scene-len passes.
#filter-mode = merge
[detect-hash]
# Threshold between 0.0 and 1.0 to set the relative difference between
# hashes required to trigger a shot change. Lower values are more sensitive.
#threshold = 0.395
# The ratio between 1 and 256 of how much low frequency information to keep.
# Represents highest frequency which will pass the filter. 1 means keep all,
# 2 means keep lower 1/2 of frequency data, 4 means keep lower 1/4, etc...
#lowpass = 2
# Size between 1 and 256 representing size of square of low frequency data to
# use for the direct cosine transform (DCT).
#size = 16
# Minimum length of a given scene (overrides [global] option).
#min-scene-len = 0.6s
[detect-hist]
# Threshold between 0.0 to 1.0 to set the relative difference between Y
# channel histograms (YUV) required to trigger a shot change. Lower values
# are more sensitive.
#threshold = 0.05
# Number of bins between 1 and 256 to use for the histogram.
#bins = 256
# Minimum length of a given scene (overrides [global] option).
#min-scene-len = 0.6s
[detect-threshold]
# Average pixel intensity from 0-255 at which a fade event is triggered.
#threshold = 12
# Percent from -100.0 to 100.0 of timecode skew for where cuts should be placed.
# -100 indicates start frame, +100 indicates end frame, and 0 is the center.
#fade-bias 0
# Generate a scene from the end of the last fade out to the end of the video.
#add-last-scene = yes
# Discard colour information and only use luminance (yes/no).
#luma-only = no
# Minimum length of a given scene (overrides [global] option).
#min-scene-len = 0.6s
#
# COMMAND OPTIONS
#
[split-video]
# Folder to output videos. Overrides [global] output option.
#output = /usr/tmp/encoded
# Filename template to use as output.
#filename = $VIDEO_NAME-Scene-$SCENE_NUMBER
# Suppress output from split tool.
#quiet = no
# Use higher bitrate for better output quality (y/n), equivalent to setting
# rate-factor = 17 and preset = slow.
#high-quality = no
# Use codec copying instead of encoding. Significantly faster, but can result
# in inaccurate splits due to keyframe positioning.
#copy = no
# Use mkvmerge for copying instead of encoding. Has the same drawbacks as copy = yes.
#mkvmerge = no
# x264 rate-factor, higher indicates lower quality / smaller filesize.
# 0 = lossless, 17 = visually identical, 22 = default.
#rate-factor = 22
# One of the ffmpeg x264 presets (e.g. veryfast, fast, medium, slow, slower).
#preset = veryfast
# Arguments to specify to ffmpeg for encoding. Quotes are not required.
#args = -map 0:v:0 -map 0:a? -map 0:s? -c:v libx264 -preset veryfast -crf 22 -c:a aac
[save-images]
# Folder to output videos. Overrides [global] output option.
#output = /usr/tmp/images
# Filename format of created images. Can use $VIDEO_NAME, $SCENE_NUMBER, $IMAGE_NUMBER,
# $TIMECODE, $FRAME_NUMBER, and $TIMESTAMP_MS. Should not include extension.
#filename = $VIDEO_NAME-Scene-$SCENE_NUMBER-$IMAGE_NUMBER
# Image format (jpeg, png, webp).
#format = jpeg
# Number of images to generate for each scene.
#num-images = 3
# Image quality (jpeg/webp). Default is 95 for jpeg, 100 for webp
#quality = 95
# Compression amount for png images (0 to 9). Does not affect quality.
#compression = 3
# Number of frames to skip at beginning/end of scene.
#frame-margin = 1
# Factor to resize images by (0.5 = half, 1.0 = same, 2.0 = double).
#scale = 1.0
# Override image height and/or width. Mutually exclusive with scale.
#height = 0
#width = 0
# Method to use for image scaling (nearest, linear, cubic, area, lanczos4).
#scale-method = linear
[export-html]
# Filename format of created HTML file. Can use $VIDEO_NAME in the name.
#filename = $VIDEO_NAME-Scenes.html
# Override <img> element width/height.
#image-height = 0
#image-width = 0
# Do not generate <img> elements in resulting table (yes/no).
#no-images = no
[list-scenes]
# By default, list-scenes will create a CSV file. Enable this option
# to suppress creating the CSV file.
#no-output-file = no
# Folder to output scene list. Overrides [global] output option.
#output = /usr/tmp/images
# Filename format to use when saving scene list. $VIDEO_NAME can be used to
# represent the name of the video being processed.
#filename = $VIDEO_NAME-Scenes.csv
# Display a table with the start/end boundaries for each scene (yes/no).
#display-scenes = yes
# Display list of cut points generated from scene boundaries (yes/no).
#display-cuts = yes
# Format to use for list of cut points (frames, seconds, timecode).
#cut-format = timecode
# Skip writing cut points as the first row in the CSV file (yes/no).
# Set for RFC 4180 compliance.
#skip-cuts = no
# Suppress all display output of list-scenes command.
# Overrides `display-scenes` and `display-cuts`.
#quiet = no
[load-scenes]
# Name of column used to mark scene cut points.
#start-col-name = Start Frame
#
# BACKEND OPTIONS
#
[backend-opencv]
# Number of times to keep reading frames after one fails to decode.
# If set to 0, processing will stop on the first decode failure.
#max-decode-attempts = 5
[backend-pyav]
# Threading mode to use (none, slice, frame, auto). Slice mode is the
# PyAV default, and auto/frame are the fastest.
#threading-mode = auto
# Suppress ffmpeg log output. Default is `no`.
#
# WARNING: When threading-mode is set to auto/frame, setting
# `suppress-output = yes` can cause the the program to not exit properly
# on Linux/OSX (press Ctrl+C to quit if this occurs).
#suppress-output = no