0
  • 聊天消息
  • 系统消息
  • 评论与回复
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
会员中心
创作中心

完善资料让更多小伙伴认识你,还能领取20积分哦,立即完善>

3天内不再提示

【芒果派MangoPi MQ Quad】利用MangoPi MQ Quad部署一个网络摄像头

发烧电子爱好者 来源:发烧电子爱好者 作者:发烧电子爱好者 2023-07-20 09:09 次阅读

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

wKgZomS36umAQOX4AAeJyjP19Zw455.png

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。

wKgZomS389GALRK4AADaZMMWryk828.png
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'

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

wKgZomS39GiAX0nfAACaYwPZw4k360.png

三、服务启动

(一)查找摄像头

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"

启动后的日志如下:

wKgZomS3982AFi3KAAA-3oQYUT0583.png

四、业务测试

(一)在线视频查看

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

wKgZomS3-QaAGhoDAAY6sTnXNUc930.png

(二)取一张图

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

wKgaomS3-YeALh0gAAc1sOGEnj4620.png
审核编辑:汤梓红
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉
  • usb
    usb
    +关注

    关注

    60

    文章

    7945

    浏览量

    264583
  • 开发板
    +关注

    关注

    25

    文章

    5046

    浏览量

    97426
  • 网络摄像头
    +关注

    关注

    2

    文章

    43

    浏览量

    16040
  • 海康威视
    +关注

    关注

    16

    文章

    426

    浏览量

    73211
  • 芒果派
    +关注

    关注

    0

    文章

    11

    浏览量

    82
收藏 人收藏

    评论

    相关推荐

    芒果MangoPi MQ Quad】+芒果做采集本地视频推直播与拉流客户端

    拿到MangoPi MQ Quad之后,我其实是很想用这块小板子做一个家庭使用的IoT的.
    的头像 发表于 07-23 09:07 1109次阅读
    【<b class='flag-5'>芒果</b><b class='flag-5'>派</b><b class='flag-5'>MangoPi</b> <b class='flag-5'>MQ</b> <b class='flag-5'>Quad</b>】+<b class='flag-5'>芒果</b><b class='flag-5'>派</b>做采集本地视频推直播与拉流客户端

    芒果MangoPi MQ Quad】Android10的体验

    芒果MangoPi MQ Quad SBC比较小巧,若能弄起来看小视频最好了。
    的头像 发表于 07-23 11:35 934次阅读
    【<b class='flag-5'>芒果</b><b class='flag-5'>派</b><b class='flag-5'>MangoPi</b> <b class='flag-5'>MQ</b> <b class='flag-5'>Quad</b>】Android10的体验

    【免费试用22期】芒果MangoPi MQ Quad

    Quad:开发板简介:MangoPi芒果MQ Quad
    发表于 05-23 14:29

    芒果MangoPi MQ Quad】+初次刷机

    本帖最后由 march123456 于 2023-6-26 12:29 编辑 刚到手的小粉 工具 芒果MangoPi MQ Quad
    发表于 06-25 22:22

    芒果MangoPi MQ Quad】开箱与资料整理

    、概述 MangoPiMQ Quad块基于全志H616的、兼容树莓 Zero W的开发板,配备了 1GB RAM、
    发表于 06-27 11:35

    芒果MangoPi MQ Quad】开箱与Debian系统体验

    ,通过Win32DiskImager烧入TF卡。 通电,接上HDMI,因为芒果MangoPi MQ Quad比较tiny,所以HDMI需要
    发表于 06-27 23:46

    芒果MangoPi MQ Quad】安卓10系统体验

    上会已经说过了linux系统镜像的安装 这次来说说安卓系统。 首先准备工具 芒果MangoPi MQ Quad开发板 PC机 TF卡
    发表于 07-07 21:59

    芒果MangoPi MQ Pro】+系统安装及编程测试

    的使用方法和树莓比较接近,先使用写镜像软件 Armbian(小众的Linux发行版)镜像写到SD卡中,然后利用芒果派上的SD卡槽进行系
    发表于 07-10 21:49

    芒果MangoPi MQ Quad】开箱+资料准备

    非常感谢给与机会让我测评芒果开发板; 1、合集: 首先来个照片 大集合 板子美照: MangoPi MQ Quad 开发板总结清单和配置
    发表于 07-11 00:00

    芒果MangoPi MQ Quad利用MangoPi MQ Quad部署网络摄像头

    /mjpg-streamer-experimental/_build\' 查看下,几个编译后的结果文件都在: 三、服务启动 ()查找摄像头 USB摄像头插在芒果
    发表于 08-03 23:20

    芒果MangoPi MQ Quad】NCNN在MangoPi MQ Quad上的部署和测试

    本来继上集(【芒果MangoPi MQ Quad利用Ma
    发表于 08-03 23:25

    芒果MangoPi MQ Quad】开箱+系统测试

    很荣幸参与芒果MangoPi MQ Quad试用! 、开箱 收到快递后,是
    发表于 08-04 19:01

    芒果MangoPi MQ Quad】Android10的体验

    芒果MangoPi MQ Quad SBC比较小巧,若能弄起来看小视频最好了。 1、固件下载
    发表于 08-04 19:07

    芒果MangoPi MQ Quad】开箱+系统测试

    很荣幸参与芒果MangoPi MQ Quad试用! 、开箱 收到快递后,是
    的头像 发表于 07-19 21:20 1212次阅读
    【<b class='flag-5'>芒果</b><b class='flag-5'>派</b><b class='flag-5'>MangoPi</b> <b class='flag-5'>MQ</b> <b class='flag-5'>Quad</b>】开箱+系统测试

    NCNN在MangoPi MQ Quad上的部署和测试

    本来继上集(【芒果MangoPi MQ Quad利用Ma
    的头像 发表于 07-22 09:10 1220次阅读
    NCNN在<b class='flag-5'>MangoPi</b> <b class='flag-5'>MQ</b> <b class='flag-5'>Quad</b>上的<b class='flag-5'>部署</b>和测试