Skip to content

Commit 42aaca2

Browse files
committed
Add opencv as an extra dependency. Update download page. See #111.
1 parent f932a59 commit 42aaca2

2 files changed

Lines changed: 20 additions & 14 deletions

File tree

docs/download.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@ PySceneDetect is compatible with both Python 2 and 3. Note that Python 3 usuall
1010
### Install via pip &nbsp; <span class="wy-text-neutral"><span class="fa fa-windows"></span> &nbsp; <span class="fa fa-linux"></span> &nbsp; <span class="fa fa-apple"></span></span></h3>
1111

1212
<div class="important">
13-
&nbsp;<br/>
14-
<h3 class="wy-text-neutral"><span class="fa fa-forward wy-text-info"></span> <tt>pip install scenedetect</tt></h3></div>
13+
<h4 class="wy-text-neutral">Including all dependencies:</h4>
14+
<h3 class="wy-text-neutral"><span class="fa fa-forward wy-text-info"></span> <tt>pip install scenedetect[opencv,progress_bar]</tt></h3>
15+
<h4 class="wy-text-neutral">Without extras (OpenCV installation required):</h4>
16+
<h3 class="wy-text-neutral"><span class="fa fa-forward wy-text-info"></span> <tt>pip install scenedetect</tt></h3>
17+
</div>
1518

16-
PySceneDetect is available via `pip` as [the `scenedetect` package](https://pypi.org/project/scenedetect/).
19+
PySceneDetect is available via `pip` as [the `scenedetect` package](https://pypi.org/project/scenedetect/). See below for instructions on installing a non-pip version of OpenCV. To ensure you have all the requirements installed, open a `python` interpreter, and ensure you can run `import cv2` without any errors.
1720

1821
### Python Installer (All Platforms) &nbsp; <span class="wy-text-neutral"><span class="fa fa-windows"></span> &nbsp; <span class="fa fa-linux"></span> &nbsp; <span class="fa fa-apple"></span></span></h3>
1922

@@ -38,13 +41,16 @@ To get familiar with PySceneDetect, try running `scenedetect help`, or continue
3841

3942
## Dependencies
4043

41-
PySceneDetect requires [Python 2 or 3](https://www.python.org/) and the following third-party software:
44+
### Python Packages
45+
46+
PySceneDetect requires [Python 2 or 3](https://www.python.org/) and the following packages:
4247

43-
- [OpenCV](http://opencv.org/) (compatible with 2/3), can install via `pip install opencv`
44-
- [Numpy](http://sourceforge.net/projects/numpy/), can install via `pip install numpy`
45-
- [tqdm](https://github.com/tqdm/tqdm), optional, can install via `pip install tqdm`. Used to show progress bar and estimated time remaining.
48+
- [OpenCV](http://opencv.org/) (compatible with 2/3), can install via `pip install opencv`. Used for video I/O.
49+
- [Numpy](https://numpy.org/), can install via `pip install numpy`. Used for frame processing.
50+
- [Click](https://click.palletsprojects.com), can install via `pip install Click`. Used for command line interface.
51+
- [tqdm](https://github.com/tqdm/tqdm) (optional), can install via `pip install tqdm`. Used to show progress bar and estimated time remaining.
4652

47-
### Video Splitting Support
53+
### Video Splitting Tools
4854

4955
For video splitting support, you need to have the following tools available:
5056

@@ -59,11 +65,11 @@ The `ffmpeg` and/or `mkvmerge` command must be available system wide (e.g. in a
5965

6066
If you have trouble getting PySceneDetect to find `ffmpeg` or `mkvmerge`, see the section on Manually Enabling `split-video` Support on [Getting Started: Video Splitting Support Requirements](examples/video-splitting).
6167

62-
### Installing Latest Version of OpenCV (optional)
68+
### Building OpenCV from Source or Using a Different Version
6369

64-
If you have installed OpenCV using `pip`, you will need to uninstall it before continuing on.
70+
If you have installed OpenCV using `pip`, you will need to uninstall it before installing a different version of OpenCV, or building and installing it from source.
6571

66-
You can [click here](http://breakthrough.github.io/Installing-OpenCV/) for a quick guide (OpenCV + Numpy on Windows & Linux) on installing the latest versions of OpenCV/Numpy on [Windows (using pre-built binaries)](http://breakthrough.github.io/Installing-OpenCV/#installing-on-windows-pre-built-binaries) and [Linux (compiling from source)](http://breakthrough.github.io/Installing-OpenCV/#installing-on-linux-compiling-from-source). If the Python module that comes with OpenCV on Windows is incompatible with your system architecture or Python version, [see this page](http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv) to obtain a pre-compiled (unofficial) module.
72+
You can [click here](http://breakthrough.github.io/Installing-OpenCV/) for a quick guide (OpenCV + Numpy on Windows & Linux) on installing OpenCV/Numpy on [Windows (using pre-built binaries)](http://breakthrough.github.io/Installing-OpenCV/#installing-on-windows-pre-built-binaries) and [Linux (compiling from source)](http://breakthrough.github.io/Installing-OpenCV/#installing-on-linux-compiling-from-source). If the Python module that comes with OpenCV on Windows is incompatible with your system architecture or Python version, [see this page](http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv) to obtain a pre-compiled (unofficial) module.
6773

6874
Note that some Linux package managers still provide older, dated builds of OpenCV (pre-3.0). PySceneDetect is compatible with both versions, but if you want to ensure you have the latest version, it's recommended that you [build and install OpenCV from source](http://breakthrough.github.io/Installing-OpenCV/#installing-on-linux-compiling-from-source) on Linux.
6975

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,21 +44,21 @@ def get_requires():
4444
""" Get Requires: Returns a list of required packages. """
4545
return [
4646
'Click',
47-
'numpy',
48-
'opencv-python'
47+
'numpy'
4948
]
5049

5150
def get_extra_requires():
5251
# type: () -> Dict[str, List[str]]
5352
""" Get Extra Requires: Returns a list of extra/optional packages. """
5453
return {
54+
'opencv': ['opencv-python'],
5555
'progress_bar': ['tqdm']
5656
}
5757

5858

5959
setup(
6060
name='scenedetect',
61-
version='0.5.1',
61+
version='0.5.1.1',
6262
description="A cross-platform, OpenCV-based video scene detection program and Python library. ",
6363
long_description=open('package-info.rst').read(),
6464
author='Brandon Castellano',

0 commit comments

Comments
 (0)