FFmpegチートシート
FFmpeg 音声・動画 CLI レシピ:再エンコードなしの再多重化、H.264/H.265 トランスコード、トリミング、リサイズ、GIF 書き出し、連結、メディア情報の検査。
動作の仕組み
FFmpeg processes media as a pipeline: `[input options] -i input [output options] output`. Flags apply to the NEXT `-i` or NEXT output file; `-c copy` remuxes streams without re-encoding.
サバイバルキット
最初に覚えるべき最小限のコマンド。
40 件のコマンド
Inspect & Lossless Remux
Probe stream codecs with ffprobe and rewrap containers instantly with `-c copy`.
- 基本
Inspect codecs, resolution, FPS, bitrate, and streams cleanly
ffprobe -hide_banner <input>コマンドを組み立てる
ffprobe -hide_banner <input>値は入力した通りにそのまま挿入されます。空白や特殊文字を含む場合は、必要に応じて引用符で囲んでください。
使いどころ
Always check source codecs first so you know when lossless `-c copy` is possible.
コマンドの内訳
- -hide_banner
- Omit verbose FFmpeg compile configuration header
実例
ffprobe -hide_banner clip.mp4
Trim, Split & Concatenate
Cut time ranges accurately, concat clips, and reverse/loop media.
Video Codecs, Quality & Scaling
Compress H.264/H.265 cleanly for web playback and resize safely.
Audio, Volume & Subtitles
Extract, normalize, replace, mute audio, and handle subtitles.
Thumbnails, GIFs & Image Sequences
Generate high-quality palettes, extract frames, or turn stills into video.