FFmpeg 影音速查表
FFmpeg 影音 CLI 實用配方:無損重封裝 (remux)、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.