#10966: Refactor frame.sh for improved argument handling
stale
Cluster:
Feishu Streaming Enhancements
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
#9505: fix: Refactor Feishu streaming to prevent truncation and simplify s...
by zhangyi-extra · 2026-02-05
68.9%
#3933: fix(skills): Make skill scripts executable
by jaysonsantos · 2026-01-29
68.5%
#6110: refactor: simplify boolean logic using nullish coalescing
by T1mn · 2026-02-01
68.3%
#3872: improve bash-tools.exec.ts code quality
by Bestom927 · 2026-01-29
68.0%
#10422: break down the install md into two differnt bash line
by woponi · 2026-02-06
67.6%
#23720: Feat/cli backend runtime tuning
by wanmorebot · 2026-02-22
67.2%
#7083: 说明文档
by 1213718318 · 2026-02-02
67.1%
#7316: fix: /chat dashboard performance
by felipcsousa · 2026-02-02
66.9%
#18915: fix(telegram): pass video width/height to sendVideo to prevent portra…
by storyarcade · 2026-02-17
66.6%
#11951: Prepending Windows Node to PATH didn’t help
by tranhoangtu-it · 2026-02-08
66.0%