Skip to content

Commit 0744735

Browse files
vishal-tambiBreakthrough
authored andcommitted
[docs] Add development setup section to README
1 parent 3e6bc19 commit 0744735

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,25 @@ Pull requests are welcome and encouraged. PySceneDetect is released under the B
132132

133133
For help or other issues, you can join [the official PySceneDetect Discord Server](https://discord.gg/H83HbJngk7), submit an issue/bug report [here on Github](https://github.com/Breakthrough/PySceneDetect/issues), or contact me via [my website](https://bcastell.com/about/).
134134

135+
## Development Setup
136+
137+
Create a virtual environment and install the project in editable mode with the development dependencies:
138+
139+
python -m venv .venv
140+
source .venv/bin/activate # Windows: .venv\Scripts\activate
141+
pip install -e ".[dev]"
142+
143+
The tests use videos from the `resources` branch. Fetch them into `tests/resources/` (this folder is ignored by git, so nothing gets staged):
144+
145+
git fetch --depth=1 https://github.com/Breakthrough/PySceneDetect.git resources
146+
git restore --source=FETCH_HEAD tests/resources
147+
148+
Then run `pytest`. The full test suite also needs `ffmpeg` and `mkvmerge`. If `ffmpeg` is not on your `PATH`, the copy bundled with `imageio-ffmpeg` (installed by `[dev]`) is used instead. Install `mkvmerge` separately, otherwise its test is skipped.
149+
150+
A development install does not include the `scenedetect` command, so use `python -m scenedetect` instead:
151+
152+
python -m scenedetect -i video.mp4 detect-content list-scenes
153+
135154
## Code Signing
136155

137156
This program uses free code signing provided by [SignPath.io](https://signpath.io?utm_source=foundation&utm_medium=github&utm_campaign=PySceneDetect), and a free code signing certificate by the [SignPath Foundation](https://signpath.org?utm_source=foundation&utm_medium=github&utm_campaign=PySceneDetect)

0 commit comments

Comments
 (0)