通过终端列出视频设备 [英] list video devices via terminal

查看:26
本文介绍了通过终端列出视频设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何通过终端列出电脑的视频设备?是否有列出它们的命令?

How do you list a computer's video devices via terminal? Is there a command that lists them?

推荐答案

要列出视频输出设备(例如显示器),

To list video output devices (e.g. monitors),

$ system_profiler SPDisplaysDataType

要列出视频输入设备(例如网络摄像头),

To list video input devices (e.g. webcams),

$ system_profiler SPCameraDataType

要仅获取设备名称,请相应地过滤列表:

To get just the device names, filter the list accordingly:

$ system_profiler SPCameraDataType | grep "^    [^ ]" | sed "s/    //" | sed "s/://"

这篇关于通过终端列出视频设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆