User Manual Orange Pi Zero 3

  Features   |  Use   |    Linux     |  Linux SDK   |  Android   |  Android SRC   |

RU          EN  

Chapt 3. Instructions for use of Debian/Ubuntu Server and Xfce desktop system
Страница:   25    26    27    28    29    30    31    32    33    34    35    36    37    38    39    40    41    42    43    44    45    46    47    48    49    50    51    52    53    54    55    56    57    58    59    60    61    62    63    64    65    66    67    68    69    70    71    72    73    74    75    76    77    78    79    80    81    82    83    84    85    86    87    88    89    90    91    92    93    94    95    96    97    98    99    100    101    102    103    104    105    106    107    108    109    110    111    112    113    114    115    116    117    118    119    120    121    122  


3.11.4. USB camera test

  • 1) First insert the USB camera into the USB port of the Orange Pi development board

  • 2) Then through the lsmod command, you can see that the kernel has automatically loaded the following modules

    orangepi@orangepi:~$ lsmod
    Module Size Used by
    uvcvideo 106496 0

  • 3) 3) Through the v4l2-ctl command, you can see that the device node information of the

    Note that the l in v4l2 is a lowercase letter l, not the number 1. In addition, the serial number of the video is not necessarily video0, please refer to what you actually see

  • 4) Use fswebcam to test the USB camera

    a. Install fswebcam

    orangepi@orangepi:~$ sudo apt update
    orangepi@orangepi:~$ sudo apt-get install -y fswebcam

    b. After installing fswebcam, you can use the following command to take pictures a) -d option is used to specify the device node of the USB camera b) --no-banner is used to remove the watermark of the photo c) -r option is used to specify the resolution of the photo d) -S option is used to set the number of previous frames to skip e) ./image.jpg is used to set the name and path of the generated photo

    orangepi@orangepi:~$ sudo fswebcam -d /dev/video0 \
    --no-banner -r 1280x720 -S 5 ./image.jpg

    c. In the server version of the linux system, you can use the scp command to transfer the taken pictures to the Ubuntu PC for mirror viewing after taking pictures

    orangepi@orangepi:~$ scp image.jpg test@192.168.1.55:/home/test (Modify the IP

    address and path according to the actual situation)

    d. In the desktop version of the linux system, you can directly view the captured pictures through the HDMI display

  • 5) Use mjpg-streamer to test USB camera

    a. Download mjpg-streamer

      a) Github download address:

      orangepi@orangepi:~$ git clone https://github.com/jacksonliam/mjpg-streamer
      b) The image download address of Gitee is:

      orangepi@orangepi:~$ git clone https://gitee.com/leeboby/mjpg-streamer

    b. Install dependent packages

      a) Ubuntu system

      orangepi@orangepi:~$ sudo apt-get install -y cmake libjpeg8-dev
      b) Debian system

      orangepi@orangepi:~$ sudo apt-get install -y cmake libjpeg62-turbo-dev

    c. Compile and install mjpg-streamer

    orangepi@orangepi:~$ cd mjpg-streamer/mjpg-streamer-experimental
    orangepi@orangepi:~/mjpg-streamer/mjpg-streamer-experimental$ make -j4
    orangepi@orangepi:~/mjpg-streamer/mjpg-streamer-experimental$ sudo make install

    d. Then enter the following command to start mjpg_streamer

    Note that the serial number of the video is not necessarily video0, please refer to what you actually see

    orangepi@orangepi:~/mjpg-streamer/mjpg-streamer-experimental$ export LD_LIBRARY_PATH=.
    orangepi@orangepi:~/mjpg-streamer/mjpg-streamer-experimental$ sudo ./mjpg_streamer -i "./input_uvc.so -d \
    /dev/video0 -u -f 30" -o "./output_http.so -w ./www"

    e. Then enter [the IP address of the development board: 8080] in the browser of the Ubuntu PC or Windows PC or mobile phone on the same LAN as the development board to see the video output by the camera



    Img 3.95

     <         > 


  • Страница:   25    26    27    28    29    30    31    32    33    34    35    36    37    38    39    40    41    42    43    44    45    46    47    48    49    50    51    52    53    54    55    56    57    58    59    60    61    62    63    64    65    66    67    68    69    70    71    72    73    74    75    76    77    78    79    80    81    82    83    84    85    86    87    88    89    90    91    92    93    94    95    96    97    98    99    100    101    102    103    104    105    106    107    108    109    110    111    112    113    114    115    116    117    118    119    120    121    122