Back to skills
SkillHub ClubShip Full StackFull Stack

ffmpeg-cli

Imported from https://github.com/openclaw/skills.

Packaged view

This page reorganizes the original catalog entry around fit, installability, and workflow context first. The original raw source lives below.

Stars
3,085
Hot score
99
Updated
March 20, 2026
Overall rating
C0.0
Composite score
0.0
Best-practice grade
F32.4

Install command

npx @skill-hub/cli install openclaw-skills-ffmpeg-cli

Repository

openclaw/skills

Skill path: skills/ascendswang/ffmpeg-cli

Imported from https://github.com/openclaw/skills.

Open repository

Best for

Primary workflow: Ship Full Stack.

Technical facets: Full Stack.

Target audience: everyone.

License: Unknown.

Original source

Catalog source: SkillHub Club.

Repository owner: openclaw.

This is still a mirrored public skill entry. Review the repository before installing into production workflows.

What it helps with

  • Install ffmpeg-cli into Claude Code, Codex CLI, Gemini CLI, or OpenCode workflows
  • Review https://github.com/openclaw/skills before adding ffmpeg-cli to shared team environments
  • Use ffmpeg-cli for development workflows

Works across

Claude CodeCodex CLIGemini CLIOpenCode

Favorites: 0.

Sub-skills: 0.

Aggregator: No.

Original source / Raw SKILL.md

---
name: ffmpeg-cli
description: Comprehensive video/audio processing with FFmpeg. Use for: (1) Video transcoding and format conversion, (2) Cutting and merging clips, (3) Audio extraction and manipulation, (4) Thumbnail and GIF generation, (5) Resolution scaling and quality adjustment, (6) Adding subtitles or watermarks, (7) Speed adjustment (slow/fast motion), (8) Color correction and filters.
metadata: {"clawdbot":{"emoji":"🎬","requires":{"bins":["ffmpeg"]},"install":[{"id":"brew","kind":"brew","formula":"ffmpeg","bins":["ffmpeg"],"label":"Install ffmpeg (brew)"}]}}
---

# FFmpeg CLI

## Quick Reference

| Task | Command |
|------|---------|
| Cut video | `{baseDir}/scripts/cut.sh -i <input> -s <start> -e <end> -o <output>` |
| Merge clips | `{baseDir}/scripts/merge.sh -o <output> <file1> <file2> ...` |
| Extract audio | `{baseDir}/scripts/extract-audio.sh -i <video> -o <output.mp3>` |
| Generate thumbnail | `{baseDir}/scripts/thumb.sh -i <video> -t <timestamp> -o <out.jpg>` |
| Create GIF | `{baseDir}/scripts/gif.sh -i <video> -s <start> -e <end> -o <out.gif>` |
| Convert format | `{baseDir}/scripts/convert.sh -i <input> -o <output.mp4>` |
| Change speed | `{baseDir}/scripts/speed.sh -i <input> -r <0.5-2.0> -o <output>` |
| Add watermark | `{baseDir}/scripts/watermark.sh -i <video> -w <image> -o <output>` |

## Scripts

### cut.sh - Cut video segment
```bash
{baseDir}/scripts/cut.sh -i video.mp4 -s 00:01:30 -e 00:02:45 -o clip.mp4
```

### merge.sh - Concatenate videos
```bash
{baseDir}/scripts/merge.sh -o merged.mp4 part1.mp4 part2.mp4 part3.mp4
```

### extract-audio.sh - Pull audio track
```bash
{baseDir}/scripts/extract-audio.sh -i video.mp4 -o audio.mp3
```

### thumb.sh - Extract frame as image
```bash
{baseDir}/scripts/thumb.sh -i video.mp4 -t 00:00:15 -o frame.jpg
```

### gif.sh - Convert clip to GIF
```bash
{baseDir}/scripts/gif.sh -i video.mp4 -s 00:00:10 -e 00:00:15 -o clip.gif
```

### convert.sh - Transcode to new format
```bash
{baseDir}/scripts/convert.sh -i input.avi -o output.mp4
```

### speed.sh - Adjust playback speed
```bash
{baseDir}/scripts/speed.sh -i video.mp4 -r 2.0 -o fast.mp4  # 2x speed
{baseDir}/scripts/speed.sh -i video.mp4 -r 0.5 -o slow.mp4  # 0.5x speed
```

### watermark.sh - Overlay image watermark
```bash
{baseDir}/scripts/watermark.sh -i video.mp4 -w logo.png -o output.mp4
```

## Notes

- All scripts support common video formats (mp4, avi, mov, mkv, webm, etc.)
- Output quality is optimized for balanced file size and clarity
- Use `-h` or no args to see script usage


---

## Skill Companion Files

> Additional files collected from the skill directory layout.

### _meta.json

```json
{
  "owner": "ascendswang",
  "slug": "ffmpeg-cli",
  "displayName": "FFmpeg CLI",
  "latest": {
    "version": "1.0.0",
    "publishedAt": 1769579607401,
    "commit": "https://github.com/clawdbot/skills/commit/fd4befa38039836e5b862b52525bc37270b37f02"
  },
  "history": []
}

```

### scripts/convert.sh

```bash
#!/bin/bash
# Convert video to different format
set -e

usage() {
    echo "Usage: $0 -i <input> -o <output>"
    echo "  -i <input>    Input file"
    echo "  -o <output>   Output file (extension determines format)"
    exit 1
}

while getopts "i:o:h" opt; do
    case $opt in
        i) INPUT="$OPTARG" ;;
        o) OUTPUT="$OPTARG" ;;
        h) usage ;;
        *) usage ;;
    esac
done

[ -z "$INPUT" ] || [ -z "$OUTPUT" ] && usage

ffmpeg -i "$INPUT" -c:v libx264 -crf 23 -c:a aac -b:a 128k -y "$OUTPUT"
echo "βœ… Converted: $OUTPUT"

```

### scripts/cut.sh

```bash
#!/bin/bash
# Cut video segment without re-encoding (fast)
set -e

usage() {
    echo "Usage: $0 -i <input> -s <start> -e <end> -o <output>"
    echo "  -i <input>    Input video file"
    echo "  -s <start>    Start time (HH:MM:SS or seconds)"
    echo "  -e <end>      End time (HH:MM:SS or seconds)"
    echo "  -o <output>   Output file"
    exit 1
}

while getopts "i:s:e:o:h" opt; do
    case $opt in
        i) INPUT="$OPTARG" ;;
        s) START="$OPTARG" ;;
        e) END="$OPTARG" ;;
        o) OUTPUT="$OPTARG" ;;
        h) usage ;;
        *) usage ;;
    esac
done

[ -z "$INPUT" ] || [ -z "$START" ] || [ -z "$END" ] || [ -z "$OUTPUT" ] && usage

ffmpeg -i "$INPUT" -ss "$START" -to "$END" -c copy -y "$OUTPUT"
echo "βœ… Cut complete: $OUTPUT"

```

### scripts/extract-audio.sh

```bash
#!/bin/bash
# Extract audio from video
set -e

usage() {
    echo "Usage: $0 -i <video> -o <output.mp3>"
    echo "  -i <video>    Input video file"
    echo "  -o <output>   Output audio file (mp3/aac)"
    exit 1
}

while getopts "i:o:h" opt; do
    case $opt in
        i) INPUT="$OPTARG" ;;
        o) OUTPUT="$OPTARG" ;;
        h) usage ;;
        *) usage ;;
    esac
done

[ -z "$INPUT" ] || [ -z "$OUTPUT" ] && usage

ffmpeg -i "$INPUT" -vn -acodec libmp3lame -q:a 2 -y "$OUTPUT"
echo "βœ… Audio extracted: $OUTPUT"

```

### scripts/gif.sh

```bash
#!/bin/bash
# Convert video to GIF
set -e

usage() {
    echo "Usage: $0 -i <video> -s <start> -e <end> -o <output.gif>"
    echo "  -i <video>    Input video file"
    echo "  -s <start>    Start time (HH:MM:SS or seconds)"
    echo "  -e <end>      End time (HH:MM:SS or seconds)"
    echo "  -o <output>   Output GIF file"
    exit 1
}

while getopts "i:s:e:o:h" opt; do
    case $opt in
        i) INPUT="$OPTARG" ;;
        s) START="$OPTARG" ;;
        e) END="$OPTARG" ;;
        o) OUTPUT="$OPTARG" ;;
        h) usage ;;
        *) usage ;;
    esac
done

[ -z "$INPUT" ] || [ -z "$START" ] || [ -z "$END" ] || [ -z "$OUTPUT" ] && usage

# Scale to reasonable size for GIF
ffmpeg -ss "$START" -to "$END" -i "$INPUT" -vf "fps=10,scale=480:-1:flags=lanczos" -c:v gif -y "$OUTPUT"
echo "βœ… GIF created: $OUTPUT"

```

### scripts/merge.sh

```bash
#!/bin/bash
# Merge multiple video files
set -e

usage() {
    echo "Usage: $0 -o <output> <file1> <file2> ..."
    echo "  -o <output>   Output file"
    echo "  <files...>    Input video files"
    exit 1
}

OUTPUT=""

while getopts "o:h" opt; do
    case $opt in
        o) OUTPUT="$OPTARG" ;;
        h) usage ;;
        *) usage ;;
    esac
done

shift $((OPTIND-1))

[ -z "$OUTPUT" ] && usage
[ $# -eq 0 ] && usage

# Create file list for ffmpeg concat
TEMP_LIST=$(mktemp /tmp/ffmpeg_merge_XXXXXX.txt)
for f in "$@"; do
    echo "file '$f'" >> "$TEMP_LIST"
done

ffmpeg -f concat -safe 0 -i "$TEMP_LIST" -c copy -y "$OUTPUT"
rm -f "$TEMP_LIST"

echo "βœ… Merge complete: $OUTPUT"

```

### scripts/speed.sh

```bash
#!/bin/bash
# Change video playback speed
set -e

usage() {
    echo "Usage: $0 -i <input> -r <rate> -o <output>"
    echo "  -i <input>    Input video file"
    echo "  -r <rate>     Speed rate (0.5 = half speed, 2.0 = double speed)"
    echo "  -o <output>   Output file"
    exit 1
}

RATE=1.0

while getopts "i:r:o:h" opt; do
    case $opt in
        i) INPUT="$OPTARG" ;;
        r) RATE="$OPTARG" ;;
        o) OUTPUT="$OPTARG" ;;
        h) usage ;;
        *) usage ;;
    esac
done

[ -z "$INPUT" ] || [ -z "$RATE" ] || [ -z "$OUTPUT" ] && usage

# Use atempo for 0.5-2.0 range, chain for beyond
if (( $(echo "$RATE > 2.0" | bc -l) )); then
    FILTERS="atempo=2.0,atempo=$(echo "$RATE/2" | bc -l)"
elif (( $(echo "$RATE < 0.5" | bc -l) )); then
    FILTERS="atempo=0.5,atempo=$(echo "$RATE*2" | bc -l)"
else
    FILTERS="atempo=$RATE"
fi

ffmpeg -i "$INPUT" -filter:a "$FILTERS" -filter:v "setpts=${RATE}*PTS" -c:v libx264 -crf 23 -c:a aac -y "$OUTPUT"
echo "βœ… Speed adjusted ($RATEx): $OUTPUT"

```

### scripts/thumb.sh

```bash
#!/bin/bash
# Generate thumbnail from video
set -e

usage() {
    echo "Usage: $0 -i <video> [-t <timestamp>] -o <output.jpg>"
    echo "  -i <video>     Input video file"
    echo "  -t <timestamp> Timestamp for frame (default: 00:00:01)"
    echo "  -o <output>    Output image file"
    exit 1
}

TIMESTAMP="00:00:01"

while getopts "i:t:o:h" opt; do
    case $opt in
        i) INPUT="$OPTARG" ;;
        t) TIMESTAMP="$OPTARG" ;;
        o) OUTPUT="$OPTARG" ;;
        h) usage ;;
        *) usage ;;
    esac
done

[ -z "$INPUT" ] || [ -z "$OUTPUT" ] && usage

ffmpeg -ss "$TIMESTAMP" -i "$INPUT" -vframes 1 -q:v 2 -y "$OUTPUT"
echo "βœ… Thumbnail saved: $OUTPUT"

```

### scripts/watermark.sh

```bash
#!/bin/bash
# Add watermark to video
set -e

usage() {
    echo "Usage: $0 -i <video> -w <watermark> -o <output>"
    echo "  -i <video>      Input video file"
    echo "  -w <watermark>  Watermark image file"
    echo "  -o <output>     Output file"
    exit 1
}

POS="10:10"  # Default: top-left

while getopts "i:w:o:p:h" opt; do
    case $opt in
        i) INPUT="$OPTARG" ;;
        w) WATERMARK="$OPTARG" ;;
        o) OUTPUT="$OPTARG" ;;
        p) POS="$OPTARG" ;;
        h) usage ;;
        *) usage ;;
    esac
done

[ -z "$INPUT" ] || [ -z "$WATERMARK" ] || [ -z "$OUTPUT" ] && usage

ffmpeg -i "$INPUT" -i "$WATERMARK" -filter_complex "[0:v][1:v] overlay=$POS" -c:a copy -y "$OUTPUT"
echo "βœ… Watermark added: $OUTPUT"

```

ffmpeg-cli | SkillHub