`

FFMPEG列出DirectShow支持的设备

 
阅读更多

FFMPEG列出dshow支持的设备:

 

 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

分享到:
评论

相关推荐

    QT+vs+directshow获取摄像头名称及其支持的分辨率

    6. **测试与调试**:运行程序,确保能够正确列出摄像头并展示其分辨率。使用QT的调试工具进行错误排查,确保程序稳定运行。 7. **编码注意事项**:由于DirectShow是COM接口,记得每次使用完接口实例后释放,防止...

    ffmpeg的整体分析

    在编译过程中,可能需要依赖一些外部库,但具体依赖项在描述中未列出。 FFmpeg库主要由六个核心组件构成: 1. libavformat:负责音视频封装格式的处理,包括读取和生成编解码所需的元数据,创建和管理编解码上下文...

    使用FFMPEG+easydarwin把本地摄像头进行rtsp推流指令

    该命令可以帮助我们列出所有可用的摄像头设备,以便后续指定正确的输入设备。 ##### 3.2 启动EasyDarwin服务 确保EasyDarwin服务已正确安装并启动。可以通过官方文档中的指南进行操作。 ##### 3.3 使用FFMPEG推流 ...

    7-ffmpeg实现系统声音的采集.rar

    这将列出所有可用的音频和视频输入设备。找到你想要采集声音的设备ID,通常会是"默认"或"立体声混音",这个ID将在"device"一栏中显示。 接着,我们可以开始采集系统声音。以下是一个简单的命令示例,用于捕获音频并...

    VideoCaputer For UsbCamer Usb摄像头捕获源码

    10. "Project1.rar"是项目源代码的压缩包,可能包含了其他未列出的文件。 从这个项目中,我们可以学习到如何使用Delphi编写一个无第三方依赖的USB摄像头视频捕获程序,如何调用DirectShow或VFW API进行视频流的捕获...

    VB视频采集程序.rar

    2. **设备枚举与选择**:程序需要能够列出可用的视频输入设备(如内置或外接摄像头),让用户选择要使用的设备。这通常通过枚举系统中的视频捕获设备并创建相应的过滤器完成。 3. **视频流捕获**:核心代码将包含...

    vfw视频捕获

    2. **捕获设备枚举**:VFW提供了枚举函数,如`capGetDriverDescriptionA`,用于列出系统上可用的视频捕获设备,用户可以选择其中一个设备进行操作。 3. **创建捕获窗口**:VFW允许创建一个窗口来显示捕获的视频流。...

    pb+opencv2.3控制摄像头拍照、录像

    描述中列出的功能详细说明如下: 1. **拍照(支持竖拍)**:通过调用OpenCV的捕获设备接口,可以打开并控制摄像头进行拍照。OpenCV提供了函数如`cvCaptureFromCAM()`来获取摄像头的视频流,然后使用`cvQueryFrame()`...

    LAVFilters源码

    `.gitignore`列出不应纳入版本控制的文件类型或目录,以避免不必要的版本冲突。`.gitmodules`记录了子模块的信息,表明LAVFilters可能包含其他依赖库的子模块,这对于协作开发和保持代码同步至关重要。 4. **项目...

    C#实现通用USB摄像头的读取,拍照,视频录制等功能

    首先,通过`VideoInput`类列出所有可用的设备,并让用户选择一个设备: ```csharp using AForge.Video; using AForge.Video.DirectShow; // 获取所有视频设备 FilterInfoCollection videoDevices = new ...

    学习如何使用C#和合并从摄像机录制视频和快照。从一个USB摄像机、一个IP摄像机以及通过捕捉桌面来获取图像。

    首先,创建设备枚举器以列出所有可用的摄像机,然后选择你需要的设备并打开它。接下来,设置视频和音频的捕获参数,最后开始录像。AForge.NET库同样提供了一套完善的API用于处理USB摄像机的视频流。 3. **IP摄像机...

    基于MFC的高清电视直播软件

    在设计用户界面时,MFC提供了丰富的控件,如CStatic用于创建文本标签,CButton用于创建按钮,CListBox用于列出频道,CToolBar用于创建工具栏,以及CWnd和CView等基本类,它们可以帮助我们构建出具有电视直播所需功能...

    avi播放软件代码,可以播放avi文件的代码

    它包含一个头部文件(AVI Header),列出文件的整体信息,以及多个流信息,包括视频流和音频流。解析这些信息是播放器的第一步。 3. **视频解码**:AVI文件中的视频数据通常是编码过的,需要通过解码器(Decoder)...

Global site tag (gtag.js) - Google Analytics