Skip to content

Commit 5bf97d7

Browse files
authored
[dist] Update Windows Python/deps + Include MoviePy (#446)
* [dist] Bump Windows build dependency versions * [dist] Use Python 3.13 for Windows builds and include MoviePy. * [cli] Add more info to version command * [dist] Remove duplicate copy of ffmpeg in distribution.
1 parent 770d514 commit 5bf97d7

File tree

8 files changed

+46
-14
lines changed

8 files changed

+46
-14
lines changed

.github/workflows/build-windows.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ jobs:
2727
runs-on: windows-latest
2828
strategy:
2929
matrix:
30-
python-version: ["3.9"]
30+
python-version: ["3.13"]
3131

3232
env:
3333
ffmpeg-version: "7.0"
34+
IMAGEIO_FFMPEG_EXE: ""
3435

3536
steps:
3637
- uses: actions/checkout@v4
@@ -44,8 +45,8 @@ jobs:
4445
- name: Install Dependencies
4546
run: |
4647
python -m pip install --upgrade pip build wheel virtualenv setuptools
47-
pip install -r dist/requirements_windows.txt
4848
pip install -r docs/requirements.txt
49+
pip install --upgrade -r dist/requirements_windows.txt --no-binary imageio-ffmpeg
4950
5051
- name: Download Resources
5152
run: |
@@ -60,13 +61,15 @@ jobs:
6061
file: 'ffmpeg-${{ env.ffmpeg-version }}-full_build.7z'
6162

6263
- name: Unit Test
64+
shell: bash
6365
run: |
6466
7z e ffmpeg-${{ env.ffmpeg-version }}-full_build.7z ffmpeg.exe -r
67+
echo "IMAGEIO_FFMPEG_EXE=`realpath ffmpeg.exe`" >> "$GITHUB_ENV"
6568
python -m pytest -vv
6669
6770
- name: Build PySceneDetect
6871
run: |
69-
python dist/pre_release.py --ignore-installer
72+
python dist/pre_release.py
7073
pyinstaller dist/scenedetect.spec
7174
7275
- name: Build Documentation
@@ -117,5 +120,7 @@ jobs:
117120
./build/scenedetect -i tests/resources/goldeneye.mp4 -b opencv detect-content time --end 10s
118121
echo Test PyAV
119122
./build/scenedetect -i tests/resources/goldeneye.mp4 -b pyav detect-content time --end 10s
123+
echo Test moviepy
124+
./build/scenedetect -i tests/resources/goldeneye.mp4 -b moviepy detect-content time --end 10s
120125
echo Test split-video + ffmpeg
121126
./build/scenedetect -i tests/resources/goldeneye.mp4 detect-content time --end 10s split-video

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ install:
4646
- echo * * BUILDING WINDOWS EXE * *
4747
- echo * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
4848
# Build Windows .EXE and create portable .ZIP
49-
- python dist/pre_release.py
49+
- python dist/pre_release.py --release
5050
- pyinstaller dist/scenedetect.spec
5151
- sphinx-build -b singlehtml docs dist/scenedetect/docs
5252
- mkdir dist\scenedetect\thirdparty

dist/pre_release.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
1-
# -*- coding: utf-8 -*-
1+
#
2+
# PySceneDetect: Python-Based Video Scene Detector
3+
# -------------------------------------------------------------------
4+
# [ Site: https://scenedetect.com ]
5+
# [ Docs: https://scenedetect.com/docs/ ]
6+
# [ Github: https://github.com/Breakthrough/PySceneDetect/ ]
7+
#
8+
# Copyright (C) 2014-2024 Brandon Castellano <http://www.bcastell.com>.
9+
# PySceneDetect is licensed under the BSD 3-Clause License; see the
10+
# included LICENSE file, or visit one of the above pages for details.
11+
#
12+
13+
# Pre-release script to run before invoking `pyinstaller`:
14+
#
15+
# python dist/pre_release.py
16+
# pyinstaller dist/scenedetect.spec
17+
#
218
import os
319
import sys
420
sys.path.append(os.path.abspath("."))
@@ -8,7 +24,7 @@
824

925
VERSION = scenedetect.__version__
1026

11-
run_version_check = ("--ignore-installer" not in sys.argv)
27+
run_version_check = ("--release" in sys.argv)
1228

1329
if run_version_check:
1430
installer_aip = ''

dist/requirements_windows.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
# PySceneDetect Requirements for Windows Build
2-
av==10.0
2+
av==13.1.0
33
click>=8.0
4+
opencv-python-headless==4.10.0.84
5+
6+
imageio-ffmpeg
7+
moviepy
48
numpy
5-
opencv-python-headless==4.10.0.82
69
platformdirs
710
pyinstaller
811
pytest
9-
tqdm
12+
tqdm

docs/requirements.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1+
# These are requirements only for the docs.
12
Sphinx == 7.0.1
2-
opencv-python
3-
numpy
4-
av

scenedetect/platform.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,18 +296,20 @@ def get_system_version_info() -> str:
296296
297297
Used for the `scenedetect version -a` command.
298298
"""
299-
output_template = "{:<12} {}"
299+
output_template = "{:<16} {}"
300300
line_separator = "-" * 60
301301
not_found_str = "Not Installed"
302302
out_lines = []
303303

304304
# System (Python, OS)
305+
output_template = "{:<16} {}"
305306
out_lines += ["System Info", line_separator]
306307
out_lines += [
307308
output_template.format(name, version)
308309
for name, version in (
309310
("OS", "%s" % platform.platform()),
310-
("Python", "%d.%d.%d" % sys.version_info[0:3]),
311+
("Python", "%s %s" % (platform.python_implementation(), platform.python_version())),
312+
("Architecture", " + ".join(platform.architecture())),
311313
)
312314
]
313315

@@ -317,6 +319,8 @@ def get_system_version_info() -> str:
317319
"av",
318320
"click",
319321
"cv2",
322+
"imageio",
323+
"imageio_ffmpeg",
320324
"moviepy",
321325
"numpy",
322326
"platformdirs",

setup.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ classifiers =
2929
Programming Language :: Python :: 3.9
3030
Programming Language :: Python :: 3.10
3131
Programming Language :: Python :: 3.11
32+
Programming Language :: Python :: 3.12
33+
Programming Language :: Python :: 3.13
3234
Topic :: Multimedia :: Video
3335
Topic :: Multimedia :: Video :: Conversion
3436
Topic :: Multimedia :: Video :: Non-Linear Editor

website/pages/changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,3 +589,7 @@ Development
589589
- [bugfix] Fix `ContentDetector` crash when using callbacks [#416](https://github.com/Breakthrough/PySceneDetect/issues/416) [#420](https://github.com/Breakthrough/PySceneDetect/issues/420)
590590
- [general] Timecodes of the form `MM:SS[.nnn]` are now processed correctly [#443](https://github.com/Breakthrough/PySceneDetect/issues/443)
591591
- [api] The `save_to_csv` function now works correctly with paths from the `pathlib` module
592+
- [general] Updates to Windows distributions:
593+
- The MoviePy backend is now included with Windows distributions
594+
- Bundled Python interpreter is now Python 3.13
595+
- Updated PyAV 10 -> 13.1.0 and OpenCV 4.10.0.82 -> 4.10.0.84

0 commit comments

Comments
 (0)