Skip to content

Commit 2b43b9f

Browse files
committed
[backends] Enable auto-rotate for OpenCV backend
Is now disabled in the latest version of OpenCV. See opencv/opencv#26795 for context. Fixes failing rotation tests.
1 parent d7ed2e7 commit 2b43b9f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

scenedetect/backends/opencv.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ def _open_capture(self, framerate: Optional[float] = None):
350350
self._cap = cap
351351
self._frame_rate = framerate
352352
self._has_grabbed = False
353+
cap.set(cv2.CAP_PROP_ORIENTATION_AUTO, 1.0) # https://github.com/opencv/opencv/issues/26795
353354

354355

355356
# TODO(#168): Support non-monotonic timing for `position`. VFR timecode support is a

0 commit comments

Comments
 (0)