一 ffmpeg 命令
ffmpeg arg1 arg2 -i arg3 arg4 arg5
ffmpeg 全局参数 输入文件参数 -i 输入文件 输出文件参数 输出文件
arg1:全局参数
arg2:输入文件参数
arg3:输入文件
arg4:输出文件参数
arg5:输出文件
二 ffprobe 命令
ffprobe [OPTIONS] [INPUT_FILE]
# OPTIONS:参数
# INPUT_FILE:输入文件
三 ffplay 命令
ffplay [options] input_file
# options:参数
# input_file:输入文件
四 hide_banner
增加-hide_bannder参数可以隐藏一些冗余的描述信息,可以去实践比较以下2条命令的区别:
ffprobe xx.mp3
ffprobe -hide_banner xx.mp3
# ffmpeg、ffprobe、ffplay都适用
五 通过命令行录音
在 windows, linux,mac 上 的 多媒体库 是不一样的,因此我们先要看一下 当前系统的 多媒体库 是啥
5.1 查看当前系统的媒体库是啥?
ffmpeg -devices
Windows的输出结果如下所示:
- 列表中有个dshow,全名叫DirectShow,是Windows平台的多媒体系统库
- 我们可以使用dshow去操作多媒体输入设备(比如录音设备)
C:\Users\Administrator>ffmpeg -hide_banner -devices
Devices:
D. = Demuxing supported
.E = Muxing supported
--
E caca caca (color ASCII art) output device
D dshow DirectShow capture
D gdigrab GDI API Windows frame grabber
D lavfi Libavfilter virtual input device
D libcdio
E sdl,sdl2 SDL2 output device
D vfwcap VfW video capture
linux 上是这样的
- 列表中有个alsa,是linux平台的多媒体系统库
- 我们可以使用alsa去操作多媒体输入设备(比如录音设备)
ffmpeg version 7.0 Copyright (c) 2000-2024 the FFmpeg developers
built with gcc 13 (Ubuntu 13.2.0-23ubuntu4)
configuration: --prefix=/home/hunandede/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/hunandede/ffmpeg_build/include --extra-ldflags=-L/home/hunandede/ffmpeg_build/lib --extra-libs='-lpthread -lm' --bindir=/home/hunandede/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3la


562

被折叠的 条评论
为什么被折叠?



