Document ffmpeg 5.1+ for -fps_mode and fail the suite once when older - #517
HarshRajSinghania wants to merge 1 commit into
Conversation
|
👋 Hi @HarshRajSinghania — thank you so much for your first contribution to HFlow! A maintainer will review your pull request as soon as possible. In the meantime:
💡 Tip: one open pull request per contributor at a time. Issues with an assignee are taken; everything else is fair game. We are excited to have you here and appreciate your help making the project better! 🙌 |
kstonekuan
left a comment
There was a problem hiding this comment.
ruff format --check fails on tests/conftest.py:51, so this would turn main red.
pytest.exit ends the whole session. Someone working on curation with an old ffmpeg now cannot run any test. #491 asked for the ffmpeg-dependent tests to skip or fail, not the run to abort.
Rest looks right, and naming -fps_mode in CONTRIBUTING so the floor can be re-derived is the part that keeps it true.
Fixes #491.
Summary
The test suite uses
-fps_mode(src/hflow/video.py,src/hflow/episode.py). That option is not present in FFmpeg 4.4.x (Ubuntu 22.04 default), so a contributor on the distro binary gets encode-path assertion failures that look like their branch broke something.Motivation
#491 asked for two things: name the minimum in CONTRIBUTING, and replace those three obscure failures with one message that states the required and found versions.
Implementation
-fps_modeso the floor can be re-derived.tests/conftest.pyprobesffmpeg -versiononce. If the parsed version is older than 5.1 it callspytest.exitwith required vs found. Missing ffmpeg or an unparseable banner is left alone so existing skip/fail paths still apply.How the 5.1 floor was established:
-fps_modereplaced-vsyncin the FFmpeg 5.1 CLI. This environment's ffmpeg is 6.1.1-3ubuntu5, which lists-fps_modeinffmpeg -h full. Ubuntu 22.04's 4.4.2 does not.Testing
PYTHONPATH=. pytest -q tests/test_ffmpeg_version_guard.py— 2 passedn5.1.2, and 6.1.1 bannersuv sync --locked --all-extras/ ruff / ty / full pytest were not run here (no project venv). Local ffmpeg is 6.1.1, which is above the floor.