659|2

79

帖子

0

TA的资源

一粒金砂(高级)

【VisionFive 2:集成3D GPU RISC-V单板计算机】+10.视频推流测试(zmj) [复制链接]

【VisionFive 2:集成3D GPU RISC-V单板计算机】+10.视频推流测试(zmj)

赛昉科技“昉·星光 2”开发板的USB摄像头(UVC)借助mjpg-streamer实现网页监控推流十分便捷。

1. 下载编译

下载编译流程如下:

//------mjpg-streamer
//---下载
git clone https://github.com/jacksonliam/mjpg-streamer.git
cd mjpg-streamer
cd mjpg-streamer-experimental
gcc -v
//---依赖项/依赖库的安装
sudo apt install cmake
sudo apt-get install -y cmake libjpeg62-turbo-dev
//---编译安装mjpg-streamer
sudo apt install cmake
make all
make install
//---测试指令
sudo /usr/local/bin/mjpg_streamer -i "input_uvc.so -d /dev/video0 -r 1280x720 -y" -o "output_http.so"
部分测试配置(自动)如下所示:
	设备:/dev/video0
	分辨率:1280*720(720P)
	帧率:1帧/秒(此种情况下节省网络带宽,降低CPU占用率)
	格式:YUYV
	端口:8080
//---访问方式(PC端和手机端均OK):
http://192.168.100.200:8080/?action=stream

2. 测试结果

最终呈现效果是网页端实时刷新(1帧/秒)摄像头结果,统一局域网内在PC端和手机端均能正常查看推流效果。

//---测试指令
sudo /usr/local/bin/mjpg_streamer -i "input_uvc.so -d /dev/video0 -r 1280x720 -y" -o "output_http.so"
部分测试配置(自动)如下所示:
	设备:/dev/video0
	分辨率:1280*720(720P)
	帧率:1帧/秒(此种情况下节省网络带宽,降低CPU占用率)
	格式:YUYV
	端口:8080
//---访问方式(PC端和手机端均OK):
http://192.168.100.200:8080/?action=stream

//------测试Log
user@starfive:~/zmj_ws/gst/mjpg-streamer/mjpg-streamer-experimental$ \
> ./mjpg_streamer -h
-----------------------------------------------------------------------
Usage: ./mjpg_streamer
  -i | --input "<input-plugin.so> [parameters]"
  -o | --output "<output-plugin.so> [parameters]"
 [-h | --help ]........: display this help
 [-v | --version ].....: display version information
 [-b | --background]...: fork to the background, daemon mode
-----------------------------------------------------------------------
Example #1:
 To open an UVC webcam "/dev/video1" and stream it via HTTP:
  ./mjpg_streamer -i "input_uvc.so -d /dev/video1" -o "output_http.so"
-----------------------------------------------------------------------
Example #2:
 To open an UVC webcam and stream via HTTP port 8090:
  ./mjpg_streamer -i "input_uvc.so" -o "output_http.so -p 8090"
-----------------------------------------------------------------------
Example #3:
 To get help for a certain input plugin:
  ./mjpg_streamer -i "input_uvc.so --help"
-----------------------------------------------------------------------
In case the modules (=plugins) can not be found:
 * Set the default search path for the modules with:
   export LD_LIBRARY_PATH=/path/to/plugins,
 * or put the plugins into the "/lib/" or "/usr/lib" folder,
 * or instead of just providing the plugin file name, use a complete
   path and filename:
   ./mjpg_streamer -i "/path/to/modules/input_uvc.so"
-----------------------------------------------------------------------
user@starfive:~/zmj_ws/gst/mjpg-streamer/mjpg-streamer-experimental$ \
> sudo /usr/local/bin/mjpg_streamer -i "input_uvc.so -d /dev/video0 -r 1280x720 -y" -o "output_http.so"
MJPG Streamer Version: git rev: 310b29f4a94c46652b20c4b7b6e5cf24e532af39
 i: Using V4L2 device.: /dev/video0
 i: Desired Resolution: 1280 x 720
 i: Frames Per Second.: -1
 i: Format............: YUYV
 i: JPEG Quality......: 80
 i: TV-Norm...........: DEFAULT
UVCIOC_CTRL_ADD - Error at Pan (relative): Inappropriate ioctl for device (25)
UVCIOC_CTRL_ADD - Error at Tilt (relative): Inappropriate ioctl for device (25)
UVCIOC_CTRL_ADD - Error at Pan Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_ADD - Error at Tilt Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_ADD - Error at Pan/tilt Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_ADD - Error at Focus (absolute): Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Pan (relative): Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Tilt (relative): Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Pan Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Tilt Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Pan/tilt Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Focus (absolute): Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at LED1 Mode: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at LED1 Frequency: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Disable video processing: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Raw bits per pixel: Inappropriate ioctl for device (25)
 o: www-folder-path......: disabled
 o: HTTP TCP port........: 8080
 o: HTTP Listen Address..: (null)
 o: username:password....: disabled
 o: commands.............: enabled
 ^[^Csetting signal to stop //手动Ctrl+C退出//
 i: cleaning up resources allocated by input thread
 o: cleaning up resources allocated by server thread #00
force cancellation of threads and cleanup resources
done
user@starfive:~/zmj_ws/gst/mjpg-streamer/mjpg-streamer-experimental$

 

//------测试场景:

image-20230815092646861.png
 

//------测试结果:

image-20230815091448213.png

 

VisionFive2-mjpg_streamer

 

//------END

最新回复

推出的视频流是什么协议的?HLS还是rtmp,还是可以选配协议   详情 回复 发表于 2023-8-18 10:20

回复
举报

6319

帖子

0

TA的资源

五彩晶圆(高级)

视频推流测试主要看的是否流畅,看楼主的视频刷新1帧/秒效果还行吧

 


回复

3

帖子

0

TA的资源

一粒金砂(初级)

推出的视频流是什么协议的?HLS还是rtmp,还是可以选配协议


回复
您需要登录后才可以回帖 登录 | 注册

猜你喜欢
随便看看
查找数据手册?

EEWorld Datasheet 技术支持

相关文章 更多>>
关闭
站长推荐上一条 1/10 下一条

 
EEWorld订阅号

 
EEWorld服务号

 
汽车开发圈

About Us 关于我们 客户服务 联系方式 器件索引 网站地图 最新更新 手机版

站点相关: 国产芯 安防电子 汽车电子 手机便携 工业控制 家用电子 医疗电子 测试测量 网络通信 物联网

北京市海淀区中关村大街18号B座15层1530室 电话:(010)82350740 邮编:100190

电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号 Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved
快速回复 返回顶部 返回列表