diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 6ea1b0d1..a6975105 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -27,10 +27,11 @@ jobs: runs-on: windows-latest strategy: matrix: - python-version: ["3.9"] + python-version: ["3.13"] env: ffmpeg-version: "7.0" + IMAGEIO_FFMPEG_EXE: "" steps: - uses: actions/checkout@v4 @@ -44,8 +45,8 @@ jobs: - name: Install Dependencies run: | python -m pip install --upgrade pip build wheel virtualenv setuptools - pip install -r dist/requirements_windows.txt pip install -r docs/requirements.txt + pip install --upgrade -r dist/requirements_windows.txt --no-binary imageio-ffmpeg - name: Download Resources run: | @@ -60,13 +61,15 @@ jobs: file: 'ffmpeg-${{ env.ffmpeg-version }}-full_build.7z' - name: Unit Test + shell: bash run: | 7z e ffmpeg-${{ env.ffmpeg-version }}-full_build.7z ffmpeg.exe -r + echo "IMAGEIO_FFMPEG_EXE=`realpath ffmpeg.exe`" >> "$GITHUB_ENV" python -m pytest -vv - name: Build PySceneDetect run: | - python dist/pre_release.py --ignore-installer + python dist/pre_release.py pyinstaller dist/scenedetect.spec - name: Build Documentation @@ -117,5 +120,7 @@ jobs: ./build/scenedetect -i tests/resources/goldeneye.mp4 -b opencv detect-content time --end 10s echo Test PyAV ./build/scenedetect -i tests/resources/goldeneye.mp4 -b pyav detect-content time --end 10s + echo Test moviepy + ./build/scenedetect -i tests/resources/goldeneye.mp4 -b moviepy detect-content time --end 10s echo Test split-video + ffmpeg ./build/scenedetect -i tests/resources/goldeneye.mp4 detect-content time --end 10s split-video diff --git a/appveyor.yml b/appveyor.yml index 72c6a84f..99e83841 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -46,7 +46,7 @@ install: - echo * * BUILDING WINDOWS EXE * * - echo * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # Build Windows .EXE and create portable .ZIP - - python dist/pre_release.py + - python dist/pre_release.py --release - pyinstaller dist/scenedetect.spec - sphinx-build -b singlehtml docs dist/scenedetect/docs - mkdir dist\scenedetect\thirdparty diff --git a/dist/pre_release.py b/dist/pre_release.py index 11d00154..eab54bb4 100644 --- a/dist/pre_release.py +++ b/dist/pre_release.py @@ -1,4 +1,20 @@ -# -*- coding: utf-8 -*- +# +# PySceneDetect: Python-Based Video Scene Detector +# ------------------------------------------------------------------- +# [ Site: https://scenedetect.com ] +# [ Docs: https://scenedetect.com/docs/ ] +# [ Github: https://github.com/Breakthrough/PySceneDetect/ ] +# +# Copyright (C) 2014-2024 Brandon Castellano . +# PySceneDetect is licensed under the BSD 3-Clause License; see the +# included LICENSE file, or visit one of the above pages for details. +# + +# Pre-release script to run before invoking `pyinstaller`: +# +# python dist/pre_release.py +# pyinstaller dist/scenedetect.spec +# import os import sys sys.path.append(os.path.abspath(".")) @@ -8,7 +24,7 @@ VERSION = scenedetect.__version__ -run_version_check = ("--ignore-installer" not in sys.argv) +run_version_check = ("--release" in sys.argv) if run_version_check: installer_aip = '' diff --git a/dist/requirements_windows.txt b/dist/requirements_windows.txt index a4b1f675..a5debd55 100644 --- a/dist/requirements_windows.txt +++ b/dist/requirements_windows.txt @@ -1,9 +1,12 @@ # PySceneDetect Requirements for Windows Build -av==10.0 +av==13.1.0 click>=8.0 +opencv-python-headless==4.10.0.84 + +imageio-ffmpeg +moviepy numpy -opencv-python-headless==4.10.0.82 platformdirs pyinstaller pytest -tqdm \ No newline at end of file +tqdm diff --git a/docs/requirements.txt b/docs/requirements.txt index a367e367..051c203c 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,4 +1,2 @@ +# These are requirements only for the docs. Sphinx == 7.0.1 -opencv-python -numpy -av diff --git a/scenedetect/platform.py b/scenedetect/platform.py index 089dd886..244b9cbe 100644 --- a/scenedetect/platform.py +++ b/scenedetect/platform.py @@ -296,18 +296,20 @@ def get_system_version_info() -> str: Used for the `scenedetect version -a` command. """ - output_template = "{:<12} {}" + output_template = "{:<16} {}" line_separator = "-" * 60 not_found_str = "Not Installed" out_lines = [] # System (Python, OS) + output_template = "{:<16} {}" out_lines += ["System Info", line_separator] out_lines += [ output_template.format(name, version) for name, version in ( ("OS", "%s" % platform.platform()), - ("Python", "%d.%d.%d" % sys.version_info[0:3]), + ("Python", "%s %s" % (platform.python_implementation(), platform.python_version())), + ("Architecture", " + ".join(platform.architecture())), ) ] @@ -317,6 +319,8 @@ def get_system_version_info() -> str: "av", "click", "cv2", + "imageio", + "imageio_ffmpeg", "moviepy", "numpy", "platformdirs", diff --git a/setup.cfg b/setup.cfg index 75451308..e35c5861 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,6 +29,8 @@ classifiers = Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 + Programming Language :: Python :: 3.12 + Programming Language :: Python :: 3.13 Topic :: Multimedia :: Video Topic :: Multimedia :: Video :: Conversion Topic :: Multimedia :: Video :: Non-Linear Editor diff --git a/website/pages/changelog.md b/website/pages/changelog.md index f82110e1..78b8d6fb 100644 --- a/website/pages/changelog.md +++ b/website/pages/changelog.md @@ -588,3 +588,7 @@ Development - [bugfix] Fix `ContentDetector` crash when using callbacks [#416](https://github.com/Breakthrough/PySceneDetect/issues/416) [#420](https://github.com/Breakthrough/PySceneDetect/issues/420) - [general] Timecodes of the form `MM:SS[.nnn]` are now processed correctly [#443](https://github.com/Breakthrough/PySceneDetect/issues/443) - [api] The `save_to_csv` function now works correctly with paths from the `pathlib` module + - [general] Updates to Windows distributions: + - The MoviePy backend is now included with Windows distributions + - Bundled Python interpreter is now Python 3.13 + - Updated PyAV 10 -> 13.1.0 and OpenCV 4.10.0.82 -> 4.10.0.84