Python Forum
get webcam name from device manger !!
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
get webcam name from device manger !!
#1
hello all ...
how i can get my webcam name by python ??

in powershell i can use this command:
Quote: Get-WmiObject Win32_PNPEntity | Select Name | Select-String "Camera"

output :
Quote:@{Name=HP Wide Vision HD Camera}
[Image: Capture.png]

how i can do this in pure python ?
Reply
#2
solved :

import wmi
import re


c = wmi.WMI()
wql = "Select * From Win32_USBControllerDevice"
for item in c.query(wql):
    q = item.Dependent.Caption
    if re.findall("Camera",q):
        print(q)
    
    
Output:
HP Wide Vision HD Camera
Reply
#3
Glad you got the solution, and thanks for coming back to share it!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  eth0: [ERROR] Set device name: No such device inkmin 0 574 Oct-03-2024, 12:52 AM
Last Post: inkmin
  How to receive webcam capture on spout? buzzdarkyear 2 3,538 Jan-12-2022, 02:26 PM
Last Post: buzzdarkyear
  Rotation Effect on live Webcam Feed Leziiy 0 2,081 Sep-12-2020, 04:25 PM
Last Post: Leziiy
  About Arduino and Python usb webcam tuts Simurg 1 2,782 Mar-20-2020, 07:25 PM
Last Post: Larz60+
  Reading UDP from external device without device software ikdemartijn 2 4,928 Dec-03-2019, 04:29 PM
Last Post: Larz60+
  Access webcam via python ArnabRoyBatman 1 5,002 Jun-15-2017, 05:19 AM
Last Post: j.crater
  Display device details i.e connected with more than one device shintonp 6 6,509 May-10-2017, 06:00 AM
Last Post: shintonp

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020