ffmpeg -devices
// 结果如下:
Devices:
D. = Demuxing supported
.E = Muxing supported
--
D dshow DirectShow capture // DirectShow,是Windows平台的多媒体系统库
D gdigrab GDI API Windows frame grabber
D lavfi Libavfilter virtual input device
E sdl,sdl2 SDL2 output device
D vfwcap VfW video capture
查看当前平台支持的设备
ffmpeg -f dshow -list_devices true -i dummy
// 结果如下:
DirectShow video devices (some may be both video and audio devices)
"Integrated Camera" // 摄像头
Alternative name "@device_pnp_\\?\usb#vid_04f2&pid_b604&mi_00#6&31e07f50&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global"
DirectShow audio devices
"麦克风阵列 (2- Conexant SmartAudio HD)" //麦克风
Alternative name "@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\wave_{01E2545F-541D-4363-A995-DB47530ABA17}"
查看dshow可设置的参数
ffmpeg -h demuxer=dshow
// 结果如下:
Demuxer dshow [DirectShow capture]:
dshow indev AVOptions:
// 分辨率
-video_size <image_size> .D........ set video size given a string such as 640x480 or hd720.
// 像素格式
-pixel_format <pix_fmt> .D........ set video pixel format (default none)
// 帧率(每秒采集多少帧画面)
-framerate <string> .D........ set video frame rate
// 采样率
-sample_rate <int> .D........ set audio sample rate (from 0 to INT_MAX) (default 0)
// 采样大小(位深度)
-sample_size <int> .D........ set audio sample size (from 0 to 16) (default 0)
// 声道数
-channels <int> .D........ set number of audio channels, such as 1 or 2 (from 0 to INT_MAX) (default 0)
-audio_buffer_size <int> .D........ set audio device buffer latency size in milliseconds (default is the device's default) (from 0 to INT_MAX) (default 0)
// true表示列出dshow支持的所有设备
-list_devices <boolean> .D........ list available devices (default false)
// true表示列出特定设备支持的所有参数
-list_options <boolean> .D........ list available options for specified device (default false)
-video_device_number <int> .D........ set video device number for devices with same name (starts at 0) (from 0 to INT_MAX) (default 0)
-audio_device_number <int> .D........ set audio device number for devices with same name (starts at 0) (from 0 to INT_MAX) (default 0)
-crossbar_video_input_pin_number <int> .D........ set video input pin number for crossbar device (from -1 to INT_MAX) (default -1)
-crossbar_audio_input_pin_number <int> .D........ set audio input pin number for crossbar device (from -1 to INT_MAX) (default -1)
-show_video_device_dialog <boolean> .D........ display property dialog for video capture device (default false)
-show_audio_device_dialog <boolean> .D........ display property dialog for audio capture device (default false)
-show_video_crossbar_connection_dialog <boolean> .D........ display property dialog for crossbar connecting pins filter on video device (default false)
-show_audio_crossbar_connection_dialog <boolean> .D........ display property dialog for crossbar connecting pins filter on audio device (default false)
-show_analog_tv_tuner_dialog <boolean> .D........ display property dialog for analog tuner filter (default false)
-show_analog_tv_tuner_audio_dialog <boolean> .D........ display property dialog for analog tuner audio filter (default false)
-audio_device_load <string> .D........ load audio capture filter device (and properties) from file
-audio_device_save <string> .D........ save audio capture filter device (and properties) to file
-video_device_load <string> .D........ load video capture filter device (and properties) from file
-video_device_save <string> .D........ save video capture filter device (and properties) to file
查看摄像头支持的参数
ffmpeg -f dshow -list_options true -i video="Integrated Camera"
// 结果如下:
DirectShow video device options (from video devices)
Pin "捕获" (alternative pin name "捕获")
vcodec=mjpeg min s=1280x720 fps=30 max s=1280x720 fps=30
vcodec=mjpeg min s=320x180 fps=30 max s=320x180 fps=30
vcodec=mjpeg min s=320x240 fps=30 max s=320x240 fps=30
vcodec=mjpeg min s=352x288 fps=30 max s=352x288 fps=30
vcodec=mjpeg min s=424x240 fps=30 max s=424x240 fps=30
vcodec=mjpeg min s=640x360 fps=30 max s=640x360 fps=30
vcodec=mjpeg min s=640x480 fps=30 max s=640x480 fps=30
vcodec=mjpeg min s=848x480 fps=30 max s=848x480 fps=30
vcodec=mjpeg min s=960x540 fps=30 max s=960x540 fps=30
pixel_format=yuyv422 min s=1280x720 fps=10 max s=1280x720 fps=10
pixel_format=yuyv422 min s=320x180 fps=30 max s=320x180 fps=30
pixel_format=yuyv422 min s=320x240 fps=30 max s=320x240 fps=30
pixel_format=yuyv422 min s=352x288 fps=30 max s=352x288 fps=30
pixel_format=yuyv422 min s=424x240 fps=30 max s=424x240 fps=30
pixel_format=yuyv422 min s=640x360 fps=30 max s=640x360 fps=30
pixel_format=yuyv422 min s=640x480 fps=30 max s=640x480 fps=30
pixel_format=yuyv422 min s=848x480 fps=20 max s=848x480 fps=20
pixel_format=yuyv422 min s=960x540 fps=15 max s=960x540 fps=15
pixel_format=bgr24 min s=1280x720 fps=10 max s=1280x720 fps=10
pixel_format=bgr24 min s=320x180 fps=30 max s=320x180 fps=30
pixel_format=bgr24 min s=320x240 fps=30 max s=320x240 fps=30
pixel_format=bgr24 min s=352x288 fps=30 max s=352x288 fps=30
pixel_format=bgr24 min s=424x240 fps=30 max s=424x240 fps=30
pixel_format=bgr24 min s=640x360 fps=30 max s=640x360 fps=30
pixel_format=bgr24 min s=640x480 fps=30 max s=640x480 fps=30
pixel_format=bgr24 min s=848x480 fps=20 max s=848x480 fps=20
pixel_format=bgr24 min s=960x540 fps=15 max s=960x540 fps=15
# FFmpeg视频录制(WIN)## 命令### 查看当前平台可用的设备```ffmpeg -devices// 结果如下:Devices: D. = Demuxing supported .E = Muxing supported -- D dshow DirectShow capture // DirectShow,是Windows平台的多媒体系统库 D gdigrab GDI API Windows frame grabber D