Auto clipper

From oyi77/1ai-skills · View interactive version

Auto clipper is an AI agent skill from the GitHub repository oyi77/1ai-skills. Use when automatically clip long videos into short, engaging highlights for TikTok, Reels, and YouTube Shorts. Auto-detects scene changes, audio energy peaks, and transitions to create viral clips with professional quality.

How to use this skill

Skill file

Auto Clipper — Auto-Generated Video Highlights

When to Use

Trigger phrases:

Use cases:

When NOT to use:

Overview

Auto Clipper uses ffmpeg and Python to automatically detect engaging moments in long videos and generate professional short clips. Works with any video format ffmpeg supports.

Workflow

  1. Define brief — Set objectives, audience, and style guidelines
  2. Analyze video — Detect scene changes and audio energy peaks
  3. Find engaging moments — Combine visual and audio signals to identify highlights
  4. Extract clips — Cut segments around identified moments
  5. Optimize & publish — Apply quality filters and export for target platforms

Quality Checklist

Tools

Anti-Rationalization Table

| Rationalization | Reality |

|---|---|

| "Good enough content works" | Quality content drives engagement. Mediocre content gets ignored. |

| "I will optimize later" | SEO and distribution need optimization from the start. |

| "Templates are good enough" | Templates are a starting point. Custom content outperforms generic. |

Implementation Example

# Basic usage with default settings
python3 auto_clipper.py --input long_video.mp4 --output clips/

# Custom parameters
python3 auto_clipper.py \
  --input long_video.mp4 \
  --output clips/ \
  --min-duration 5 \
  --max-duration 15 \
  --scene-threshold 0.3 \
  --audio-threshold 0.7 \
  --fade-in 0.5 \
  --fade-out 0.5

Technical Approach

  1. Scene Detection:

```bash

ffmpeg -i input.mp4 -vf "select='gt(scene,0.3)',showinfo" -f null - 2>&1 | grep "pts_time"

```

  1. Audio Analysis:

```bash

ffmpeg -i input.mp4 -af "astats=reset=0:measure_perframe=1" -f null - 2>&1 | grep "stdburst"

```

  1. Clip Extraction:

```bash

ffmpeg -i input.mp4 -ss 00:00:05 -t 00:00:10 -c copy output.mp4

```

  1. Beat-Snapped Cutting (optional, requires librosa):

Configuration Parameters

| Parameter | Default | Description |

|-----------|---------|-------------|

| --min-duration | 5 | Minimum clip length (seconds) |

| --max-duration | 15 | Maximum clip length (seconds) |

| --scene-threshold | 0.3 | Scene change sensitivity (0.0-1.0) |

| --audio-threshold | 0.7 | Audio energy threshold (0.0-1.0) |

| --fade-in | 0.5 | Fade-in duration (seconds) |

| --fade-out | 0.5 | Fade-out duration (seconds) |

| --quality | 20 | CRF value for encoding (lower = better) |

| --beat-align | off | Snap clip starts to a trustworthy librosa beat grid |

Verification Checklist

Dependencies

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.