Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support H.264 on native via user installed ffmpeg executable (#7962)
### What * Most of #7607 * Replaces #7658 Tested this with videos containing b frames, both long and short. <img width="1403" alt="image" src="https://github.com/user-attachments/assets/12da809b-5aee-4c06-ba30-394d82073a2a"> (note how PTS != DTS, indicating that there's a b-frame _somewhere_ ;-)) Biggest risk overall with the approach taken is that we can't detect dropped frames properly Left to do before landing: * [x] test 4k 60fps video material * works smoothly in release, not at 60fps in debug builds on my mac because of rgb->rgba conversions on our side (see todos below) * [x] test black & white (yuv400) * [x] works but my video test material gave me: `re_video::decode::ffmpeg] /\//Users/andreas/dev/rerun-io/internal-test-assets/video/greyscale_360p_h264.mp4, codec: H.264 (avc1.64001E) decoder: [swscaler @ 0x3001d8000] [warning] deprecated pixel format used, make sure you did set range correctly` every time ffmpeg started, need to fix that to a log_once (if ffmpeg says it's deprecated then I figure we may report that 🤷, just don't spam) * [x] test yuv444/rgb video * worked, but the test 4.4s test video I used stops working starting at 3.2s, recovers fine though * Direct play browser: Firefox says the file is corrupt, Safari refuses to play. Chrome handles it * Rerun play browser: Same, but different errors * ... letting this issue slide for now 🤷 What's left to do (beyond general video bugs I logged while working on this) before calling this "done": * download ffmpeg for the user or at least tell users what to do when there's no ffmpeg (haven't checked even yet on the error message) * add version & ability check for ffmpeg? * consume 420p and friends directly to speed up processing * try to provoke frame dropping and see if we can detect & handle that - one of the shortcomings of the overall approach today is that we don't track this! ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested the web demo (if applicable): * Using examples from latest `main` build: [rerun.io/viewer](https://rerun.io/viewer/pr/7962?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [rerun.io/viewer](https://rerun.io/viewer/pr/7962?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) * [x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG * [x] If applicable, add a new check to the [release checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)! * [x] If have noted any breaking changes to the log API in `CHANGELOG.md` and the migration guide - [PR Build Summary](https://build.rerun.io/pr/7962) - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html) To run all checks from `main`, comment on the PR with `@rerun-bot full-check`. --------- Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
- Loading branch information