SkillsGrove
SkillsGrove/영상 제작/jholhewres/devclaw-skills/video-tools

video-tools

설치

$npx skills add https://github.com/jholhewres/devclaw-skills --skill video-tools
$git clone --depth 1 https://github.com/jholhewres/devclaw-skills.git /tmp/devclaw-skills && mkdir -p ~/.claude/skills && cp -r /tmp/devclaw-skills/skills/video-tools ~/.claude/skills/video-tools
이 Agent Skill을 설치해 주세요: https://github.com/jholhewres/devclaw-skills/tree/0177c36eb6dcdfe3f891fd332ef538a3d84cc693/skills/video-tools — 먼저 SKILL.md와 스크립트를 읽고, 안전하다고 확인한 뒤에만 제 skills 폴더에 설치해 주세요.

요약

원문 설명 · MITVideo manipulation — convert, compress, trim, and edit videos with ffmpeg
아래 SKILL.md는 jholhewres/devclaw-skills(커밋 0177c36)에서 MIT 라이선스에 따라 게시한 것입니다. 본문은 변경하지 않았으며, 파일 상단의 메타데이터만 생략하고 이미지는 링크로 표시하며 매우 긴 파일은 일부만 표시합니다. Copyright 2026 DevClaw. 라이선스: LICENSE. 지침 파일만 표시되며 스크립트 등은 원본 저장소를 참고하세요.

Video Tools

Manipulate videos using ffmpeg.

Setup

# Ubuntu/Debian
sudo apt install ffmpeg

# macOS
brew install ffmpeg

# Check installation
ffmpeg -version

Get Video Info

# Basic info
ffprobe -i video.mp4

# Duration only
ffprobe -i video.mp4 -show_entries format=duration -v quiet -of csv="p=0"

# Resolution
ffprobe -i video.mp4 -show_entries stream=width,height -v quiet -of csv="p=0"

# JSON output
ffprobe -i video.mp4 -print_format json -show_format -show_streams

Convert Formats

# MP4 to WebM
ffmpeg -i input.mp4 -c:v libvpx -c:a libvorbis output.webm

# MP4 to MOV
ffmpeg -i input.mp4 -c:v prores -c:a pcm_s16le output.mov

# Any to MP4 (H.264)
ffmpeg -i input.avi -c:v libx264 -c:a aac output.mp4

# MKV to MP4
ffmpeg -i input.mkv -c:v copy -c:a copy output.mp4

# GIF to MP4
ffmpeg -i input.gif -c:v libx264 -pix_fmt yuv420p output.mp4

Compress Video

# Reduce file size (CRF: 0-51, higher = smaller)
ffmpeg -i input.mp4 -c:v libx264 -crf 28 -c:a aac compressed.mp4

# CRF values: 18 (high quality) to 28 (smaller size)
ffmpeg -i input.mp4 -c:v libx264 -crf 23 -preset slow compressed.mp4

# Preset options: ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow

# Scale down for compression
ffmpeg -i input.mp4 -vf "scale=iw/2:ih/2" -c:v libx264 -crf 23 smaller.mp4

# Limit bitrate
ffmpeg -i input.mp4 -b:v 1M -b:a 128k limited.mp4

Resize Video

# Scale to width (keep aspect ratio)
ffmpeg -i input.mp4 -vf "scale=1280:-1" output.mp4

# Scale to height
ffmpeg -i input.mp4 -vf "scale=-1:720" output.mp4

# Exact dimensions
ffmpeg -i input.mp4 -vf "scale=1280x720" output.mp4

# Half size
ffmpeg -i input.mp4 -vf "scale=iw/2:ih/2" output.mp4

Trim Video

# Trim from 10s to 30s
ffmpeg -i input.mp4 -ss 00:00:10 -to 00:00:30 -c copy output.mp4

# Trim from 10s for 20 seconds duration
ffmpeg -i input.mp4 -ss 00:00:10 -t 00:00:20 -c copy output.mp4

# Fast trim (may be less accurate)
ffmpeg -ss 10 -i input.mp4 -t 20 -c copy output.mp4

Extract Audio

# Extract audio to MP3
ffmpeg -i input.mp4 -vn -c:a libmp3lame -q:a 2 audio.mp3

# Extract audio to AAC
ffmpeg -i input.mp4 -vn -c:a aac -b:a 192k audio.aac

# Extract audio without re-encoding
ffmpeg -i input.mp4 -vn -c:a copy audio.aac

Add Audio to Video

# Add audio track
ffmpeg -i video.mp4 -i audio.mp3 -c:v copy -c:a aac -map 0:v:0 -map 1:a:0 output.mp4

# Replace audio
ffmpeg -i video.mp4 -i audio.mp3 -c:v copy -c:a aac -map 0:v:0 -map 1:a:0 -shortest output.mp4

Create GIF

# Video to GIF
ffmpeg -i input.mp4 -vf "fps=10,scale=320:-1" output.gif

# High quality GIF with palette
ffmpeg -i input.mp4 -vf "fps=15,scale=480:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" output.gif

# Trim and convert to GIF
ffmpeg -ss 5 -t 3 -i input.mp4 -vf "fps=10,scale=320:-1" clip.gif

Combine Videos

# Concatenate videos
ffmpeg -f concat -safe 0 -i filelist.txt -c copy output.mp4

# filelist.txt content:
# file 'video1.mp4'
# file 'video2.mp4'
# file 'video3.mp4'

# Or inline
ffmpeg -i "concat:video1.mp4|video2.mp4" -c copy output.mp4

Add Watermark

# Add image watermark (bottom right)
ffmpeg -i input.mp4 -i watermark.png -filter_complex "overlay=W-w-10:H-h-10" output.mp4

# Add text watermark
ffmpeg -i input.mp4 -vf "drawtext=text='Watermark':fontcolor=white:fontsize=24:x=W-w-10:y=H-h-10" output.mp4

Tips

  • Use -c copy to avoid re-encoding (much faster)
  • Use -ss before -i for fast seeking
  • CRF 23 is good default for quality/size balance
  • Use -preset slow for better compression
  • Check codec support for target platform

Triggers

video, ffmpeg, convert video, compress video, trim video, video editing, extract audio, video to gif

라이선스 전문 보기(MIT)
MIT License

Copyright (c) 2026 DevClaw

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.