重命名V4L2中的设备?

亚伦

我有4个相同的HDMI-> USB 3捕获设备,用于实时直播。那很好。在对首次安装进行了一次反复的尝试之后,广播制作软件始终保持它们的正确性。

但是,有时我们使用相同来源之一进行远程会议,当我开始会议时,会得到以下信息:

在此处输入图片说明

I just happen to know, after some more trial-and-error, that I always want the second one in that list, but that's a bit of tribal knowledge that I'd like to get rid of. Physically rearranging the USB plugs (while powered off) does not reorder the list shown, but does mess up the broadcast software. And the capture devices themselves were already tied down by the time I discovered this, so it's a bit difficult to rearrange their inputs. Besides, if one of them needs to be replaced, that could also throw off a carefully-ordered-but-still-automatic list.

Can I put a custom name in each of those slots, that survives a reboot, so that someone else can see what they're actually choosing?
Or even better, so that the web browser can pick that source automatically, since it seems to do it by the first match of the name?


这是广播软件向我显示的内容(请注意每个标识符的附加标识符):

在此处输入图片说明

这是输出lsusb

hrcc@hrcclivemedia:~$ lsusb
Bus 006 Device 002: ID 1bcf:2c99 Sunplus Innovation Technology Inc. FHD Capture
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 004: ID 1bcf:2c99 Sunplus Innovation Technology Inc. FHD Capture
Bus 003 Device 003: ID 1bcf:2c99 Sunplus Innovation Technology Inc. FHD Capture
Bus 003 Device 002: ID 1bcf:2c99 Sunplus Innovation Technology Inc. FHD Capture
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 08bb:2902 Texas Instruments PCM2902 Audio Codec
Bus 001 Device 004: ID 0764:0501 Cyber Power System, Inc. CP1500 AVR UPS
Bus 001 Device 003: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 001 Device 007: ID 046d:c31c Logitech, Inc. Keyboard K120
Bus 001 Device 006: ID 046d:c077 Logitech, Inc. M105 Optical Mouse
Bus 001 Device 002: ID 0a05:7211 Unknown Manufacturer hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
hrcc@hrcclivemedia:~$ 

hrcc@hrcclivemedia:~$ lsusb -t
/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 10000M
    |__ Port 1: Dev 2, If 0, Class=Video, Driver=uvcvideo, 5000M
    |__ Port 1: Dev 2, If 1, Class=Video, Driver=uvcvideo, 5000M
    |__ Port 1: Dev 2, If 2, Class=Audio, Driver=snd-usb-audio, 5000M
    |__ Port 1: Dev 2, If 3, Class=Audio, Driver=snd-usb-audio, 5000M
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
    |__ Port 2: Dev 2, If 3, Class=Audio, Driver=snd-usb-audio, 480M
    |__ Port 2: Dev 2, If 1, Class=Video, Driver=uvcvideo, 480M
    |__ Port 2: Dev 2, If 2, Class=Audio, Driver=snd-usb-audio, 480M
    |__ Port 2: Dev 2, If 0, Class=Video, Driver=uvcvideo, 480M
    |__ Port 3: Dev 3, If 0, Class=Video, Driver=uvcvideo, 480M
    |__ Port 3: Dev 3, If 3, Class=Audio, Driver=snd-usb-audio, 480M
    |__ Port 3: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480M
    |__ Port 3: Dev 3, If 2, Class=Audio, Driver=snd-usb-audio, 480M
    |__ Port 4: Dev 4, If 0, Class=Video, Driver=uvcvideo, 480M
    |__ Port 4: Dev 4, If 1, Class=Video, Driver=uvcvideo, 480M
    |__ Port 4: Dev 4, If 2, Class=Audio, Driver=snd-usb-audio, 480M
    |__ Port 4: Dev 4, If 3, Class=Audio, Driver=snd-usb-audio, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 12M
        |__ Port 3: Dev 6, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
        |__ Port 4: Dev 7, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
        |__ Port 4: Dev 7, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
    |__ Port 2: Dev 3, If 0, Class=Vendor Specific Class, Driver=pl2303, 12M
    |__ Port 5: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
    |__ Port 6: Dev 5, If 2, Class=Audio, Driver=snd-usb-audio, 12M
    |__ Port 6: Dev 5, If 0, Class=Audio, Driver=snd-usb-audio, 12M
    |__ Port 6: Dev 5, If 3, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 6: Dev 5, If 1, Class=Audio, Driver=snd-usb-audio, 12M
hrcc@hrcclivemedia:~$ 
登录

实际上,您无法更改它,因为在列表上看到的是USB设备在其配置描述符中发送的名称。您可以修改您的内核以进行更改。如果您是高级用户,则可以通过修改USB子系统源代码或使用eBPF(或kprobes / kretprobes)来修改USB子系统,从而入侵内核。另外,您可以尝试将libusb修改为例如。在设备名称后附加序列号。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

沉入虚拟v4l2设备

来自分类Dev

如何创建v4l2设备,该设备是网络摄像头的裁剪版本?

来自分类Dev

在v4l2中获取布尔控件的值

来自分类Dev

以编程方式将图像发送到v4l2设备

来自分类Dev

FFmpeg v4l2复制不稳定

来自分类Dev

安装内核模块[V4L2]

来自分类Dev

使用V4L2构建FFmpeg

来自分类Dev

v4l2是否支持多地图?

来自分类Dev

V4L2更改默认设置?

来自分类Dev

您如何处理摄像机实时流的V4L2中的各个帧?

来自分类Dev

您如何处理摄像机实时流的V4L2中的各个帧?

来自分类Dev

将x11grab与v4l2合并到单个输出文件中

来自分类Dev

是否可以在 Fiware 中重命名设备?

来自分类Dev

控制V4L2 / VB2缓冲区分配?

来自分类Dev

在设备管理器中重命名设备

来自分类Dev

v4l2 Python-流视频-映射缓冲区

来自分类Dev

用v4l2捕获相机图像非常慢

来自分类Dev

Debian V4L2复合视频USB捕获器

来自分类Dev

使用V4L2 API选择输入通道

来自分类Dev

12.04随附的Opencv版本是否支持v4l2?

来自分类Dev

在ov5640上使用V4L2设置ctrl

来自分类Dev

yuvj420p的未知V4L2像素格式等效

来自分类Dev

12.04随附的Opencv版本是否支持v4l2?

来自分类Dev

带回调而不是轮询循环的V4L2预览

来自分类Dev

为什么 V4L2 API 不显示正确的像素格式/宽度/高度参数?

来自分类Dev

如何将数据从 v4l2 放入 c++ 向量

来自分类Dev

如何使用 v4l2 linux 界面从网络摄像头获取视频?

来自分类Dev

使用v4l2在Raspberry pi上的C ++中的Logitech C210网络摄像头上设置帧速率

来自分类Dev

使用v4l2在Raspberry pi上的C ++中的Logitech C210网络摄像头上设置帧速率