FFMPEG列出DirectShow支持的设备

FFMPEG列出dshow支持的设备:

[plain]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. ffmpeg -list_devices true -f dshow -i dummy  

举例:

采集摄像头和麦克风

[plain]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. ffmpeg -f dshow -i video="Camera":audio="Microphone"  

(摄像头名称是Camera,麦克风名称是Microphone)

 

比如说,在我的笔记本上采集10秒的视频,并且使用x264进行编码,可以用如下命令:

[plain]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. ffmpeg -f dshow -i video="Integrated Camera" -t 10 -vcodec libx264 d:\\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.csdn.net/leixiaohua1020/article/details/16853501

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值