Skip to content

Commit dbd8455

Browse files
committed
Merge branch 'main' into develop
2 parents 5dbac1b + 954b732 commit dbd8455

File tree

6 files changed

+26
-34
lines changed

6 files changed

+26
-34
lines changed

.github/workflows/build-windows.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ jobs:
3030
matrix:
3131
python-version: ["3.9"]
3232

33+
env:
34+
ffmpeg-version: "7.0"
35+
3336
steps:
3437
- uses: actions/checkout@v4
3538

@@ -54,12 +57,12 @@ jobs:
5457
uses: dsaltares/fetch-gh-release-asset@1.1.1
5558
with:
5659
repo: 'GyanD/codexffmpeg'
57-
version: 'tags/6.0'
58-
file: 'ffmpeg-6.0-full_build.7z'
60+
version: 'tags/${{ env.ffmpeg-version }}'
61+
file: 'ffmpeg-${{ env.ffmpeg-version }}-full_build.7z'
5962

6063
- name: Unit Test
6164
run: |
62-
7z e ffmpeg-6.0-full_build.7z ffmpeg.exe -r
65+
7z e ffmpeg-${{ env.ffmpeg-version }}-full_build.7z ffmpeg.exe -r
6366
python -m pytest -vv
6467
6568
- name: Build PySceneDetect
@@ -77,7 +80,7 @@ jobs:
7780
Move-Item -Path dist/windows/README* -Destination dist/scenedetect/
7881
Move-Item -Path dist/windows/LICENSE* -Destination dist/scenedetect/thirdparty/
7982
Move-Item -Path scenedetect/_thirdparty/LICENSE* -Destination dist/scenedetect/thirdparty/
80-
7z e -odist/ffmpeg ffmpeg-6.0-full_build.7z LICENSE -r
83+
7z e -odist/ffmpeg ffmpeg-${{ env.ffmpeg-version }}-full_build.7z LICENSE -r
8184
Move-Item -Path ffmpeg.exe -Destination dist/scenedetect/ffmpeg.exe
8285
Move-Item -Path dist/ffmpeg/LICENSE -Destination dist/scenedetect/thirdparty/LICENSE-FFMPEG
8386

.github/workflows/build.yml

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,26 @@ jobs:
2828
strategy:
2929
matrix:
3030
os: [macos-13, macos-14, ubuntu-20.04, ubuntu-latest, windows-latest]
31-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
31+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
32+
exclude:
33+
# macos-14 builders use M1 (ARM64) which does not have a Python 3.7 package available.
34+
- os: macos-14
35+
python-version: "3.7"
3236

3337
env:
3438
# Version is extracted below and used to find correct package install path.
3539
scenedetect_version: ""
40+
# Setuptools must be pinned for the Python 3.7 builders.
41+
setuptools_version: "${{ matrix.python-version == '3.7' && '==62.3.4' || '' }}"
3642

3743
steps:
3844
- uses: actions/checkout@v4
3945

46+
- uses: FedericoCarboni/setup-ffmpeg@v3
47+
# TODO: This action currently does not work for non-x64 builders (e.g. macos-14):
48+
# https://github.com/federicocarboni/setup-ffmpeg/issues/21
49+
if: ${{ runner.arch == 'X64' }}
50+
4051
- name: Set up Python ${{ matrix.python-version }}
4152
uses: actions/setup-python@v5
4253
with:
@@ -45,7 +56,7 @@ jobs:
4556

4657
- name: Install Dependencies
4758
run: |
48-
python -m pip install --upgrade pip build wheel virtualenv setuptools
59+
python -m pip install --upgrade pip build wheel virtualenv setuptools${{ env.setuptools_version }}
4960
pip install av opencv-python-headless --only-binary :all:
5061
pip install -r requirements_headless.txt
5162
@@ -54,21 +65,6 @@ jobs:
5465
git fetch --depth=1 https://github.com/Breakthrough/PySceneDetect.git refs/heads/resources:refs/remotes/origin/resources
5566
git checkout refs/remotes/origin/resources -- tests/resources/
5667
57-
# TODO: Cache this: https://github.com/actions/cache
58-
# TODO: Install ffmpeg/mkvtoolnix on all runners.
59-
- name: Download FFMPEG
60-
if: ${{ runner.os == 'Windows' }}
61-
uses: dsaltares/fetch-gh-release-asset@1.1.1
62-
with:
63-
repo: 'GyanD/codexffmpeg'
64-
version: 'tags/6.0'
65-
file: 'ffmpeg-6.0-full_build.7z'
66-
67-
- name: Extract FFMPEG
68-
if: ${{ runner.os == 'Windows' }}
69-
run: |
70-
7z e ffmpeg-6.0-full_build.7z ffmpeg.exe -r
71-
7268
- name: Unit Tests
7369
run: |
7470
python -m pytest -vv
@@ -80,13 +76,6 @@ jobs:
8076
python -m scenedetect -i tests/resources/testvideo.mp4 -b pyav time --end 2s
8177
python -m pip uninstall -y scenedetect
8278
83-
- name: Build Documentation
84-
if: ${{ matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' }}
85-
run: |
86-
pip install -r docs/requirements.txt
87-
git mv docs docs_src
88-
sphinx-build -b singlehtml docs_src docs
89-
9079
- name: Build Package
9180
shell: bash
9281
run: |

.github/workflows/generate-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ jobs:
2222
steps:
2323
- uses: actions/checkout@v4
2424

25-
- name: Set up Python 3.11
25+
- name: Set up Python 3.12
2626
uses: actions/setup-python@v5
2727
with:
28-
python-version: '3.11'
28+
python-version: '3.12'
2929
cache: 'pip'
3030

3131
- name: Set Destination (Releases)

.github/workflows/generate-website.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
steps:
1717
- uses: actions/checkout@v4
1818

19-
- name: Set up Python 3.11
19+
- name: Set up Python 3.12
2020
uses: actions/setup-python@v5
2121
with:
22-
python-version: '3.11'
22+
python-version: '3.12'
2323
cache: 'pip'
2424

2525
- name: Install Dependencies

tests/test_detectors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def get_fade_in_out_test_cases():
138138
TestCase(
139139
path=get_absolute_path("resources/fades.mp4"),
140140
detector=ThresholdDetector(
141-
threshold=12.0,
141+
threshold=11.0,
142142
method=ThresholdDetector.Method.FLOOR,
143143
add_final_scene=True,
144144
),

website/pages/changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Releases
88

99
#### Release Notes
1010

11-
Includes new histogram and perceptual hash based detectors (thanks @wjs018 and @ash2703), adds flash filter to content detector, and includes various bugfixes. Minimum supported Python version is now **Python 3.8**.
11+
Includes new histogram and perceptual hash based detectors (thanks @wjs018 and @ash2703), adds flash filter to content detector, and includes various bugfixes.
1212

1313
#### Changelog
1414

0 commit comments

Comments
 (0)