Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses the “green bar” artifact in H.264/HEVC frame captures by suppressing MOV clean-aperture (clap) cropping at decode time while reapplying the codec-declared display crop via an ffprobe-derived -vf crop, and it formalizes ffprobe usage (with caching) across captures.
Changes:
- Add
Ffprobeabstraction plusFfprobeUtil(shells out) andFfprobeService(Caffeine-backed cache) to retrieve declared stream dimensions. - Update
FfmpegUtilto build shared video filters that crop decoded frames back to the declared size (removing macroblock padding) and optionally apply the existing colorspace override filter. - Add/extend test coverage for ffprobe probing, caching behavior (including concurrency), and capture output dimensions; update docs/docker build to require ffmpeg+ffprobe.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/test/scala/org/mbari/beholder/etc/ffmpeg/FfprobeUtilSuite.scala | New tests for ffprobe size probing behavior on real/missing/non-video inputs |
| src/test/scala/org/mbari/beholder/etc/ffmpeg/FfprobeServiceSuite.scala | New tests for cached probing (including failure-not-cached and concurrency) |
| src/test/scala/org/mbari/beholder/etc/ffmpeg/FfmpegUtilSuite.scala | Add capture-dimension assertions to catch macroblock padding artifacts |
| src/main/scala/org/mbari/beholder/Main.scala | Replace _-init var with scala.compiletime.uninitialized |
| src/main/scala/org/mbari/beholder/etc/ffmpeg/FfprobeUtil.scala | New ffprobe shell-out implementation with parse + throttled warning |
| src/main/scala/org/mbari/beholder/etc/ffmpeg/FfprobeService.scala | New Caffeine-backed memoizing ffprobe service |
| src/main/scala/org/mbari/beholder/etc/ffmpeg/Ffprobe.scala | New Ffprobe API + VideoSize model |
| src/main/scala/org/mbari/beholder/etc/ffmpeg/FfmpegUtil.scala | Apply ffprobe-based crop filter (and existing colorspace override) consistently |
| src/docs/_docs/development.md | Document ffmpeg/ffprobe requirements and behavior without ffprobe |
| README.md | Document ffmpeg 7.1+ and ffprobe requirement and why it matters |
| project/Dependencies.scala | Add Caffeine dependency |
| build.sbt | Enforce ffmpeg/ffprobe presence in Docker build; pin base image |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Address #8 and mbari-org/vars-feedback#334