← Back to PRs

#10966: Refactor frame.sh for improved argument handling

by sachin915t open 2026-02-07 07:20 View on GitHub →
stale
Hi, I’ve added a small, self-contained Bash script that simplifies extracting a single frame from a video using ffmpeg. It includes basic validation and a clean CLI interface. Happy to adjust the implementation or style if needed. <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> - Refactors `skills/video-frames/scripts/frame.sh` to tighten argument parsing/validation (help handling, required values, mutually exclusive `--time`/`--index`, numeric index check). - Adds an explicit dependency check for `ffmpeg` and simplifies file existence / `--out` enforcement. - Adjusts ffmpeg invocation flags (`-frames:v 1`) and keeps output path printing conditional on output file creation. <h3>Confidence Score: 4/5</h3> - This PR is largely safe to merge, but the `--time` ffmpeg invocation currently uses a slow seek mode. - Changes are confined to a single bash script and add sensible argument/ffmpeg validation. The main functional issue is the placement of `-ss` after `-i`, which will cause noticeably worse performance for time-based extraction on many videos; otherwise behavior is straightforward. - skills/video-frames/scripts/frame.sh <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> **Context used:** - Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8)) - Context from `dashboard` - AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=0d0c8278-ef8e-4d6c-ab21-f5527e322f13)) <!-- /greptile_comment -->

Most Similar PRs