Skip to content

feat(video): 📦 FFmpeg 8 video support#86

Merged
onuralpszr merged 11 commits intomainfrom
feat/ffmpeg-8-support
Mar 2, 2026
Merged

feat(video): 📦 FFmpeg 8 video support#86
onuralpszr merged 11 commits intomainfrom
feat/ffmpeg-8-support

Conversation

@onuralpszr
Copy link
Member

@onuralpszr onuralpszr commented Mar 2, 2026

  • Adjusted video-rs dependency to allow versions >=0.10.5 and <0.12.
  • Introduced video-runtime feature for internal video handling.
  • Separated video support into two features: video for FFmpeg 8+ and video-ffmpeg7 for FFmpeg 7 with video-rs 0.10.x.
  • Retained ndarray 0.16 as an optional dependency for video-ffmpeg7.

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

This PR upgrades and simplifies video support across CI, dependencies, and docs by standardizing around FFmpeg 8 (while keeping FFmpeg 7 compatibility), reducing Rust video-related dependency complexity, and improving build/test reliability 🚀🎬.

📊 Key Changes

  • CI video coverage expanded on Linux to test both FFmpeg 8.0 and 7.1 ✅🐧
  • macOS video build updated from pinned ffmpeg@7 to standard ffmpeg (FFmpeg 8 path), removing manual env var setup for cleaner builds 🍎
  • Windows video build switched to a generic FFmpeg release archive URL and simplified extraction naming 🪟
  • Coverage job moved from macOS to Ubuntu, now installing FFmpeg dev libraries via apt, and includes visualize in coverage features 📈
  • Crate version bumped from 0.0.8 → 0.0.9 📦
  • video feature was simplified:
    • Removed direct ffmpeg-next, ffmpeg-sys-next, and custom ndarray_0_16 feature wiring
    • Kept video support through video-rs only (with a broader compatible version range) 🔧
  • Internal FFmpeg calls migrated to video_rs::ffmpeg / video_rs::ffmpeg::ffi instead of direct ffmpeg crates 🧩
  • Error/warning messages were clarified to explicitly say --features video for enabling video support 📝
  • README added a dedicated Video Support (FFmpeg) section with install/build instructions for macOS and Ubuntu/Debian 📚

🎯 Purpose & Impact

  • More stable cross-platform video support in CI, especially with newer FFmpeg versions 🌍
  • Lower maintenance burden by removing redundant direct FFmpeg bindings and relying on video-rs abstraction 🛠️
  • Easier setup for users thanks to clearer docs and fewer manual environment tweaks 🙌
  • Clearer UX when video features are missing at runtime/build time, reducing confusion for new users 💡
  • Likely improves reliability for teams building video-enabled inference pipelines in ultralytics/inference with modern FFmpeg stacks 🎥
📋 Skipped 1 file (lock files, generated, images, etc.)
  • Cargo.lock

- Adjusted video-rs dependency to allow versions >=0.10.5 and <0.12.
- Introduced video-runtime feature for internal video handling.
- Separated video support into two features: video for FFmpeg 8+
    and video-ffmpeg7 for FFmpeg 7 with video-rs 0.10.x.
- Retained ndarray 0.16 as an optional dependency for video-ffmpeg7.

Signed-off-by: Onuralp SEZER <onuralp@ultralytics.com>
Signed-off-by: Onuralp SEZER <onuralp@ultralytics.com>
@UltralyticsAssistant UltralyticsAssistant added dependencies Dependency-related topics enhancement New feature or request labels Mar 2, 2026
@UltralyticsAssistant
Copy link
Member

👋 Hello @onuralpszr, thank you for submitting a ultralytics/inference 🚀 PR! This is an automated message to help with review readiness—an engineer will assist you shortly 😊 Please review the checklist below:

  • Define a Purpose: Clearly explain the purpose of your fix or feature in your PR description, and link to any relevant issues. Ensure your commit messages are clear, concise, and adhere to the project's conventions.
  • Synchronize with Source: Confirm your PR is synchronized with the ultralytics/inference main branch. If it's behind, update it by clicking the 'Update branch' button or by running git pull and git merge main locally.
  • Ensure CI Checks Pass: Verify all Ultralytics Continuous Integration (CI) checks are passing. If any checks fail, please address the issues.
  • Update Documentation: Update the relevant documentation for any new or modified features.
  • Add Tests: If applicable, include or update tests to cover your changes, and confirm that all tests are passing.
  • Sign the CLA: Please ensure you have signed our Contributor License Agreement if this is your first Ultralytics PR by writing "I have read the CLA Document and I sign the CLA" in a new message.
  • Minimize Changes: Limit your changes to the minimum necessary for your bug fix or feature addition. "It is not daily increase but daily decrease, hack away the unessential. The closer to the source, the less wastage there is." — Bruce Lee
    For more guidance, please refer to our Contributing Guide. Don't hesitate to leave a comment if you have any questions. Thank you for contributing to Ultralytics! 🚀

Signed-off-by: Onuralp SEZER <onuralp@ultralytics.com>
Copy link
Member

@UltralyticsAssistant UltralyticsAssistant left a comment

Choose a reason for hiding this comment

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

🔍 PR Review

Made with ❤️ by Ultralytics Actions

Good direction on separating FFmpeg 8 and FFmpeg 7 feature paths, but the current feature gating is not enforceable with a single ranged video-rs dependency. As written, video-ffmpeg7 can still pick video-rs 0.11, so the compatibility path is not guaranteed.

💬 Posted 1 inline comment

📋 Skipped 1 file (lock files, generated, images, etc.)
  • Cargo.lock

@codecov
Copy link

codecov bot commented Mar 2, 2026

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/io.rs 0.00% 1 Missing ⚠️
src/source.rs 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@onuralpszr onuralpszr marked this pull request as ready for review March 2, 2026 14:17
Signed-off-by: Onuralp SEZER <onuralp@ultralytics.com>
Signed-off-by: Onuralp SEZER <onuralp@ultralytics.com>
@onuralpszr onuralpszr changed the title feat(video): 📦 Update Cargo.toml for ffmpeg8 video support feat(video): 📦 FFmpeg 8 video support Mar 2, 2026
Signed-off-by: Onuralp SEZER <onuralp@ultralytics.com>
@onuralpszr onuralpszr merged commit 2ec5fed into main Mar 2, 2026
9 checks passed
@onuralpszr onuralpszr deleted the feat/ffmpeg-8-support branch March 2, 2026 17:15
@UltralyticsAssistant
Copy link
Member

🎉 Huge congratulations on getting this merged — what an excellent improvement to ultralytics/inference!

Big thanks to @onuralpszr for driving this forward, and to @artest08 and @fcakyon for the valuable contributions along the way 🙌

“Great things are done by a series of small things brought together.” — Vincent van Gogh

This PR is a perfect example of that: cleaner dependencies, stronger cross-platform CI, clearer docs, and smoother FFmpeg support all combine into a major reliability win for everyone building video-enabled inference pipelines. Really impactful work — thank you all! 🚀

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

Labels

dependencies Dependency-related topics enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants