Skip to content

Document ffmpeg 5.1+ for -fps_mode and fail the suite once when older - #517

Open
HarshRajSinghania wants to merge 1 commit into
Hebbian-Robotics:mainfrom
HarshRajSinghania:docs/ffmpeg-fps-mode-minimum
Open

HarshRajSinghania wants to merge 1 commit into
Hebbian-Robotics:mainfrom
HarshRajSinghania:docs/ffmpeg-fps-mode-minimum

Conversation

@HarshRajSinghania

Copy link
Copy Markdown

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

  • CONTRIBUTING now requires ffmpeg 5.1 or newer and names -fps_mode so the floor can be re-derived.
  • A session-scoped autouse fixture in tests/conftest.py probes ffmpeg -version once. If the parsed version is older than 5.1 it calls pytest.exit with required vs found. Missing ffmpeg or an unparseable banner is left alone so existing skip/fail paths still apply.
  • No check was added to the encode path.

How the 5.1 floor was established: -fps_mode replaced -vsync in the FFmpeg 5.1 CLI. This environment's ffmpeg is 6.1.1-3ubuntu5, which lists -fps_mode in ffmpeg -h full. Ubuntu 22.04's 4.4.2 does not.

Testing

  • PYTHONPATH=. pytest -q tests/test_ffmpeg_version_guard.py — 2 passed
  • Parser checks for Ubuntu 4.4.2, n5.1.2, and 6.1.1 banners
  • Full uv 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.

@github-actions

Copy link
Copy Markdown

👋 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 kstonekuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The suite needs an ffmpeg new enough for -fps_mode, and neither CONTRIBUTING nor any check says so

2 participants