Skip to content

Commit 598182f

Browse files
committed
[cli] Change default backend back to OpenCV on all platforms.
1 parent e3ffaf5 commit 598182f

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

docs/changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ The main goals of v0.6 are reliability and performance. To achieve this required
3939
* Frame numbers are now 1-based, and there is no longer any overlap between the start/end frame numbers of adjacent scenes
4040
* This also applies to the frame numbers in a statsfile (`-s`/`--stats`) and those provided by `list-scenes`
4141
* The output via the CLI now matches `ffmpeg` in all cases
42+
* The default backend has been changed back to `opencv`
43+
* To enable the `pyav` backend, either specify `-b pyav` via the command line, or set `backend = pyav` under `[global]` in your [config file](http://scenedetect.com/projects/Manual/en/v0.6/cli/config_file.html)
4244

4345
*v0.6-dev3*:
4446

manual/cli/backends.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ PySceneDetect supports multiple backends for video input. Some can be configured
1212
OpenCV
1313
=======================================================================
1414

15-
*[Default on Linux/OSX]*
15+
*[Default]*
1616

1717
This backend, named ``opencv`` on the command line, uses OpenCV's VideoCapture object for video input. It is mostly reliable and fast, although can occasionally run into issues processing videos with multiple audio tracks or small amounts of frame corruption.
1818

@@ -23,6 +23,6 @@ The OpenCV backend also supports image sequences as inputs (e.g. ``frame%02d.jpg
2323
PyAV
2424
=======================================================================
2525

26-
*[Default on Windows]*
26+
The PyAV backend is a more robust backend that handles multiple audio tracks and frame decode errors gracefully.
2727

28-
The PyAV backend is a more robust backend that can handle multiple audio tracks and decode errors more gracefully.
28+
This backend can be used by specifying `-b pyav` via command line, or setting `backend = pyav` under the `[global]` section of your :ref:`config file <scenedetect_cli-config_file>`.

scenedetect/cli/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,8 @@ def _print_help_header() -> None:
225225
type=click.Choice(CHOICE_MAP["global"]["backend"]),
226226
default=None,
227227
help='Backend to use for video input. Backends can be configured using -c/--config. Backends'
228-
' available on this system: %s. Default is pyav on Windows, opencv on other platforms.' %
229-
(', '.join(AVAILABLE_BACKENDS.keys())),
228+
' available on this system: %s.%s.' %
229+
(', '.join(AVAILABLE_BACKENDS.keys()), USER_CONFIG.get_help_string("global", "backend")),
230230
)
231231
@click.option(
232232
'--config',

scenedetect/cli/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def __str__(self) -> str:
109109
'skip-cuts': False,
110110
},
111111
'global': {
112-
'backend': 'pyav' if os.name == 'nt' else 'opencv',
112+
'backend': 'opencv',
113113
'downscale': 0,
114114
'drop-short-scenes': False,
115115
'frame-skip': 0,

0 commit comments

Comments
 (0)