利用全志H616 MangoPi MQ Quad部署一个网络摄像头

news2024/11/24 19:28:24

本文男二号海康威视720p USB摄像头出场,尊容如下:

在这里插入图片描述

SBC需连接网络:

root@orangepizero2:~# ifconfig
wlan0: flags=4163< UP,BROADCAST,RUNNING,MULTICAST >  mtu 1500
        inet 192.168.99.217  netmask 255.255.255.0  broadcast 192.168.99.255
        ether 2c:d2:6d:32:0e:e4  txqueuelen 1000  (Ethernet)
        RX packets 25810  bytes 26081078 (24.8 MiB)
        RX errors 0  dropped 63  overruns 0  frame 0
        TX packets 8278  bytes 817894 (798.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

一、软件环境

(一)更新软件列表

操作系统基于官方的Debian。

root@orangepizero2:~# sudo apt-get update
Get:1 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye InRelease [116 kB]
Get:2 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye-updates InRelease [44.1 kB]
Get:3 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye-backports InRelease [49.0 kB]
Get:4 http://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security InRelease [48.4 kB]
Get:5 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye/main armhf Packages [10.8 MB]
Get:6 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye-updates/main armhf Packages.diff/Index [18.5 kB]
Get:7 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye-updates/main arm64 Packages.diff/Index [18.5 kB]
Get:8 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye-backports/main armhf Packages.diff/Index [63.3 kB]
Get:9 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye-backports/main arm64 Packages.diff/Index [63.3 kB]
Get:10 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye-backports/contrib armhf Packages.diff/Index [33.0 kB]
Get:11 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye-backports/non-free arm64 Packages.diff/Index [20.7 kB]
Get:12 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye-backports/non-free armhf Packages.diff/Index [21.8 kB]
Get:13 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye-backports/contrib arm64 Packages.diff/Index [40.9 kB]
Get:14 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye-updates/main armhf Packages T-2023-05-24-2006.01-F-2023-05-24-2006.01.pdiff [362 B]
Get:15 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye-updates/main arm64 Packages T-2023-05-24-2006.01-F-2023-05-24-2006.01.pdiff [362 B]
Get:16 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye-backports/main armhf Packages T-2023-07-18-1410.09-F-2023-04-15-1404.36.pdiff [57.5 kB]
Get:14 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye-updates/main armhf Packages T-2023-05-24-2006.01-F-2023-05-24-2006.01.pdiff [362 B]
Get:17 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye-backports/main arm64 Packages T-2023-07-18-1410.09-F-2023-04-15-1404.36.pdiff [58.5 kB]
Get:15 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye-updates/main arm64 Packages T-2023-05-24-2006.01-F-2023-05-24-2006.01.pdiff [362 B]
Get:16 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye-backports/main armhf Packages T-2023-07-18-1410.09-F-2023-04-15-1404.36.pdiff [57.5 kB]
Get:17 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye-backports/main arm64 Packages T-2023-07-18-1410.09-F-2023-04-15-1404.36.pdiff [58.5 kB]
Get:18 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye-backports/contrib armhf Packages T-2023-05-22-0203.06-F-2023-05-17-1402.44.pdiff [1,601 B]
Get:19 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye-backports/non-free arm64 Packages T-2023-07-18-0816.49-F-2023-04-23-0208.18.pdiff [2,123 B]
Get:20 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye-backports/non-free armhf Packages T-2023-07-18-0816.49-F-2023-04-23-0208.18.pdiff [2,123 B]
Get:21 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye-backports/contrib arm64 Packages T-2023-05-22-0203.06-F-2023-05-17-1402.44.pdiff [2,054 B]
Get:18 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye-backports/contrib armhf Packages T-2023-05-22-0203.06-F-2023-05-17-1402.44.pdiff [1,601 B]
Get:21 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye-backports/contrib arm64 Packages T-2023-05-22-0203.06-F-2023-05-17-1402.44.pdiff [2,054 B]
Get:20 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye-backports/non-free armhf Packages T-2023-07-18-0816.49-F-2023-04-23-0208.18.pdiff [2,123 B]
Get:19 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye-backports/non-free arm64 Packages T-2023-07-18-0816.49-F-2023-04-23-0208.18.pdiff [2,123 B]
Get:22 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye/contrib armhf Packages [47.8 kB]
Get:23 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye/non-free armhf Packages [67.2 kB]
Get:24 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye/contrib arm64 Packages [49.0 kB]
Get:25 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye/main arm64 Packages [10.9 MB]
Get:26 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye/non-free arm64 Packages [88.2 kB]
Get:27 http://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security/main arm64 Packages [315 kB]
Get:28 http://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security/main armhf Packages [316 kB]
Get:29 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye-backports/contrib armhf Packages T-2023-05-22-0203.06-F-2023-05-22-0203.06.pdiff [547 B]
Get:29 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye-backports/contrib armhf Packages T-2023-05-22-0203.06-F-2023-05-22-0203.06.pdiff [547 B]
Fetched 23.3 MB in 26s (889 kB/s)
Reading package lists... Done
N: Repository 'http://mirrors.tuna.tsinghua.edu.cn/debian bullseye InRelease' changed its 'Version' value from '11.6' to '11.7'
N: Repository 'http://mirrors.tuna.tsinghua.edu.cn/debian bullseye InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
N: Repository 'http://mirrors.tuna.tsinghua.edu.cn/debian bullseye-updates InRelease' changed its 'Suite' value from 'stable-updates' to 'oldstable-updates'
N: Repository 'http://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security InRelease' changed its 'Suite' value from 'stable-security' to 'oldstable-security'

(二)安装libjpeg62-turbo-dev

root@orangepizero2:~# sudo apt-get install libjpeg62-turbo-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  libjpeg62-turbo-dev
0 upgraded, 1 newly installed, 0 to remove and 111 not upgraded.
Need to get 255 kB of archives.
After this operation, 649 kB of additional disk space will be used.
Get:1 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye/main arm64 libjpeg62-turbo-dev arm64 1:2.0.6-4 [255 kB]
Fetched 255 kB in 1s (498 kB/s)
Selecting previously unselected package libjpeg62-turbo-dev:arm64.
(Reading database ... 139008 files and directories currently installed.)
Preparing to unpack .../libjpeg62-turbo-dev_1%3a2.0.6-4_arm64.deb ...
Unpacking libjpeg62-turbo-dev:arm64 (1:2.0.6-4) ...
Setting up libjpeg62-turbo-dev:arm64 (1:2.0.6-4) ...

(三)安装imagemagick

root@orangepizero2:~# sudo apt-get install imagemagick
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  imagemagick-6-common imagemagick-6.q16 liblqr-1-0 libmagickcore-6.q16-6 libmagickwand-6.q16-6
Suggested packages:
  imagemagick-doc autotrace enscript ffmpeg gnuplot grads hp2xx html2ps libwmf-bin mplayer povray radiance sane-utils texlive-base-bin
  transfig ufraw-batch libmagickcore-6.q16-6-extra
Recommended packages:
  libmagickcore-6.q16-6-extra netpbm gsfonts
The following NEW packages will be installed:
  imagemagick imagemagick-6-common imagemagick-6.q16 liblqr-1-0 libmagickcore-6.q16-6 libmagickwand-6.q16-6
0 upgraded, 6 newly installed, 0 to remove and 111 not upgraded.
Need to get 2,802 kB of archives.
After this operation, 8,890 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye/main arm64 liblqr-1-0 arm64 0.4.2-2.1 [23.9 kB]
Get:2 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye/main arm64 imagemagick-6-common all 8:6.9.11.60+dfsg-1.3+deb11u1 [211 kB]
Get:3 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye/main arm64 libmagickcore-6.q16-6 arm64 8:6.9.11.60+dfsg-1.3+deb11u1 [1,625 kB]
Get:4 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye/main arm64 libmagickwand-6.q16-6 arm64 8:6.9.11.60+dfsg-1.3+deb11u1 [394 kB]
Get:5 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye/main arm64 imagemagick-6.q16 arm64 8:6.9.11.60+dfsg-1.3+deb11u1 [383 kB]
Get:6 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye/main arm64 imagemagick arm64 8:6.9.11.60+dfsg-1.3+deb11u1 [166 kB]
Fetched 2,802 kB in 3s (845 kB/s)
Selecting previously unselected package liblqr-1-0:arm64.
(Reading database ... 139029 files and directories currently installed.)
Preparing to unpack .../0-liblqr-1-0_0.4.2-2.1_arm64.deb ...
Unpacking liblqr-1-0:arm64 (0.4.2-2.1) ...
Selecting previously unselected package imagemagick-6-common.
Preparing to unpack .../1-imagemagick-6-common_8%3a6.9.11.60+dfsg-1.3+deb11u1_all.deb ...
Unpacking imagemagick-6-common (8:6.9.11.60+dfsg-1.3+deb11u1) ...
Selecting previously unselected package libmagickcore-6.q16-6:arm64.
Preparing to unpack .../2-libmagickcore-6.q16-6_8%3a6.9.11.60+dfsg-1.3+deb11u1_arm64.deb ...
Unpacking libmagickcore-6.q16-6:arm64 (8:6.9.11.60+dfsg-1.3+deb11u1) ...
Selecting previously unselected package libmagickwand-6.q16-6:arm64.
Preparing to unpack .../3-libmagickwand-6.q16-6_8%3a6.9.11.60+dfsg-1.3+deb11u1_arm64.deb ...
Unpacking libmagickwand-6.q16-6:arm64 (8:6.9.11.60+dfsg-1.3+deb11u1) ...
Selecting previously unselected package imagemagick-6.q16.
Preparing to unpack .../4-imagemagick-6.q16_8%3a6.9.11.60+dfsg-1.3+deb11u1_arm64.deb ...
Unpacking imagemagick-6.q16 (8:6.9.11.60+dfsg-1.3+deb11u1) ...
Selecting previously unselected package imagemagick.
Preparing to unpack .../5-imagemagick_8%3a6.9.11.60+dfsg-1.3+deb11u1_arm64.deb ...
Unpacking imagemagick (8:6.9.11.60+dfsg-1.3+deb11u1) ...
Setting up imagemagick-6-common (8:6.9.11.60+dfsg-1.3+deb11u1) ...
Setting up liblqr-1-0:arm64 (0.4.2-2.1) ...
Setting up libmagickcore-6.q16-6:arm64 (8:6.9.11.60+dfsg-1.3+deb11u1) ...
Setting up libmagickwand-6.q16-6:arm64 (8:6.9.11.60+dfsg-1.3+deb11u1) ...
Setting up imagemagick-6.q16 (8:6.9.11.60+dfsg-1.3+deb11u1) ...
update-alternatives: using /usr/bin/compare-im6.q16 to provide /usr/bin/compare (compare) in auto mode
update-alternatives: using /usr/bin/compare-im6.q16 to provide /usr/bin/compare-im6 (compare-im6) in auto mode
update-alternatives: using /usr/bin/animate-im6.q16 to provide /usr/bin/animate (animate) in auto mode
update-alternatives: using /usr/bin/animate-im6.q16 to provide /usr/bin/animate-im6 (animate-im6) in auto mode
update-alternatives: using /usr/bin/convert-im6.q16 to provide /usr/bin/convert (convert) in auto mode
update-alternatives: using /usr/bin/convert-im6.q16 to provide /usr/bin/convert-im6 (convert-im6) in auto mode
update-alternatives: using /usr/bin/composite-im6.q16 to provide /usr/bin/composite (composite) in auto mode
update-alternatives: using /usr/bin/composite-im6.q16 to provide /usr/bin/composite-im6 (composite-im6) in auto mode
update-alternatives: using /usr/bin/conjure-im6.q16 to provide /usr/bin/conjure (conjure) in auto mode
update-alternatives: using /usr/bin/conjure-im6.q16 to provide /usr/bin/conjure-im6 (conjure-im6) in auto mode
update-alternatives: using /usr/bin/import-im6.q16 to provide /usr/bin/import (import) in auto mode
update-alternatives: using /usr/bin/import-im6.q16 to provide /usr/bin/import-im6 (import-im6) in auto mode
update-alternatives: using /usr/bin/identify-im6.q16 to provide /usr/bin/identify (identify) in auto mode
update-alternatives: using /usr/bin/identify-im6.q16 to provide /usr/bin/identify-im6 (identify-im6) in auto mode
update-alternatives: using /usr/bin/stream-im6.q16 to provide /usr/bin/stream (stream) in auto mode
update-alternatives: using /usr/bin/stream-im6.q16 to provide /usr/bin/stream-im6 (stream-im6) in auto mode
update-alternatives: using /usr/bin/display-im6.q16 to provide /usr/bin/display (display) in auto mode
update-alternatives: using /usr/bin/display-im6.q16 to provide /usr/bin/display-im6 (display-im6) in auto mode
update-alternatives: using /usr/bin/montage-im6.q16 to provide /usr/bin/montage (montage) in auto mode
update-alternatives: using /usr/bin/montage-im6.q16 to provide /usr/bin/montage-im6 (montage-im6) in auto mode
update-alternatives: using /usr/bin/mogrify-im6.q16 to provide /usr/bin/mogrify (mogrify) in auto mode
update-alternatives: using /usr/bin/mogrify-im6.q16 to provide /usr/bin/mogrify-im6 (mogrify-im6) in auto mode
Setting up imagemagick (8:6.9.11.60+dfsg-1.3+deb11u1) ...
Processing triggers for desktop-file-utils (0.26-1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for libc-bin (2.31-13+deb11u5) ...
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for mailcap (3.69) ...

(四)安装libv4l-dev

root@orangepizero2:~# sudo apt-get install libv4l-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libv4l2rds0
The following NEW packages will be installed:
  libv4l-dev libv4l2rds0
0 upgraded, 2 newly installed, 0 to remove and 111 not upgraded.
Need to get 181 kB of archives.
After this operation, 547 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye/main arm64 libv4l2rds0 arm64 1.20.0-2 [77.2 kB]
Get:2 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye/main arm64 libv4l-dev arm64 1.20.0-2 [103 kB]
Fetched 181 kB in 0s (400 kB/s)
Selecting previously unselected package libv4l2rds0:arm64.
(Reading database ... 139383 files and directories currently installed.)
Preparing to unpack .../libv4l2rds0_1.20.0-2_arm64.deb ...
Unpacking libv4l2rds0:arm64 (1.20.0-2) ...
Selecting previously unselected package libv4l-dev:arm64.
Preparing to unpack .../libv4l-dev_1.20.0-2_arm64.deb ...
Unpacking libv4l-dev:arm64 (1.20.0-2) ...
Setting up libv4l2rds0:arm64 (1.20.0-2) ...
Setting up libv4l-dev:arm64 (1.20.0-2) ...
Processing triggers for libc-bin (2.31-13+deb11u5) ...

(五)安装cmake

root@orangepizero2:~# sudo apt-get install cmake
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  cmake-data libjsoncpp24 librhash0
Suggested packages:
  cmake-doc ninja-build
The following NEW packages will be installed:
  cmake cmake-data libjsoncpp24 librhash0
0 upgraded, 4 newly installed, 0 to remove and 111 not upgraded.
Need to get 5,598 kB of archives.
After this operation, 29.9 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye/main arm64 cmake-data all 3.18.4-2+deb11u1 [1,725 kB]
Get:2 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye/main arm64 libjsoncpp24 arm64 1.9.4-4 [72.5 kB]
Get:3 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye/main arm64 librhash0 arm64 1.4.1-2 [127 kB]
Get:4 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye/main arm64 cmake arm64 3.18.4-2+deb11u1 [3,673 kB]
Fetched 5,598 kB in 4s (1,253 kB/s)
Selecting previously unselected package cmake-data.
(Reading database ... 139408 files and directories currently installed.)
Preparing to unpack .../cmake-data_3.18.4-2+deb11u1_all.deb ...
Unpacking cmake-data (3.18.4-2+deb11u1) ...
Selecting previously unselected package libjsoncpp24:arm64.
Preparing to unpack .../libjsoncpp24_1.9.4-4_arm64.deb ...
Unpacking libjsoncpp24:arm64 (1.9.4-4) ...
Selecting previously unselected package librhash0:arm64.
Preparing to unpack .../librhash0_1.4.1-2_arm64.deb ...
Unpacking librhash0:arm64 (1.4.1-2) ...
Selecting previously unselected package cmake.
Preparing to unpack .../cmake_3.18.4-2+deb11u1_arm64.deb ...
Unpacking cmake (3.18.4-2+deb11u1) ...
Setting up libjsoncpp24:arm64 (1.9.4-4) ...
Setting up librhash0:arm64 (1.4.1-2) ...
Setting up cmake-data (3.18.4-2+deb11u1) ...
Install cmake-data for emacs
Setting up cmake (3.18.4-2+deb11u1) ...
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for libc-bin (2.31-13+deb11u5) ...

二、源码下载&编译&安装

考虑到芒果派MangoPi MQ Quad开发板SoC较强的处理能力,直接在板子上编译安装mjpg-streamer。

(一)源码下载

从全球最大交友网站下载好mjpg-streamer源码 ,如果很久没有响应,需要检测网络。

git clone https://github.com/jacksonliam/mjpg-streamer.git
root@orangepizero2:/# git clone https://github.com/jacksonliam/mjpg-streamer.git
Cloning into 'mjpg-streamer'...
remote: Enumerating objects: 2964, done.
remote: Total 2964 (delta 0), reused 0 (delta 0), pack-reused 2964
Receiving objects: 100% (2964/2964), 3.48 MiB | 1.89 MiB/s, done.
Resolving deltas: 100% (1885/1885), done.

(二)源码编译&安装

进入/mjpg-streamer/mjpg-streamer-experimental 文件夹,执行 make all。

在这里插入图片描述

root@orangepizero2:/mjpg-streamer/mjpg-streamer-experimental# make install
make -C _build install
make[1]: Entering directory '/mjpg-streamer/mjpg-streamer-experimental/_build'
make[2]: Entering directory '/mjpg-streamer/mjpg-streamer-experimental/_build'
make[3]: Entering directory '/mjpg-streamer/mjpg-streamer-experimental/_build'
make[3]: Leaving directory '/mjpg-streamer/mjpg-streamer-experimental/_build'
[ 13%] Built target mjpg_streamer
make[3]: Entering directory '/mjpg-streamer/mjpg-streamer-experimental/_build'
make[3]: Leaving directory '/mjpg-streamer/mjpg-streamer-experimental/_build'
[ 21%] Built target input_file
make[3]: Entering directory '/mjpg-streamer/mjpg-streamer-experimental/_build'
make[3]: Leaving directory '/mjpg-streamer/mjpg-streamer-experimental/_build'
[ 39%] Built target input_http
make[3]: Entering directory '/mjpg-streamer/mjpg-streamer-experimental/_build'
make[3]: Leaving directory '/mjpg-streamer/mjpg-streamer-experimental/_build'
[ 60%] Built target input_uvc
make[3]: Entering directory '/mjpg-streamer/mjpg-streamer-experimental/_build'
make[3]: Leaving directory '/mjpg-streamer/mjpg-streamer-experimental/_build'
[ 69%] Built target output_file
make[3]: Entering directory '/mjpg-streamer/mjpg-streamer-experimental/_build'
make[3]: Leaving directory '/mjpg-streamer/mjpg-streamer-experimental/_build'
[ 82%] Built target output_http
make[3]: Entering directory '/mjpg-streamer/mjpg-streamer-experimental/_build'
make[3]: Leaving directory '/mjpg-streamer/mjpg-streamer-experimental/_build'
[ 91%] Built target output_rtsp
make[3]: Entering directory '/mjpg-streamer/mjpg-streamer-experimental/_build'
make[3]: Leaving directory '/mjpg-streamer/mjpg-streamer-experimental/_build'
[100%] Built target output_udp
make[2]: Leaving directory '/mjpg-streamer/mjpg-streamer-experimental/_build'
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/bin/mjpg_streamer
-- Set runtime path of "/usr/local/bin/mjpg_streamer" to "/usr/local/lib/mjpg-streamer"
-- Installing: /usr/local/share/mjpg-streamer/www
-- Installing: /usr/local/share/mjpg-streamer/www/spinbtn_updn.gif
-- Installing: /usr/local/share/mjpg-streamer/www/static_simple.html
-- Installing: /usr/local/share/mjpg-streamer/www/jquery.rotate.js
-- Installing: /usr/local/share/mjpg-streamer/www/fix.css
-- Installing: /usr/local/share/mjpg-streamer/www/jquery.js
-- Installing: /usr/local/share/mjpg-streamer/www/java_simple.html
-- Installing: /usr/local/share/mjpg-streamer/www/jquery.ui.core.min.js
-- Installing: /usr/local/share/mjpg-streamer/www/sidebarbg.gif
-- Installing: /usr/local/share/mjpg-streamer/www/JQuerySpinBtn.js
-- Installing: /usr/local/share/mjpg-streamer/www/rotateicons.png
-- Installing: /usr/local/share/mjpg-streamer/www/java.html
-- Installing: /usr/local/share/mjpg-streamer/www/jquery.ui.custom.css
-- Installing: /usr/local/share/mjpg-streamer/www/bodybg.gif
-- Installing: /usr/local/share/mjpg-streamer/www/favicon.png
-- Installing: /usr/local/share/mjpg-streamer/www/java_control.html
-- Installing: /usr/local/share/mjpg-streamer/www/functions.js
-- Installing: /usr/local/share/mjpg-streamer/www/javascript_simple.html
-- Installing: /usr/local/share/mjpg-streamer/www/cambozola.jar
-- Installing: /usr/local/share/mjpg-streamer/www/JQuerySpinBtn.css
-- Installing: /usr/local/share/mjpg-streamer/www/index.html
-- Installing: /usr/local/share/mjpg-streamer/www/static.html
-- Installing: /usr/local/share/mjpg-streamer/www/stream_simple.html
-- Installing: /usr/local/share/mjpg-streamer/www/jquery.ui.widget.min.js
-- Installing: /usr/local/share/mjpg-streamer/www/jquery.ui.tabs.min.js
-- Installing: /usr/local/share/mjpg-streamer/www/control.htm
-- Installing: /usr/local/share/mjpg-streamer/www/videolan.html
-- Installing: /usr/local/share/mjpg-streamer/www/javascript_motiondetection.html
-- Installing: /usr/local/share/mjpg-streamer/www/style.css
-- Installing: /usr/local/share/mjpg-streamer/www/javascript.html
-- Installing: /usr/local/share/mjpg-streamer/www/LICENSE.txt
-- Installing: /usr/local/share/mjpg-streamer/www/favicon.ico
-- Installing: /usr/local/share/mjpg-streamer/www/example.jpg
-- Installing: /usr/local/share/mjpg-streamer/www/stream.html
-- Installing: /usr/local/lib/mjpg-streamer/input_file.so
-- Installing: /usr/local/lib/mjpg-streamer/input_http.so
-- Installing: /usr/local/lib/mjpg-streamer/input_uvc.so
-- Installing: /usr/local/lib/mjpg-streamer/output_file.so
-- Installing: /usr/local/lib/mjpg-streamer/output_http.so
-- Installing: /usr/local/lib/mjpg-streamer/output_rtsp.so
-- Installing: /usr/local/lib/mjpg-streamer/output_udp.so
make[1]: Leaving directory '/mjpg-streamer/mjpg-streamer-experimental/_build'

查看下,几个编译后的结果文件都在:

在这里插入图片描述

三、服务启动

###(一)查找摄像头

USB摄像头插在芒果派MangoPi MQ Quad上即可,需要检测摄像头挂载在哪个设备下。

root@orangepizero2:/mjpg-streamer/mjpg-streamer-experimental# lsusb
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 008: ID 2bdf:0280 SN0002 HIK 720P Camera
Bus 002 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@orangepizero2:/mjpg-streamer/mjpg-streamer-experimental# ls -l /dev/video*
crw-rw----+ 1 root video 81, 0 Apr 15 06:25 /dev/video0
crw-rw----+ 1 root video 81, 1 Jul 19 14:36 /dev/video1
crw-rw----+ 1 root video 81, 2 Jul 19 14:36 /dev/video2

(二)启动摄像头

直接输入 mjpg_streamer 即可启动服务,默认的是video0,MangoPi MQ Quad开发板的USB摄像头是video1。在启动服务命令中通过“-d /dev/video1” 选项来指定。

y是表示YUV格式。如果没有-y,默认启动是mjpeg格式
-d指定设备
-f 制订帧数,默认30帧
-r指定视频大小,如320×240
-q指定画质,默认80对于输出参数:
-p 指定端口,一般是8080
-w 指定网页目录,设置的是/www目录
-c设置通过密码访问

./mjpg_streamer -i "./input_uvc.so -d /dev/video1 -f 30 -q 90 -n" -o "./output_http.so -w ./www"

启动后的日志如下:

在这里插入图片描述

四、业务测试

(一)在线视频查看

打开浏览器,访问URL为:[MangoPi MQ Quad开发板 IP]:8080 ,得到的内容如下:

在这里插入图片描述

(二)取一张图

取一张图的URL为IP:8080?action=snapshot

在这里插入图片描述

原贴链接:https://bbs.aw-ol.com/topic/4057/
资源获取、问题讨论可以到全志在线开发者社区进行:https://www.aw-ol.com
全志及开发者最新动态可以关注全志在线微信公众号

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/913099.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

诺依框架ruoyi.js添加默认当年日期范围

ruoyi.js添加方法 // 默认当年日期范围如&#xff1a;2023-01-01到2023-08-22&#xff08;至今&#xff09; export function defaultYearDate(data) {// this.dateDefaultShow new Date();// this.dateDefaultShow.setMonth(new Date().getMonth() - 1);const end new Date…

Twinmotion电脑配置要求,如何低成本高效流畅运行Twinmotion

Twinmotion是一款专门面向建筑、工程、城市规划和景观园林领域而设计的实时可视化渲染软件。与传统较为漫长的渲染过程相比&#xff0c;它可以在几秒钟内轻松制作高品质的图像、全景图、规格图或360VR视频文件。 并且&#xff0c;作为市面上备受欢迎的交互式实时可视化软件&am…

mysql 8.0 窗口函数 之 前后函数、收尾函数、其它函数 与 sql server (2017以后支持) 一样

前后函数 LAG(expr,n) 返回当前行的前n行的expr的值LEAD(expr,n) 返回当前行的后n行的expr的值 收尾函数 FIRST_VALUE(expr) 返回第一个expr的值LAST_VALUE(expr) 返回最后一个expr的值 其它函数 1.NTH_Value(expr,n) 返回第N个expr的值 2. NTILE(n) 将分区中的有序数据分为…

Java课题笔记~ MyBatis分页查询插件

1.添加依赖 <!-- https://mvnrepository.com/artifact/com.github.pagehelper/pagehelper --> <dependency><groupId>com.github.pagehelper</groupId><artifactId>pagehelper</artifactId><version>5.2.0</version> </de…

三种插槽的基本使用

为什么要用插槽&#xff1f; 为了实现父组件每次使用组件时&#xff0c;有不一样的呈现 设置的时候比我们props传值更简单 子组件引用时可以写更加复杂的结构 简单地说就是你自定义的组件在被父组件引用时&#xff0c;本身是有一部分是给你开放的&#xff0c;里面是可以添加其他…

Lua之Lua源文件批量转换为luac字节码文件

准备的工具:luac.exe CSDNhttps://mp.csdn.net/mp_download/manage/download/UpDetailed Unity版: using System; using System.Collections; using System.Collections.Generic; using System.IO; using UnityEditor; using UnityEngine;public static class Batch_LuaToLu…

基于Jenkins自动打包并部署Tomcat环境-------从小白到大神之路之学习运维第85天

第四阶段提升 时 间&#xff1a;2023年8月22日 参加人&#xff1a;全班人员 内 容&#xff1a; 基于Jenkins自动打包并部署Tomcat环境 目录 一、传统网站部署的流程 &#xff08;一&#xff09;传统代码上线的过程 &#xff08;二&#xff09;目前主流网站部署的流程 …

在mac下,使用Docker安装达梦数据库

前言&#xff1a;因为业务需要安装达梦数据库 获取官网下载tar包&#xff08;达梦官网的下载页面https://www.dameng.com/list_103.html&#xff09;&#xff0c;或者通过命令 一、下载tar包 命令下载&#xff1a;wget -O dm8_docker.tar -c https://download.dameng.com/eco/…

matlab将数组值划分为两类

例如&#xff1a;大于0的处理为1&#xff0c;小于0的处理为-1. 当然&#xff0c;可以选择循环结构和选择结构&#xff0c;但是效率会很低。 这里直接使用逻辑语句完成。 % 不使用循环语句&#xff0c;将数组内值划分为两类 clc; clearvars; a[-0.1422 , -0.0433 , 0.1131 …

[ MySQL ] — 如何理解索引以及索引的操作

目录 初识索引 认识磁盘 MySQL与存储 了解磁盘 mysql与磁盘的交互 索引的理解 理解单个Page 理解多个Page 页目录 单页情况 多页情况 索引结构 - B树 聚簇索引 和 非聚簇索引 索引操作 创建主键索引 唯一索引的创建 ​编辑 普通索引的创建 全文索引的创建 查询…

outlook等客户端报错:-ERR Login fail. Please using weixin token to login

使用outlook配置腾讯邮箱后&#xff0c;无法收取邮件&#xff0c;点击接收/发送所有文件夹&#xff0c; 提示报错&#xff1a; 任务“testqq.com - 正在接收”报告了错误(0x800CCC92):“电子邮件服务器拒绝您登录。请在“帐户设置”中验证此帐户的用户名及密码。 响应服务器:…

软件配置安装(破解)--- jdk下载配置

下载jdk 如果有oracle账号的话直接登录下载你想要的版本 不然可以尝试镜像站 HUAWEI镜像&#xff1a;https://repo.huaweicloud.com/java/jdk/ 安装 配置&#xff08;细节&#xff09; 这里的JAVA_HOME就是java的家&#xff0c;也就是解压(或安装)之后的java的目录&#xff…

Codeforces Round 879 Div.2

文章目录 A. Unit ArrayB. Maximum StrengthC. Game with ReversingD. Survey in ClassE. MEX of LCM A. Unit Array Problem - A - Codeforces 统计-1的数量cnt&#xff0c;当cnt为奇数或者n-cnt-cnt < 0&#xff08;1的数量小于-1的数量&#xff09;时&#xff0c;ans&…

第三方软件测试机构可提供哪些测试服务?又有哪些注意事项?

软件测试是使用技术的手段&#xff0c;尽可能发现并改正软件中的错误&#xff0c;提高软件的可靠性及需求性&#xff0c;保障软件质量的过程。该过程也是软件开发完必不可少的一步&#xff0c;但国内还是有一些软件企业存在着“重开发&#xff0c;轻测试”的现象&#xff0c;上…

鹅厂涨薪开启,其它大厂会跟风吗?

从22年开始至今&#xff0c;网络上传言最多的就是“某某公司裁员了百分之多少的员工或是什么大幅度降薪等操作”&#xff0c;可谓是哀鸿遍野&#xff0c;每个人都在祈祷&#xff1a;“下一个被裁的不要是自己&#xff08;老天爷保佑&#xff09;”。 网友们吐槽&#xff1a;这些…

html动态爱心代码【三】(附源码)

目录 前言 特效 内容修改 完整代码 总结 前言 七夕马上就要到了&#xff0c;为了帮助大家高效表白&#xff0c;下面再给大家带来了实用的HTML浪漫表白代码(附源码)背景音乐&#xff0c;可用于520&#xff0c;情人节&#xff0c;生日&#xff0c;表白等场景&#xff0c;可直…

如何下载和安装google字体(中文)

打开&#xff1a;https://fonts.google.com/ 点击字体 下载 解压 双击安装 查看 控制面板-》字体-》

win10 下运行 npm run watch-poll问题

背景&#xff1a;在本地练习laravel项目&#xff0c;windows 宝塔环境&#xff08;之前装过ubuntu子系统&#xff0c;很慢&#xff0c;就放弃了。有知道的兄弟说下&#xff0c;抱拳&#xff09;。以下命令我是在本地项目中用git bash里运行的&#xff0c;最好用管理员权限打开你…

【Python】数据分析工具之各种图

1 漏斗图 漏斗图描述状态阶段的顺序递进关系&#xff0c;属于序列类图表 import plotly.express as pxdata dict(number[39, 27.4, 20.6, 11, 2],stage["Website visit", "Downloads", "Potential customers", "Requested price", &…

H3C 无线网络vlan pool架构案例三层组网web配置

实验的是目标就是要实现华为vlan pool那种应用&#xff0c; 整个园区发一种ssid信号&#xff0c;但是连接的客户端可以随机连上后进入不同的vlan&#xff0c;在这大型园区网非常有用。 这种方法也适合同一个ssid情况下&#xff0c;在不同的位置关联不同的vlan 开启自动固化、…