How to distinguish between identical cameras in Libav/ffmpeg?

这一生的挚爱 提交于 2021-02-08 07:01:54

问题


I have two identical cameras connected and using Libav/FFmpeg. The option settings are:

format = "dshow"
input = "video=Videology USB-C Camera"

However, I am not able to distinguish between the two identical cameras. If I try to print out the list of devices, I get the following:

$> FFmpeg -list_devices true -f dshow -i dummy

[dshow @ 02597f60] DirectShow video devices
[dshow @ 02597f60]  "Integrated Camera"
[dshow @ 02597f60]  "Videology USB-C Camera"
    Last message repeated 1 times
[dshow @ 02597f60] DirectShow audio devices
[dshow @ 02597f60]  "Microphone (Realtek High Defini"

The cameras do appear as the same device, twice. The only thing I see so far, is the USB-port differs in the OS-hardware properties. Is it anyhow possible to distinguish between them?


回答1:


You can use:

video_device_number Set video device number for devices with same name (starts at 0, defaults to 0).

audio_device_number Set audio device number for devices with same name (starts at 0, defaults to 0).

Example:

ffmpeg -f dshow -video_device_number 1 -i video="Camera"

Source: FFmpeg Devices



来源:https://stackoverflow.com/questions/29510699/how-to-distinguish-between-identical-cameras-in-libav-ffmpeg

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!