Skip to content
cccskills
FreePublished on GitHub

ffmpeg-format-conversion

Convert media files between formats - video containers, audio formats, and codec transcoding

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md2.7 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

FFmpeg Format Conversion Skill

Convert media files between different formats and containers.

When to Use

  • Convert video containers (MP4, MKV, AVI, etc.)
  • Convert audio formats (MP3, AAC, WAV, etc.)
  • Transcode to different codecs
  • Copy streams without re-encoding (fast)

Basic Conversion

# Convert container format (re-encode)
ffmpeg -i input.avi output.mp4

# Copy streams without re-encoding (fast, no quality loss)
ffmpeg -i input.mp4 -c copy output.mkv

# Convert with specific codec
ffmpeg -i input.mp4 -c:v libx264 -c:a aac output.mp4

Video Codec Conversion

# H.264
ffmpeg -i input.mp4 -c:v libx264 output.mp4

# H.265 (better compression)
ffmpeg -i input.mp4 -c:v libx265 output.mp4

# VP9 (web optimized)
ffmpeg -i input.mp4 -c:v libvpx-vp9 output.webm

# AV1 (modern codec)
ffmpeg -i input.mp4 -c:v libaom-av1 output.mp4

Audio Format Conversion

# MP3
ffmpeg -i input.wav -acodec libmp3lame -q:a 2 output.mp3

# AAC
ffmpeg -i input.wav -c:a aac -b:a 192k output.m4a

# Opus (best quality/bitrate)
ffmpeg -i input.wav -c:a libopus -b:a 128k output.opus

# FLAC (lossless)
ffmpeg -i input.wav -c:a flac output.flac

Quality Settings

# CRF (Constant Rate Factor) - lower is better quality
ffmpeg -i input.mp4 -c:v libx264 -crf 23 output.mp4

# Bitrate
ffmpeg -i input.mp4 -b:v 2M -b:a 192k output.mp4

# Two-pass encoding (best quality)
ffmpeg -i input.mp4 -c:v libx264 -b:v 2M -pass 1 -f null /dev/null
ffmpeg -i input.mp4 -c:v libx264 -b:v 2M -pass 2 output.mp4

Presets

# Encoding speed presets (faster = larger file)
ffmpeg -i input.mp4 -c:v libx264 -preset fast output.mp4
# Options: ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow

# Quality presets
ffmpeg -i input.mp4 -c:v libx264 -preset slow -crf 18 output.mp4

Batch Conversion

# Convert all MKV to MP4
for f in *.mkv; do
  ffmpeg -i "$f" -c copy "${f%.mkv}.mp4"
done

# Convert with re-encoding
for f in *.avi; do
  ffmpeg -i "$f" -c:v libx264 -c:a aac "${f%.avi}.mp4"
done

Common Codecs

Video

  • H.264 (libx264) - Universal compatibility
  • H.265 (libx265) - Better compression
  • VP9 (libvpx-vp9) - Open standard
  • AV1 (libaom-av1) - Modern codec

Audio

  • AAC (aac) - Universal
  • MP3 (libmp3lame) - Legacy
  • Opus (libopus) - Best quality/bitrate
  • FLAC (flac) - Lossless

Notes

  • Use -c copy when possible for speed (no re-encoding)
  • Re-encoding is slower but allows codec/quality changes
  • CRF 18-23 is good quality range for H.264
  • Preset affects encoding speed vs file size tradeoff

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Perform various data analysis on SEC 13-F and obtain some insights of fund activities such as number of holdings, AUM, and change of holdings between two quarters.

The English summary is being prepared. Showing the original description.

benchflow-ai/skillsbench1.9KUpdated Oct 13, 2026

AC branch pi-model power flow equations (P/Q and |S|) with transformer tap ratio and phase shift, matching `acopf-math-model.md` and MATPOWER branch fields. Use when computing branch flows in either direction, aggregating bus injections for nodal balance, checking MVA (rateA) limits, computing branch loading %, or debugging sign/units issues in AC power flow.

The English summary is being prepared. Showing the original description.

benchflow-ai/skillsbench1.9KUpdated Oct 13, 2026

Redact text from PDF documents for blind review anonymization

The English summary is being prepared. Showing the original description.

benchflow-ai/skillsbench1.9KUpdated Oct 13, 2026

Use when checking simplified ADA-derived plan-view bathroom accessibility constraints such as turning space, door clear width, toilet centerline, grab bars, and lavatory knee/toe clearance.

The English summary is being prepared. Showing the original description.

benchflow-ai/skillsbench1.9KUpdated Oct 13, 2026

Analyze failed GitHub Action jobs for a pull request.

The English summary is being prepared. Showing the original description.

benchflow-ai/skillsbench1.9KUpdated Oct 13, 2026

Use when extracting plan-view architectural geometry from DXF files with semantic CAD layers, especially when outputs must normalize rooms, doors, fixtures, clearances, and grab bars into machine-checkable JSON.

The English summary is being prepared. Showing the original description.

benchflow-ai/skillsbench1.9KUpdated Oct 13, 2026

See all skills by benchflow-ai

Report a problem with this skill