Turn on Webcam from Terminal

Need help with C, C++, perl, python, etc?

Turn on Webcam from Terminal

Postby FarukC. » 2017-04-15 21:41

Hi everyone,

I have a problem about using webcam from terminal. I hope, you can help me. My notebook is MSI GE60 2PC Apache, and my OS is Debian 8 Jessie.

When I press FN+F6, my webcam turns on and I can use webcam with cheese application. If I press FN+F6 again, webcam turns off and I can't use webcam, there is a message "No device found". I want to control webcam with python code or bash code, I don't want to press FN+F6. How can I do? Syslog has "udev", "evdev", "mtp-probe" .., I guess I will use these but which? Or I can use keypress in python but how?

That's my syslog output, when I press FN+F6:

Code: Select all
Apr 16 01:24:28 debian kernel: [34628.327642] usb 1-1.4: new high-speed USB device number 8 using ehci-pci
Apr 16 01:24:28 debian kernel: [34628.462468] usb 1-1.4: New USB device found, idVendor=5986, idProduct=0248
Apr 16 01:24:28 debian kernel: [34628.462471] usb 1-1.4: New USB device strings: Mfr=6, Product=2, SerialNumber=0
Apr 16 01:24:28 debian kernel: [34628.462472] usb 1-1.4: Product: BisonCam, NB Pro
Apr 16 01:24:28 debian kernel: [34628.464910] uvcvideo: Found UVC 1.00 device BisonCam, NB Pro (5986:0248)
Apr 16 01:24:28 debian mtp-probe: checking bus 1, device 8: "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4"
Apr 16 01:24:28 debian mtp-probe: bus: 1, device: 8 was not an MTP device
Apr 16 01:24:28 debian kernel: [34628.468993] input: BisonCam, NB Pro as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.0/input/input24
Apr 16 01:24:28 debian gdm-Xorg-:0[1092]: (II) config/udev: Adding input device BisonCam, NB Pro (/dev/input/event17)
Apr 16 01:24:28 debian gdm-Xorg-:0[1092]: (**) BisonCam, NB Pro: Applying InputClpass "evdev keyboard catchall"
Apr 16 01:24:28 debian gdm-Xorg-:0[1092]: (II) Using input driver 'evdev' for 'BisonCam, NB Pro'
Apr 16 01:24:28 debian gdm-Xorg-:0[1092]: (**) BisonCam, NB Pro: always reports core events
Apr 16 01:24:28 debian gdm-Xorg-:0[1092]: (**) evdev: BisonCam, NB Pro: Device: "/dev/input/event17"
Apr 16 01:24:28 debian gdm-Xorg-:0[1092]: (--) evdev: BisonCam, NB Pro: Vendor 0x5986 Product 0x248
Apr 16 01:24:28 debian gdm-Xorg-:0[1092]: (--) evdev: BisonCam, NB Pro: Found keys
Apr 16 01:24:28 debian gdm-Xorg-:0[1092]: (II) evdev: BisonCam, NB Pro: Configuring as keyboard
Apr 16 01:24:28 debian gdm-Xorg-:0[1092]: (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.0/input/input24/event17"
Apr 16 01:24:28 debian gdm-Xorg-:0[1092]: (II) XINPUT: Adding extended input device "BisonCam, NB Pro" (type: KEYBOARD, id 15)
Apr 16 01:24:28 debian gdm-Xorg-:0[1092]: (**) Option "xkb_rules" "evdev"
Apr 16 01:24:28 debian gdm-Xorg-:0[1092]: (**) Option "xkb_model" "pc105"
Apr 16 01:24:28 debian gdm-Xorg-:0[1092]: (**) Option "xkb_layout" "tr"
Apr 16 01:24:28 debian gdm-Xorg-:0[1092]: The XKEYBOARD keymap compiler (xkbcomp) reports:
Apr 16 01:24:28 debian gdm-Xorg-:0[1092]: > Warning:          Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols
Apr 16 01:24:28 debian gdm-Xorg-:0[1092]: >                   Ignoring extra symbols
Apr 16 01:24:28 debian gdm-Xorg-:0[1092]: Errors from xkbcomp are not fatal to the X server


Thanks for help :)
FarukC.
 
Posts: 1
Joined: 2017-04-15 21:25

Re: Turn on Webcam from Terminal

Postby phenest » 2017-04-16 15:47

I haven't tried it, but there is a package called "streamer" which may do what you want.
Dell XPS 17 L702X i7 2860QM 2.5GHz - 32GB RAM - 4G WWAN - Pioneer TD05-BDR
NEC Spirit 550 P4 3.8GHz HT - 2GB RAM - nVidia 7600GT - Pioneer BDR-209DBK
ASUS P8P67 EVO i7 3770K - 32GB RAM - 2x nVidia 660GTX SLI'd
User avatar
phenest
 
Posts: 1433
Joined: 2010-03-09 09:38
Location: The Matrix


Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest

fashionable