agentleFS
coolxeocoolxeo/grok-bot-skills/skills/video/shorts-reframe/SKILL.md

shorts-reframe

Skill8 starsChanged 2 days agoMITView on GitHub

Use this when turning a 16:9 video into 9:16 with a fixed center crop, scaling to 1080x1920, keeping the audio, and checking duration and resolution.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If the source has no audio, drop -c:a copy.

    line 22
  2. Distinctive:

    After the encode, confirm the output is 1080x1920 and that its duration matches the source (within a frame or two):

    line 26

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Shorts reframe

Turn one landscape (16:9) clip into a vertical (9:16) clip with a fixed center crop. Do not pan, zoom, or pad with letterboxing.

Command

Crop the full height to a centered 9:16 slice, then scale to 1080x1920. Copy the audio as-is (-c:a copy). Video must be re-encoded because a crop changes the pixels.

ffmpeg -i input.mp4 -vf "crop=ih*9/16:ih,scale=1080:1920" -c:a copy output.mp4

crop=ih*9/16:ih keeps the input height and sets the width to height × 9/16. When x and y are omitted, the crop filter centers the rectangle (x defaults to (in_w-out_w)/2). The expression works at any 16:9 source size (1920x1080, 1280x720, and so on).

If the source has no audio, drop -c:a copy. If the subject sits off-center, set x explicitly instead of relying on the default, for example crop=ih*9/16:ih:(iw-ih*9/16)/3:0. This skill stays on a fixed crop; do not animate the window.

Checks

After the encode, confirm the output is 1080x1920 and that its duration matches the source (within a frame or two):

ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of default=noprint_wrappers=1 output.mp4
ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1 input.mp4
ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1 output.mp4

Width must be 1080 and height 1920. If duration drifted, re-run and check you did not add -t, -ss, or a mismatched -shortest flag.

Inspired by

Inspired by the FFmpeg crop filter docs (crop=w:h:x:y, ih/iw, and centered defaults) and the mediacodec.dev crop guide (crop=ih*9/16:ih with -c:a copy). The official docs are a filter reference, not a 16:9-to-9:16 recipe; the guide has the centered crop but not a scale to 1080x1920 or duration and resolution checks. This skill adds the complete command and those two checks.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.