Nutzen einer Webcam

Das Tool motion installieren. Damit wird der Livestream bedient:

$ sudo apt-get install motion -y

USB-Cam anschliessen. Mit lsusb die USB-Geräte listen, da sollte eine Cam erscheinen. Anbei eine Beispielausgabe

$ lsusb
Bus 001 Device 006: ID 0c45:608f Microdia PC Camera (SN9C103 + OV7630)
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Mit ls /dev/video* können die installierten Video-Geräte gelistet werden

$ ls /dev/video*
/dev/video0

Mit v4l2-ctl Angaben zur Cam anzeigen

$ v4l2-ctl -V
Format Video Capture:
        Width/Height  : 640/480
        Pixel Format  : 'S910'
        Field         : None
        Bytes per Line: 640
        Size Image    : 384000
        Colorspace    : SRGB
        Flags         :

Nun die /etc/motion/motion.conf anpassen

$ sudo nano /etc/motion/motion.conf

Start von Motion mit alternativ

$ motion &
$ sudo service motion start

Alternativ statt start auch stop oder restart. Der Prozess kann mit

$ kill `ps -A | grep motion | cut -d" " -f1`

gestoppt werden

Schreibe einen Kommentar