agentsclimarketplace

Ffmpeg

Skill sakydev/claude/skills/ffmpeg

Use this skill whenever the user asks to process, convert, compress, trim, merge, extract, or otherwise manipulate video or audio files using ffmpeg. Covers format conversion, compression, clipping, filtering, and any other ffmpeg operation.From its SKILL.md

Install
npx -y skills add sakydev/claude --skill ffmpeg

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.9 KB, 747 tokens by cl100k_base, as published. Nobody here has run it

FFmpeg Skill

Hard rules

  1. Never overwrite the original. Write to a new file. Derive the name if none given: video.mp4 becomes video_compressed.mp4. Never use -y on the same path as the input.

  2. Never destroy quality. Minimum floors:

    CodecFlagFloorGood default
    H.264 (libx264)-crf28 max18-23
    H.265 (libx265)-crf32 max24-28
    VP9 (libvpx-vp9)-crf40 max31-36
    AAC-b:a128k min192k
    MP3-q:a4 max2

    If the target size requires going below these floors, say so. Offer the best size achievable at the floor instead.

  3. File over 1 GB? Stop. Say: "This file is [size]. Processing will take a while and produce large intermediates. Continue?" Only proceed with confirmation.

Step 1 — Inspect first

Always run this before building any command:

ffprobe -v quiet -print_format json -show_format -show_streams "<input>"

Read the size, codec, resolution, bitrate, duration. Check the 1 GB rule here.

Step 2 — Pick the right approach

Compression: libx264 -crf 23 -preset slow. Copy audio unless asked otherwise: -c:a copy.

Format conversion: If only the container changes, use -c copy. No re-encode. No quality loss. Instant.

Trimming: -ss before -i for fast seek. -c copy when possible.

Audio extraction: -vn -c:a copy to extract without re-encoding.

Scaling: -vf scale=1280:-2 to preserve aspect ratio. Always pair with a re-encode.

Step 3 — Show the command before running

ffmpeg -i "input.mp4" -c:v libx264 -crf 23 -preset slow -c:a copy "input_compressed.mp4"
# -crf 23     : quality (lower = better)
# -preset slow : smaller file, same quality
# -c:a copy   : audio untouched

Show it. Explain non-obvious flags. Ask before running on large files or long operations.

Step 4 — Report after

  • Original size vs output size.
  • Any quality warnings from stderr.
  • Output file path.

Output larger than input? Flag it. Suggest -c copy if applicable.

Concerns

SituationSay
Target size needs CRF above floor"Hitting [size] needs CRF [N]. Below acceptable quality. Best I can do at the floor is [size]."
User says "compress as much as possible""How small do you need it? Below CRF [N] it degrades noticeably."
Input already matches target format"Already [format]. I can remux without re-encoding. Lossless and instant."
User asks to overwrite original"Not overwriting the original. Saving as [derived name] instead."
File over 1 GBStop. Confirm before proceeding.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.