Skip to content

Commit d8b3c68

Browse files
committed
[dist] Only depend on opencv-contrib-python #251
1 parent bbf2b2d commit d8b3c68

7 files changed

Lines changed: 4 additions & 10 deletions

File tree

dist/requirements_windows.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# DVR-Scan Requirements for Windows Build
33
#
44
numpy==2.2.0
5-
opencv-python==4.10.0.84
65
opencv-contrib-python==4.10.0.84
76
pillow==11.0.0
87
platformdirs==4.3.6

docs/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Includes several critical bugfixes and improvements when processing multiple inp
1515

1616
* [general] Minimum supported Python version is now 3.10 (Python 3.9 is [EOL](https://devguide.python.org/versions/))
1717
* [general] An error is now displayed when launching the app fails due to an invalid config file [#241](https://github.com/Breakthrough/DVR-Scan/issues/241)
18+
* [general] Python package now only depends on `opencv-contrib-python` or `opencv-contrib-python-headless` [#251](https://github.com/Breakthrough/DVR-Scan/issues/251)
1819
* [bugfix] Fix `quiet-mode` setting (`-q`/`--quiet` flag) still allowing extraneous output [#243](https://github.com/Breakthrough/DVR-Scan/issues/243)
1920
* [bugfix] Fix loading config from file in UI [#253](https://github.com/Breakthrough/DVR-Scan/issues/253)
2021
* [bugfix] Fix scan error when enabling "Use PTS" input option with multiple videos [#254](https://github.com/Breakthrough/DVR-Scan/issues/254)

dvr_scan/opencv_loader.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,9 @@
2626
CUDA_BIN_PATH = os.path.abspath(os.path.join(CUDA_PATH, "bin"))
2727
os.add_dll_directory(CUDA_BIN_PATH)
2828

29-
# OpenCV is a required package, but we don't have it as an explicit dependency since we
30-
# need to support both opencv-python and opencv-python-headless. Include some additional
31-
# context with the exception if this is the case.
32-
3329
if not importlib.util.find_spec("cv2"):
3430
raise ModuleNotFoundError(
35-
"OpenCV could not be found, try installing opencv-python:\n\npip install opencv-python",
31+
"OpenCV could not be found, try installing opencv-contrib-python:"
32+
"\n\npip install opencv-contrib-python",
3633
name="cv2",
3734
)

dvr_scan/video_joiner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,5 +188,5 @@ def _load_input_videos(self, backend: str):
188188
logger.error(
189189
"Unsupported or invalid codec, output may be incorrect. Possible fixes:\n"
190190
" - Re-encode the input video with ffmpeg\n"
191-
" - Update OpenCV (pip install --upgrade opencv-python)"
191+
" - Update OpenCV (pip install --upgrade opencv-contrib-python)"
192192
)

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#
44
numpy
55
# TODO(#257): Unpin OpenCV versions once we figure out why frame numbers are mismatching in tests.
6-
opencv-python<4.13
76
opencv-contrib-python<4.13
87
pillow
98
platformdirs

requirements_headless.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#
44
numpy
55
# TODO(#257): Unpin OpenCV versions once we figure out why frame numbers are mismatching in tests.
6-
opencv-python-headless<4.13
76
opencv-contrib-python-headless<4.13
87
pillow
98
platformdirs

setup.cfg

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ install_requires =
5050
screeninfo
5151
tqdm
5252
# TODO(#257): Unpin OpenCV versions once we figure out why frame numbers are mismatching in tests.
53-
opencv-python<4.13
5453
opencv-contrib-python<4.13
5554
pillow
5655
packages =

0 commit comments

Comments
 (0)