Milk-V Duo 摄像头VLC拉流 (2023-08-17 更新)

该测试仅用来测试摄像头是否能正常工作,在Duo上运行测试程序推流,在PC端用VLC播放器拉流。

最新的系统镜像 V1.0.7 已经集成了推流测试程序,不需要再下载测试包传到 Duo 中了。

The latest system image V1.0.7 has integrated the test program, and there is no need to download the test package and transfer it to Duo.

  1. 首先确保可以通过USB网络(RNDIS)正常ssh到Duo设备。
    默认固件ssh的用户名和密码分别是root/milkv

  2. 文末链接下载测试文件包 duo_camera_test_v0.1.tar.gz 并通过scp或其他方式传到Duo上

scp duo_camera_test_v0.1.tar.gz root@192.168.42.1:/root/

登陆到Duo终端
ssh root@192.168.42.1

解压测试包
tar zxf duo_camera_test_v0.1.tar.gz -C /

进入测试程序目录
cd /mnt/data/install/

执行测试程序推流
./CviIspTool.sh 64M

正常情况下,终端最后会看到如下日志

VPSS init with src (1920, 1080) dst (1920, 1080).
CVI_VPSS_CreateGrp:0, s32Ret=0
rtsp://127.0.1.1:8554/stream0
prio:0
CVI_RTSP_SERVICE_CreateFromJsonFile[./cfg_64M.json]
[REMOTE] cvi_raw_dump_run,158: raw dump ready...
waiting for connect...

注意rtsp:开头的链接,把IP改成Duo的IP就是我们要在VLC中拉流的地址了

在PC上打开VLC播放器,菜单“媒体”中选择“打开网络串流”,选择“网络”标签,在“请输入网络URL”中输入

rtsp://192.168.42.1:8554/stream0

再点”播放“,就可以看到摄像头推流的画面了

duo_camera_test_v0.1.tar.gz
测试包链接:百度网盘 请输入提取码
提取码:slut

2023-08-17 更新,支持GC2083

duo_camera_test_v0.2.tar.gz 使用方法同上,注意上传和解压时的包名
测试包链接:https://github.com/milkv-duo/Accessories/blob/master/CAM-GC2083/Software_testing/duo_camera_test_v0.2.tar.gz

注意摄像头排线的连接方向如下:

2 Likes


感谢,已成功

1 Like

请问下,使用什么类型的摄像头,有链接吗?谢谢!!

请问用的什么类型摄像头,能发下摄像头的链接吗

介绍在这Camara for Duo now Available! - Duo - MilkV Community

购买链接 Milk-V CAM-GC2083 (xiaoeknow.com)

请问摄像头什么时候发货啊,买了几天了,没什么动静

提示下面错误,没有启动 :sob:
IOCTL_VB_CMD - vb_ioctl_init NG
sys init failed. s32Ret: 0xffffffff !
init vi fail
CVI_RTSP_SERVICE_CreateFromJsonFile fail -1
CVI_RTSP_SERVICE_CreateFromJsonFile[./cfg_64M.json]
[REMOTE] cvi_raw_dump_run,158: raw dump ready…
waiting for connect…

是不是排线插反了,测一下摄像头的地和板子的地是不是通的

1 Like

duo_camera_test_v0.2.tar.gz这个测试文件的源码有吗,希望可以借鉴一下

试试看配合0817版本的固件+v0.2版本的脚本试试,前提是你的摄像头是GC2083版的

官方采购的摄像头,我重新烧录固件,试下,看是不是还有报错

摄像头画面出来了,不过延迟太严重了,将近2秒的样子,估计是1080p画面尺寸太大

connect: 192.168.42.81
[ERR] SAMPLE_COMM_VENC_Start = 2081, CVI_VENC_StartRecvPic failed with -1
SAMPLE_COMM_VENC_Start failed with 0xffffffff!
init venc chn fail
disconnect: 192.168.42.81

I need some help. I get this error when I try to connect to VLC player. Does anyone know how to fix this error

@Pukkuu6462
GC2083 requires the use of duo_ Camera_ Test_ V0.2.tar.gz

@xiaomin
Yes, this error occur when I use duo_camera_test_v0.2, but I haven’t try the v0.1 yet.

能不能看一下duo_camera_test_v0.2.tar.gz文件的源码 想看看这个摄像头是怎么调用的

i have the same problem

I redo every process again and it work.

Please provide source code to develop on the Duo?
Otherwise the camera is worthless!

I have the GC2083 camera and followed instruction. When opening with VLC, it immediately disconnects. I think the stream0 doesn’t send anything.
Here is the output:

[root@milkv-duo]/mnt/data/install# [LV]:E [MSG]:Accept fail
[LV]:E [MSG]:Accept fail
[SAMPLE_COMM_VPSS_Stop]-150: Vpss stop Grp 0 channel 3 failed! Please check param
SAMPLE_COMM_VPSS_Stop Grp:0, s32Ret: 0xffffffff
ISP Vipipe(0) Free pa(0x83364000) va(0x0x3fd3054000)
[root@milkv-duo]/mnt/data/install# ./CviIspTool.sh 128M
pin PAD_MIPIRX1P
func IIC1_SDA
register: 30010f0
value: 4
pin PAD_MIPIRX0N
func IIC1_SCL
register: 30010f4
value: 4
MMF Version:7e0cc6a08-musl_riscv64
[6]level = 3
[6]isEnableSetPQBin = 1
[6]SDR_PQBinName = /mnt/data/bin/cvi_sdr_bin
[6]WDR_PQBinName = /mnt/data/bin/cvi_wdr_bin
[6]isEnableSetSnsCfg = 1
[6]SnsCfgPath = ./sensor_cfg.ini
[6]Set log level[3] done
[SAMPLE_COMM_SNS_ParseIni]-1938: Parse ./sensor_cfg.ini
[SAMPLE_COMM_SNS_ParseIni]-1948: ./sensor_cfg.ini Not Found
[SAMPLE_COMM_SNS_ParseIni]-1950: Parse /mnt/data/sensor_cfg.ini
[parse_source_devnum]-1605: devNum =  1
[parse_sensor_name]-1686: sensor =  GCORE_GC2083_MIPI_2M_30FPS_10BIT
[parse_sensor_busid]-1714: bus_id =  1
[parse_sensor_i2caddr]-1725: sns_i2c_addr =  37
[parse_sensor_mipidev]-1736: mipi_dev =  0
[parse_sensor_laneid]-1747: Lane_id =  3, 2, 4, -1, -1
[parse_sensor_pnswap]-1758: pn_swap =  0, 0, 0, 0, 0
[6]Sensor Config ini parse fail
[SAMPLE_COMM_SNS_ParseIni]-1938: Parse ./sensor_cfg.ini
[SAMPLE_COMM_SNS_ParseIni]-1948: ./sensor_cfg.ini Not Found
[SAMPLE_COMM_SNS_ParseIni]-1950: Parse /mnt/data/sensor_cfg.ini
[parse_source_devnum]-1605: devNum =  1
[parse_sensor_name]-1686: sensor =  GCORE_GC2083_MIPI_2M_30FPS_10BIT
[parse_sensor_busid]-1714: bus_id =  1
[parse_sensor_i2caddr]-1725: sns_i2c_addr =  37
[parse_sensor_mipidev]-1736: mipi_dev =  0
[parse_sensor_laneid]-1747: Lane_id =  3, 2, 4, -1, -1
[parse_sensor_pnswap]-1758: pn_swap =  0, 0, 0, 0, 0
[6]Sensor Config ini parse fail
set CVI_RTSP_MODE as 0[0:multiSensors->oneRtsp 1:multiSensors->multiRtsp]
// : "if run sbm mode, set vi-vpss-mode 1 set venc-bind-vpss true"
buf1-blk-cnt : 0
dev-num : 1
model : "./cvi_models/retinaface_mnet0.25_342_608.cvimodel"
rtsp-port : 8554
sbm : 0
sbm-buf-line : 64
sbm-buf-size : 16
vi-vpss-mode : 1
video-src-info : [{"bitrate":5000,"buf-blk-cnt":2,"chn":0,"codec":"265","compress-mode":"tile","enable-isp-info-osd":false,"enable-retinaface":false,"gop":50,"venc-bind-vpss":false,"venc_json":"./vc_param_128M.json"},{"bitrate":5000,"buf-blk-cnt":5,"chn":1,"codec":"265","compress-mode":"tile","enable-isp-info-osd":false,"enable-retinaface":false,"gop":50,"venc-bind-vpss":false,"venc_json":"/mnt/data/vc_param.json"}]
[SAMPLE_COMM_SNS_ParseIni]-1938: Parse ./sensor_cfg.ini
[SAMPLE_COMM_SNS_ParseIni]-1948: ./sensor_cfg.ini Not Found
[SAMPLE_COMM_SNS_ParseIni]-1950: Parse /mnt/data/sensor_cfg.ini
[parse_source_devnum]-1605: devNum =  1
[parse_sensor_name]-1686: sensor =  GCORE_GC2083_MIPI_2M_30FPS_10BIT
[parse_sensor_busid]-1714: bus_id =  1
[parse_sensor_i2caddr]-1725: sns_i2c_addr =  37
[parse_sensor_mipidev]-1736: mipi_dev =  0
[parse_sensor_laneid]-1747: Lane_id =  3, 2, 4, -1, -1
[parse_sensor_pnswap]-1758: pn_swap =  0, 0, 0, 0, 0
SAMPLE_COMM_VI_ParseIni Failed!
*** dev_num:1
*** rtspPort:8554
*** rtsp_max_buf_size:1048576
*** vi_vpss_mode:1
*** buf1_blk_cnt:0
*** model_path:./cvi_models/retinaface_mnet0.25_342_608.cvimodel
*** enable_set_sensor_config:0
*** sensor_config_path:/mnt/data/sensor_cfg.ini
*** isp_debug_lvl:255
*** enable_set_pq_bin:0
*** sdr_pq_bin_path:
*** wdr_pq_bin_path:
**** video_src_info[0]
**** - rtspURL:stream
**** - ViChn:0
**** - buf_blk_cnt:2
**** - bEnable3DNR:1
**** - bEnableLSC:1
**** - bVpssBinding:1
**** - VpssChn:0
**** - enableIspInfoOsd:0
**** - compress_mode:1
**** - bVencBindVpss:0
**** - enableRetinaFace:0
**** - venc_cfg.codec:265
**** - venc_cfg.bsMode:0
**** - venc_cfg.rcMode:0
**** - venc_cfg.gop:50
**** - venc_cfg.iqp:38
**** - venc_cfg.pqp:38
**** - venc_cfg.bitrate:4096
**** - venc_cfg.maxbitrate:2000
**** - venc_cfg.firstFrmstartQp:32
**** - venc_cfg.initialDelay:1000
**** - venc_cfg.u32ThrdLv:2
**** - venc_cfg.h264EntropyMode:1
**** - venc_cfg.maxIprop:100
**** - venc_cfg.maxQp:51
**** - venc_cfg.minQp:20
**** - venc_cfg.maxIqp:51
**** - venc_cfg.minIqp:20
**** - venc_cfg.s32IPQpDelta:2
**** - venc_cfg.s32ChangePos:90
**** - venc_cfg.s32MinStillPercent:10
**** - venc_cfg.u32MaxStillQP:31
**** - venc_cfg.u32MotionSensitivity:24
**** - venc_cfg.s32AvbrFrmLostOpen:0
**** - venc_cfg.s32AvbrFrmGap:1
**** - venc_cfg.s32AvbrPureStillThr:4
**** - venc_cfg.bitstreamBufSize:0
**** - venc_cfg.aspectRatioInfoPresentFlag:0
**** - venc_cfg.overscanInfoPresentFlag:0
**** - venc_cfg.videoSignalTypePresentFlag:1
**** - venc_cfg.videoFormat:5
**** - venc_cfg.videoFullRangeFlag:1
**** - venc_cfg.colourDescriptionPresentFlag:0
enable online mode 1
ISP Vipipe(0) Allocate pa(0x82a6d000) va(0x0x3fda4a6000) size(290968)
stSnsrMode.u16Width 1920 stSnsrMode.u16Height 1080 25.000000 wdrMode 0 pstSnsObj 0x3fda900878
[SAMPLE_COMM_VI_StartMIPI]-483: sensor 0 stDevAttr.devno 0
awbInit ver 6.7@10121100
0 R:1400 B:3100 CT:2850
1 R:1500 B:2500 CT:3900
2 R:2300 B:1600 CT:6500
Golden 1024 1024 1024
WB Quadratic:0
isWdr:0
ViPipe:0,===GC2083 1080P 30fps 10bit LINE Init OK!===
********************************************************************************
cvi_bin_isp message
gerritId:      36403          commitId:      c69c5863e      
md5:           cab880835a2ad5184de5ed7762404b84
sensorNum      1              
sensorName0    2083           

PQBIN message
gerritId:      80171          commitId:      5c9d8fc5d      
md5:           ba5a510e093ad42db6788e6c2d13169e
sensorNum      3              
sensorName0    2053           

author:        wanqiang.he    desc:          思博慧CV1812H_GC2083_RGB_mode_V1.0.0
createTime:    2023-08-04 16:48:08version:       V1.1           
tool Version:       v3.0.5.24           mode:      
********************************************************************************
sensorName(0) mismatch, mwSns:2083 != pqBinSns:2053
Cannot open '/dev/cvi-vo': 2, No such file or directory
[SAMPLE_COMM_ISP_Thread]-95: ISP Dev 0 running!
CVI_ISP_GetPubAttr Get FPS: 30.000000
VpssChn0 , Enable Vpss Grp: 0
VPSS init with src (1920, 1080) dst (1920, 1080).
CVI_VPSS_CreateGrp:0, s32Ret=-1073315836
rtsp://127.0.1.1:8554/stream0
prio:0
CVI_RTSP_SERVICE_CreateFromJsonFile[./cfg_128M.json]
[REMOTE] cvi_raw_dump_run,158: raw dump ready...
waiting for connect...
connect: 192.168.42.213
connect: 192.168.42.213
disconnect: 192.168.42.213
disconnect: 192.168.42.213