You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Perform adaptive detection algorithm on input video.
146
+
Find fast cuts using diffs in HSL colorspace (rolling average).
147
147
148
148
Two-pass algorithm that first calculates frame scores with :ref:`detect-content <command-detect-content>`, and then applies a rolling average when processing the result. This can help mitigate false detections in situations such as camera movement.
Perform content detection algorithm on input video.
217
+
Find fast cuts using differences in HSL (filtered).
218
218
219
219
For each frame, a score from 0 to 255.0 is calculated which represents the difference in content between the current and previous frame (higher = more different). A cut is generated when a frame score exceeds :option:`-t/--threshold <-t>`. Frame scores are saved under the "content_val" column in a statsfile.
220
220
221
221
Scores are calculated from several components which are also recorded in the statsfile:
222
222
223
-
- *delta_hue*: Difference between pixel hue values of adjacent frames.
223
+
- *delta_hue*: Difference between pixel hue values of adjacent frames.
224
224
225
-
- *delta_sat*: Difference between pixel saturation values of adjacent frames.
225
+
- *delta_sat*: Difference between pixel saturation values of adjacent frames.
226
226
227
-
- *delta_lum*: Difference between pixel luma (brightness) values of adjacent frames.
227
+
- *delta_lum*: Difference between pixel luma (brightness) values of adjacent frames.
228
228
229
-
- *delta_edges*: Difference between calculated edges of adjacent frames. Typically larger than other components, so threshold may need to be increased to compensate.
229
+
- *delta_edges*: Difference between calculated edges of adjacent frames. Typically larger than other components, so threshold may need to be increased to compensate.
230
230
231
231
Once calculated, these components are multiplied by the specified :option:`-w/--weights <-w>` to calculate the final frame score ("content_val"). Weights are set as a set of 4 numbers in the form (*delta_hue*, *delta_sat*, *delta_lum*, *delta_edges*). For example, "--weights 1.0 0.5 1.0 0.2 --threshold 32" is a good starting point for trying edge detection. The final sum is normalized by the weight of all components, so they need not equal 100%. Edge detection is disabled by default to improve performance.
232
232
@@ -246,7 +246,7 @@ Options
246
246
247
247
.. option:: -tVAL, --thresholdVAL
248
248
249
-
Threshold (float) that frame score must exceed to trigger a cut. Refers to "content_val" in stats file.
249
+
The max difference (0.0 to 255.0) that adjacent frames score must exceed to trigger a cut. Lower values are more sensitive to shot changes. Refers to "content_val" in stats file.
250
250
251
251
Default: ``27.0``
252
252
@@ -258,7 +258,7 @@ Options
258
258
259
259
.. option:: -l, --luma-only
260
260
261
-
Only use luma (brightness) channel. Useful for greyscale videos. Equivalent to setting "-w 0 0 1 0".
261
+
Only use luma (brightness) channel. Useful for greyscale videos. Equivalent to setting -w="0 0 1 0".
262
262
263
263
.. option:: -kN, --kernel-sizeN
264
264
@@ -268,7 +268,13 @@ Options
268
268
269
269
.. option:: -mTIMECODE, --min-scene-lenTIMECODE
270
270
271
-
Minimum length of any scene. Overrides global option :option:`-m/--min-scene-len <scenedetect -m>`. TIMECODE can be specified in frames (:option:`-m=100 <-m>`), in seconds with `s` suffix (:option:`-m=3.5s <-m>`), or timecode (:option:`-m=00:01:52.778 <-m>`).
271
+
Minimum length of any scene. Overrides global option :option:`-m/--min-scene-len <scenedetect -m>`.
272
+
273
+
.. option:: -fMODE, --filter-modeMODE
274
+
275
+
Mode used to enforce :option:`-m/--min-scene-len <-m>` option. Can be one of: merge, suppress.
276
+
277
+
Default: ``Mode.MERGE``
272
278
273
279
274
280
.. _command-detect-hash:
@@ -283,12 +289,13 @@ Find fast cuts using perceptual hashing.
283
289
284
290
The perceptual hash is taken of adjacent frames, and used to calculate the hamming distance between them. The distance is then normalized by the squared size of the hash, and compared to the threshold.
Max distance between hash values (0.0 to 1.0) of adjacent frames. Lower values are more sensitive to changes.
@@ -317,7 +325,7 @@ Options
317
325
318
326
.. option:: -mTIMECODE, --min-scene-lenTIMECODE
319
327
320
-
Minimum length of any scene. Overrides global option :option:`-m/--min-scene-len <scenedetect -m>`. TIMECODE can be specified in frames (:option:`-m=100 <-m>`), in seconds with `s` suffix (:option:`-m=3.5s <-m>`), or timecode (:option:`-m=00:01:52.778 <-m>`).
328
+
Minimum length of any scene. Overrides global min-scene-len (-m) setting. TIMECODE can be specified as exact number of frames, a time in seconds followed by s, or a timecode in the format HH:MM:SS or HH:MM:SS.nnn.
321
329
322
330
323
331
.. _command-detect-hist:
@@ -332,12 +340,13 @@ Find fast cuts by differencing YUV histograms.
332
340
333
341
Uses Y channel after converting each frame to YUV to create a histogram of each frame. Histograms between frames are compared to determine a score for how similar they are.
Max difference (0.0 to 1.0) between histograms of adjacent frames. Lower values are more sensitive to changes.
@@ -354,13 +364,13 @@ Options
354
364
355
365
.. option:: -bNUM, --binsNUM
356
366
357
-
The number of bins to use for the histogram calculation
367
+
The number of bins to use for the histogram calculation.
358
368
359
-
Default: ``16``
369
+
Default: ``256``
360
370
361
371
.. option:: -mTIMECODE, --min-scene-lenTIMECODE
362
372
363
-
Minimum length of any scene. Overrides global option :option:`-m/--min-scene-len <scenedetect -m>`. TIMECODE can be specified in frames (:option:`-m=100 <-m>`), in seconds with `s` suffix (:option:`-m=3.5s <-m>`), or timecode (:option:`-m=00:01:52.778 <-m>`).
373
+
Minimum length of any scene. Overrides global min-scene-len (-m) setting. TIMECODE can be specified as exact number of frames, a time in seconds followed by s, or a timecode in the format HH:MM:SS or HH:MM:SS.nnn.
Export scene list to HTML file. Requires save-images unless --no-images is specified.
438
+
Export scene list to HTML file.
439
+
440
+
To customize image generation, specify the :ref:`save-images <command-save-images>` command before :ref:`export-html <command-export-html>`. This command always uses the result of the preceeding :ref:`save-images <command-save-images>` command, or runs it with the default config values unless ``--no-images`` is set.
429
441
430
442
431
443
Options
@@ -438,9 +450,9 @@ Options
438
450
439
451
Default: ``$VIDEO_NAME-Scenes.html``
440
452
441
-
.. option:: --no-images
453
+
.. option:: -n, --no-images
442
454
443
-
Export the scene list including or excluding the saved images.
455
+
Do not include images with the result.
444
456
445
457
.. option:: -wpixels, --image-widthpixels
446
458
@@ -450,6 +462,10 @@ Options
450
462
451
463
Height in pixels of the images in the resulting HTML table.
452
464
465
+
.. option:: -s, --show
466
+
467
+
Automatically open resulting HTML when processing is complete.
468
+
453
469
454
470
.. _command-list-scenes:
455
471
@@ -462,13 +478,26 @@ Options
462
478
Create scene list CSV file (will be named $VIDEO_NAME-Scenes.csv by default).
Output directory to save videos to. Overrides global option :option:`-o/--output <scenedetect -o>` if set.
707
+
Output directory to save videos to. Overrides global option :option:`-o/--output <scenedetect -o>`.
643
708
644
709
.. option:: -fNAME, --filenameNAME
645
710
@@ -653,7 +718,7 @@ Options
653
718
654
719
.. option:: -c, --copy
655
720
656
-
Copy instead of re-encode. Faster but less precise. Equivalent to: :option:`--args="-map 0:v:0 -map 0:a? -map 0:s? -c:v copy -c:a copy" <--args>`
721
+
Copy instead of re-encode. Faster but less precise.
657
722
658
723
.. option:: -hq, --high-quality
659
724
@@ -692,11 +757,11 @@ Options
692
757
693
758
Set start/end/duration of input video.
694
759
695
-
Values can be specified as frames (NNNN), seconds (NNNN.NNs), or timecode (HH:MM:SS.nnn or MM:SS.nnn). For example, to process only the first minute of a video:
760
+
Values can be specified as seconds (SSSS.nn), frames (NNNN), or timecode (HH:MM:SS.nnn). For example, to process only the first minute of a video:
696
761
697
-
``scenedetect -i video.mp4 time --end 1:00``
762
+
``scenedetect -i video.mp4 time --end 00:01:00``
698
763
699
-
``scenedetect -i video.mp4 time --duration 60s``
764
+
``scenedetect -i video.mp4 time --duration 60.0``
700
765
701
766
Note that --end and --duration are mutually exclusive (i.e. only one of the two can be set). Lastly, the following is an example using absolute frame numbers to process frames 0 through 1000:
702
767
@@ -709,7 +774,7 @@ Options
709
774
710
775
.. option:: -sTIMECODE, --startTIMECODE
711
776
712
-
Time in video to start detection. TIMECODE can be specified as number of frames (:option:`--start=100 <--start>` for frame 100), time in seconds (:option:`--start=100.0 <--start>` for 100 seconds), or timecode (:option:`--start=00:01:40 <--start>` for 1m40s).
777
+
Time in video to start detection. TIMECODE can be specified as seconds (:option:`--start=100.0 <--start>`), frames (:option:`--start=100 <--start>`), or timecode (:option:`--start=00:01:40.000 <--start>`).
0 commit comments