ffmpeg

CLI

Complete, cross-platform solution for recording, converting, and streaming audio/video.

Convert, compress, trim, and process audio and video files

5 curated recipes · not yet executed by the harness#video#audio#convert#encode

Recipes

Curated from documentation and usage. Percentages are estimates, not measurements.

Convert MP4 to GIF

~92% est.
ffmpeg -i input.mp4 -vf 'fps=10,scale=640:-1' -loop 0 output.gif
Common failures (2)
  • GIF is huge file sizeLower fps (fps=10) and scale (scale=480:-1)
  • GIF looks washed outAdd palettegen: ffmpeg -i input.mp4 -vf palettegen palette.png && ffmpeg -i input.mp4 -i palette.png -filter_complex paletteuse output.gif

Extract audio from video

~97% est.
ffmpeg -i video.mp4 -vn -acodec mp3 -ab 192k audio.mp3

Trim video to a time range

~96% est.
ffmpeg -i input.mp4 -ss 00:01:00 -to 00:02:30 -c copy output.mp4
Common failures (1)
  • Trim not accuratePut -ss before -i for fast seek: ffmpeg -ss 00:01:00 -i input.mp4 -to 00:01:30 -c copy output.mp4

Convert video to a different format

~94% est.
ffmpeg -i input.avi -c:v libx264 -crf 23 -c:a aac output.mp4

Compress video for web

~93% est.
ffmpeg -i input.mp4 -vcodec libx264 -crf 28 -preset fast output.mp4
Common failures (1)
  • Output too largeIncrease crf value (28-32 for smaller size)

Install

Homebrewbrew install ffmpeg

Agent notes

When to use
Any audio/video format conversion or media processing task
Quick examples
  • ffmpeg -i input.mp4 output.gif
  • ffmpeg -i video.mp4 -vn audio.mp3

Use from an agent

curl -s https://clihub.com/api/tools/ffmpeg | jq '.agentHints.provenRecipes[] | {task, command, verified}'

Or call get_tool with slug ffmpeg on the MCP server at https://clihub.com/mcp.

Homepage ↗Repository ↗LGPL-2.1 / GPL-2.00 views