supervision/tests
Jirka Borovec 20b7c085b7
feat(video): require PyAV during cv2 transition (#2438)
- Add the PyAV-backed file-video and audio fallback to the compatibility layer.
- Declare PyAV alongside OpenCV until the final dependency-removal integration.
- _VideoWriter now rejects is_color=False (NotImplementedError) instead of
  silently dropping it, since the PyAV fallback only encodes 3-channel frames.
- _mux_audio cleanup (container closes, temp-file removal) is now best-effort
  so a failing close/remove in finally can no longer mask the primary result
  or the original exception.
- The subprocess used to validate the cv2-free fallback had no timeout;
  a hang (import deadlock, codec probe stall) could block the whole CI
  run. Added a 60s timeout so a hang fails fast with a clear traceback
  instead of an opaque suite-wide stall.
- process_video(preserve_audio=True) docstring still described the old
  ffmpeg-based muxing; audio remuxing was reimplemented with PyAV and no
  longer requires an external ffmpeg executable.
- get_video_frames_generator's documented webcam fallback
  (`_cv2.VideoCapture(0)`) silently fails under the PyAV backend: the
  BackendUnavailableError raised for integer sources was swallowed with no
  logging, so isOpened() just returns False with zero diagnostic signal.
  Doc note now states the limitation explicitly and the capture logs a
  warning instead of failing silently.

---------

Co-authored-by: Codex <codex@openai.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
2026-07-16 20:13:15 +02:00
..
annotators refactor(cv2): add optional backend facade (#2430) 2026-07-15 20:53:24 +02:00
assets fix: remaining review findings in dataset, docs, and tests (#2416) 2026-07-08 23:00:32 +02:00
classification fix: resolve medium dataset findings (#2408) 2026-07-08 08:56:34 +02:00
cv2 feat(video): require PyAV during cv2 transition (#2438) 2026-07-16 20:13:15 +02:00
dataset fix: close out remaining review findings (#2418) 2026-07-09 17:53:52 +02:00
detection fix: close out remaining review findings (#2418) 2026-07-09 17:53:52 +02:00
draw fix(docs): resolve review deprecation follow-ups (#2415) 2026-07-08 14:30:32 +02:00
geometry fix(docs): resolve review deprecation follow-ups (#2415) 2026-07-08 14:30:32 +02:00
key_points feature: add KeyPoints.merge() method (#2412) 2026-07-09 21:37:26 +02:00
metrics fix(metrics): ignore out-of-bucket detections in size-bucketed sco… (#2428) 2026-07-15 12:48:19 +02:00
tracker fix: remaining review findings in dataset, docs, and tests (#2416) 2026-07-08 23:00:32 +02:00
utils feat(video): require PyAV during cv2 transition (#2438) 2026-07-16 20:13:15 +02:00
validators fix: remaining review findings in dataset, docs, and tests (#2416) 2026-07-08 23:00:32 +02:00
__init__.py refactor: reorganize project structure and update module imports (#2112) 2026-02-03 15:24:47 +01:00
conftest.py fix: remaining review findings in dataset, docs, and tests (#2416) 2026-07-08 23:00:32 +02:00
helpers.py fix: remaining review findings in dataset, docs, and tests (#2416) 2026-07-08 23:00:32 +02:00
test_public_api.py fix: remaining review findings in dataset, docs, and tests (#2416) 2026-07-08 23:00:32 +02:00
test_validate_deprecations.py fix: remaining review findings in dataset, docs, and tests (#2416) 2026-07-08 23:00:32 +02:00