Answer the question
In order to leave comments, you need to log in
How to link between /dev/video0 and lsusb entry using BASH or Python
Hello. I'm writing a small GUI for managing server systems under Linux in Python. The task was to display a list of installed cameras in the camera management interface, which would contain at least the path to the device in dev and data from lsusb. But how do you determine which device in /dev/videoX belongs to which device in lsusb? Naturally, the script is BASH or Python (by reading the necessary files or capturing the output of all the commands necessary for this with subprocess and parsing their contents). Well, or you can tell how to do it. To be honest, I guess that this can be done by parsing lsusb -v, but I have not gone off the rails so many lines to parseI don't show yet. how to parse such a volume ;'-( I also found the udevadm info -q path -n /dev/video0 command, but I don’t know how long it would be, I’ll smoke man udevadm.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question