Changes between Initial Version and Version 1 of Docs/825gen2/Dev/Devices/USB/Webcams


Ignore:
Timestamp:
01/23/24 07:49:36 (10 months ago)
Author:
Don Wilson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Docs/825gen2/Dev/Devices/USB/Webcams

    v1 v1  
     1= USB Web Cams =
     2
     3The 825gen2 has some support for USB cameras.
     4
     5After plugging a Logitech USB webcam into the 825 from a terminal type dmesg.
     6
     7{{{
     8[ 7653.802688] usb 1-1.4: new high-speed USB device number 4 using xhci-hcd
     9[ 7654.211992] usb 1-1.4: Found UVC 1.00 device <unnamed> (046d:0825)
     10[ 7654.324569] input: UVC Camera (046d:0825) as /devices/platform/soc@0/38200000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.4/1-1.4:1.0/input/input7
     11[ 7654.325132] usbcore: registered new interface driver uvcvideo
     12[ 7655.880687] usb 1-1.4: set resolution quirk: cval->res = 384
     13[ 7655.881370] usbcore: registered new interface driver snd-usb-audio
     14}}}
     15
     16Many webcams currently are UVC (USB Video Class). The 825gen2 has support for this.
     17
     18Type **lsmod** to show loaded modules
     19
     20{{{
     21card825gen2:~$ lsmod
     22Module                  Size  Used by
     23snd_usb_audio         294912  0
     24snd_hwdep              20480  1 snd_usb_audio
     25snd_usbmidi_lib        36864  1 snd_usb_audio
     26uvcvideo              106496  0
     27algif_hash             20480  1
     28algif_skcipher         20480  1
     29af_alg                 32768  6 algif_hash,algif_skcipher
     30cardmnbdm              24576  0
     31rpmsg_ctrl             16384  0
     32
     33}}}
     34
     35From the terminal type the following command to capture a still image from the camera.
     36
     37{{{
     38card825gen2:~$  gst-launch-1.0 v4l2src device=/dev/video2 num-buffers=1 ! jpegenc ! filesink location=/tmp/test.jpg
     39Setting pipeline to PAUSED ...
     40Pipeline is live and does not need PREROLL ...
     41Pipeline is PREROLLED ...
     42Setting pipeline to PLAYING ...
     43New clock: GstSystemClock
     44Redistribute latency...
     45Got EOS from element "pipeline0".
     46Execution ended after 0:00:02.385972216
     47Setting pipeline to NULL ...
     48Freeing pipeline ...
     49}}}
     50
     51The file /tmp/test.jpg contains the image.
     52
     53To capture an image from an app a **system** call could be used to perform the above command line. However, it would be better to use the gstreamer library within the code. An example of this will be added to this page at a later date.
     54
     55