cat /etc/config/mjpg-streamer

在https://downloads.openwrt.org/releases/packages-22.03/aarch64_cortex-a53/packages/目前中,
依次下载并用opkg安装mjpg-streamer:

https://downloads.openwrt.org/releases/packages-22.03/aarch64_cortex-a53/packages/mjpg-streamer-www_1.0.0-5_aarch64_cortex-a53.ipk
https://downloads.openwrt.org/releases/packages-22.03/aarch64_cortex-a53/packages/mjpg-streamer-input-uvc_1.0.0-5_aarch64_cortex-a53.ipk
https://downloads.openwrt.org/releases/packages-22.03/aarch64_cortex-a53/packages/mjpg-streamer-output-http_1.0.0-5_aarch64_cortex-a53.ipk

安装v4l-utils
http://downloads.openwrt.org/releases/22.03.3/targets/mediatek/mt7622/packages/libstdcpp6_11.2.0-4_aarch64_cortex-a53.ipk
http://downloads.openwrt.org/releases/packages-22.03/aarch64_cortex-a53/packages/libv4l_1.20.0-4_aarch64_cortex-a53.ipk
http://downloads.openwrt.org/releases/packages-22.03/aarch64_cortex-a53/packages/v4l-utils_1.20.0-4_aarch64_cortex-a53.ipk

root@OpenWrt:~# v4l2-ctl -V
Format Video Capture:
Width/Height : 320/240
Pixel Format : ‘YUYV’
Field : None
Bytes per Line: 640
Size Image : 153600
Colorspace : SRGB

mjpg_streamer –input “input_uvc.so –device /dev/video0 –fps 60 –resolution 1920×1080” –output “output_http.so –www /www –port 8080”

/etc/init.d/mjpg-streamer enable //设置开机自动启动
/etc/init.d/mjpg-streamer disable //禁止开机自动启动
/etc/init.d/mjpg-streamer start //现在启动
/etc/init.d/mjpg-streamer restart //重启
/etc/init.d/mjpg-streamer stop //停止

root@OpenWrt:~# mjpg_streamer -i “input_uvc.so –help”
MJPG Streamer Version.: 2.0
—————————————————————
Help for input plugin..: UVC webcam grabber
—————————————————————
The following parameters can be passed to this plugin:

[-d | –device ]…….: video device to open (your camera)
[-r | –resolution ]…: the resolution of the video device,
can be one of the following strings:
QQVGA QCIF CGA QVGA CIF PAL
VGA SVGA XGA HD SXGA UXGA
FHD
or a custom value like the following
example: 640×480
[-f | –fps ]……….: frames per second
(camera may coerce to different value)
[-q | –quality ] …..: set quality of JPEG encoding
[-m | –minimum_size ].: drop frames smaller then this limit, useful
if the webcam produces small-sized garbage frames
may happen under low light conditions
[-e | –every_frame ]..: drop all frames except numbered
[-n | –no_dynctrl ]…: do not initalize dynctrls of Linux-UVC driver
[-l | –led ]……….: switch the LED “on”, “off”, let it “blink” or leave
it up to the driver using the value “auto”
[-t | –tvnorm ] ……: set TV-Norm pal, ntsc or secam
[-u | –uyvy ] ……..: Use UYVY format, default: MJPEG (uses more cpu power)
[-y | –yuv ] ……..: Use YUV format, default: MJPEG (uses more cpu power)
[-fourcc ] …………: Use FOURCC codec ‘argopt’,
currently supported codecs are: RGB24, RGBP
[-timestamp ]……….: Populate frame timestamp with system time
[-softfps] …………: Drop frames to try and achieve this fps
set your camera to its maximum fps to avoid stuttering
[-timeout] …………: Timeout for device querying (seconds)
[-dv_timings] ………: Enable DV timings queriyng and events processing
—————————————————————

Optional parameters (may not be supported by all cameras):

[-br ]……………..: Set image brightness (auto or integer)
[-co ]……………..: Set image contrast (integer)
[-sh ]……………..: Set image sharpness (integer)
[-sa ]……………..: Set image saturation (integer)
[-cb ]……………..: Set color balance (auto or integer)
[-wb ]……………..: Set white balance (auto or integer)
[-ex ]……………..: Set exposure (auto, shutter-priority, aperature-priority, or integer)
[-bk ]……………..: Set backlight compensation (integer)
[-rot ]…………….: Set image rotation (0-359)
[-hf ]……………..: Set horizontal flip (true/false)
[-vf ]……………..: Set vertical flip (true/false)
[-pl ]……………..: Set power line filter (disabled, 50hz, 60hz, auto)
[-gain ]……………: Set gain (auto or integer)
[-cagc ]……………: Set chroma gain control (auto or integer)
—————————————————————