## ffmpeg 命令 ### ffmpeg ```Shell usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}... ffmpeg {1} {2} -i {3} {4} {5} 1. 全局参数 2. 输入文件参数 3. 输入文件 4. 输出文件参数 5. 输出文件 ``` #### 查看基本信息 ```Shell ffmpeg -h ``` #### 查看高级信息 ```Shell ffmpeg -h long ``` #### 查看全部信息 ```Shell ffmpeg -h full ``` #### 版本 ```Shell ffmpeg -version ``` #### 设备 ```Shell ffmpeg -devices ``` #### 编译配置 ```Shell ffmpeg -buildconf ``` #### 可用格式 ```Shell ffmpeg -formats ##### 复用器 ffmpeg -muxers ##### 解复用器 ffmpeg -demuxers ##### 解/复用器 help 指定查询 ffmpeg -h muxer=mp4 ffmpeg -h demuxer=mp4 ``` #### 编解码器 ```Shell ffmpeg -codecs ##### 解码器 ffmpeg -decoders ##### 编码器 ffmpeg -encoders ##### 编解码 help 指定查询 ffmpeg -h decoder=h264 ffmpeg -h encoder=libx264 ``` #### bit流 filter ```Shell ffmpeg -bsfs ``` #### 协议 ```Shell ffmpeg -protocols ``` #### 过滤器 ```Shell ffmpeg -filters ##### 过滤器 help 指定查询 ffmpeg -h filter=gblur ``` #### 像素格式 ```Shell ffmpeg -pix_fmts ``` #### 标准声道名称 ```Shell ffmpeg -layouts ``` #### 可用音频采样率 ```Shell ffmpeg -sample_fmts ``` #### 可用颜色名称 ```Shell ffmpeg -colors ``` ### ffmpeg 转码过程 ![img.png](img.png) ### 简单过滤器 ![img_1.png](img_1.png) ### 复杂过滤器 ![img_2.png](img_2.png)