FFMPEG列出DirectShow支持的设备
2013-11-22 13:13
351 查看
FFMPEG列出dshow支持的设备:
举例:
采集摄像头和麦克风
(摄像头名称是Camera,麦克风名称是Microphone)
比如说,在我的笔记本上采集10秒的视频,并且使用x264进行编码,可以用如下命令:
以下是帮助信息:
http://ffmpeg.org/ffprobe.html
11.3 dshow
Windows DirectShow input device.
DirectShow support is enabled when FFmpegis built with mingw-w64. Currently only audio and video devices are supported.
Multiple devices may be opened as separateinputs, but they may also be opened on the same input, which should improvesynchronism between them.
The input name should be in the format:
TYPE=NAME[:TYPE=NAME]
where TYPE can be either audio or video,and NAME is the device’s name.
11.3.1 Options
If no options are specified, the device’sdefaults are used. If the device does not support the requested options, itwill fail to open.
‘video_size’
Set the video size in the captured video.
‘framerate’
Set the framerate in the captured video.
‘sample_rate’
Set the sample rate (in Hz) of the capturedaudio.
‘sample_size’
Set the sample size (in bits) of thecaptured audio.
‘channels’
Set the number of channels in the capturedaudio.
‘list_devices’
If set to ‘true’, print a list of devicesand exit.
‘list_options’
If set to ‘true’, print a list of selecteddevice’s options and exit.
‘video_device_number’
Set video device number for devices withsame name (starts at 0, defaults to 0).
‘audio_device_number’
Set audio device number for devices withsame name (starts at 0, defaults to 0).
11.3.2 Examples
Print the list of DirectShow supporteddevices and exit:
$ffmpeg -list_devices true -f dshow -idummy
Open video device Camera:
$ ffmpeg -f dshow -ivideo="Camera"
Open second video device with name Camera:
$ ffmpeg -f dshow -video_device_number 1 -ivideo="Camera"
Open video device Camera and audio deviceMicrophone:
$ ffmpeg -f dshow -ivideo="Camera":audio="Microphone"
Print the list of supported options inselected device and exit:
$ ffmpeg -list_options true -f dshow -ivideo="Camera"
原文地址:http://blog.sina.com.cn/s/blog_3cb6a78c0100zti7.html
ffmpeg -list_devices true -f dshow -idummy
举例:
采集摄像头和麦克风
ffmpeg -f dshow -i video="Camera":audio="Microphone"
(摄像头名称是Camera,麦克风名称是Microphone)
比如说,在我的笔记本上采集10秒的视频,并且使用x264进行编码,可以用如下命令:
ffmpeg -f dshow -i video="Integrated Camera" -t 10 -vcodec libx264 test.mp4=================================================================
以下是帮助信息:
http://ffmpeg.org/ffprobe.html
11.3 dshow
Windows DirectShow input device.
DirectShow support is enabled when FFmpegis built with mingw-w64. Currently only audio and video devices are supported.
Multiple devices may be opened as separateinputs, but they may also be opened on the same input, which should improvesynchronism between them.
The input name should be in the format:
TYPE=NAME[:TYPE=NAME]
where TYPE can be either audio or video,and NAME is the device’s name.
11.3.1 Options
If no options are specified, the device’sdefaults are used. If the device does not support the requested options, itwill fail to open.
‘video_size’
Set the video size in the captured video.
‘framerate’
Set the framerate in the captured video.
‘sample_rate’
Set the sample rate (in Hz) of the capturedaudio.
‘sample_size’
Set the sample size (in bits) of thecaptured audio.
‘channels’
Set the number of channels in the capturedaudio.
‘list_devices’
If set to ‘true’, print a list of devicesand exit.
‘list_options’
If set to ‘true’, print a list of selecteddevice’s options and exit.
‘video_device_number’
Set video device number for devices withsame name (starts at 0, defaults to 0).
‘audio_device_number’
Set audio device number for devices withsame name (starts at 0, defaults to 0).
11.3.2 Examples
Print the list of DirectShow supporteddevices and exit:
$ffmpeg -list_devices true -f dshow -idummy
Open video device Camera:
$ ffmpeg -f dshow -ivideo="Camera"
Open second video device with name Camera:
$ ffmpeg -f dshow -video_device_number 1 -ivideo="Camera"
Open video device Camera and audio deviceMicrophone:
$ ffmpeg -f dshow -ivideo="Camera":audio="Microphone"
Print the list of supported options inselected device and exit:
$ ffmpeg -list_options true -f dshow -ivideo="Camera"
原文地址:http://blog.sina.com.cn/s/blog_3cb6a78c0100zti7.html
相关文章推荐
- 计算滞纳金
- UVA 108 Maximum Sum
- UVa 10182 Bee Maja (规律&O(1)算法)
- linux特殊权限位之setuid、setgid和sticky
- 构思一下2013中国大数据周中的几个赛题
- load Initialize
- Add Two Numbers
- hadoop mapreduce
- oracle 创建定时器
- Eclipse中代码不能连接怎么办?
- 消除Context为空的NullPointerException异常
- Reverse Integer
- OpenRisc-57-ORPSoC仿真环境的构建
- C++程序员必知必会的技巧:RAII
- http://wiki.eclipse.org/Hudson-ci/Meet_Hudson
- h323信令分析
- 悲剧的上午丢了近几天的代码
- UVA 103 Stacking Boxes
- uboot start.S分析
- Hello World for U