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

Hello,

I have the exact same issue that lpmorin is having. I am using milkv-duo-v1.0.5-2023-1019.img for the OS image and I am using duo_camera_test_v0.2.tar for the camera testing scripts.

Any advice on my issue would be appreciated.

Here is log output of if helpful:

[root@milkv-duo]~# cd /mnt/data/install
[root@milkv-duo]/mnt/data/install# ./CviIspTool.sh 64M
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":2000,"bitstream-buf-size":524288,"buf-blk-cnt":5,"chn":0,"codec":"265","compress-mode":"tile","enable-isp-info-osd":false,"enable-retinaface":false,"gop":50,"rc-mode":0,"venc-bind-vpss":false,"venc_json":"./vc_param_64M.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:5
**** - 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:1000
**** - venc_cfg.maxbitrate:8192
**** - venc_cfg.firstFrmstartQp:34
**** - venc_cfg.initialDelay:1000
**** - venc_cfg.u32ThrdLv:2
**** - venc_cfg.h264EntropyMode:1
**** - venc_cfg.maxIprop:10
**** - 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:20
**** - venc_cfg.u32MaxStillQP:38
**** - venc_cfg.u32MotionSensitivity:24
**** - venc_cfg.s32AvbrFrmLostOpen:0
**** - venc_cfg.s32AvbrFrmGap:1
**** - venc_cfg.s32AvbrPureStillThr:4
**** - venc_cfg.bitstreamBufSize:524288
**** - venc_cfg.aspectRatioInfoPresentFlag:0
**** - venc_cfg.overscanInfoPresentFlag:0
**** - venc_cfg.videoSignalTypePresentFlag:0
**** - venc_cfg.videoFormat:0
**** - venc_cfg.videoFullRangeFlag:0
**** - venc_cfg.colourDescriptionPresentFlag:0
enable online mode 1
ISP Vipipe(0) Allocate pa(0x83364000) va(0x0x3ff591a000) size(290968)
stSnsrMode.u16Width 1920 stSnsrMode.u16Height 1080 25.000000 wdrMode 0 pstSnsObj 0x3ff5d74878
[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=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...
0 R:1165 B:3087 CT:2688
1 R:1464 B:2327 CT:3937
2 R:1974 B:1613 CT:7225
Golden 1464 1024 2327
connect: 192.168.42.14
disconnect: 192.168.42.14

I am not sure if it’s relevant, but I am seeing error messages in the log output that a config file is missing and also the errors sensorName(0) mismatch, mwSns:2083 != pqBinSns:2053
Cannot open ‘/dev/cvi-vo’: 2, No such file or directory "

Hello MilkV Community,

I am still having the same issue with the video stream on my MilkV Duo not starting when following the instructions on the website (see above). Could someone that has this working successfully reply back with what you are using as your host machine and setup? I am using Ubuntu 22.04 with pretty much a basic installation. I did install x264 and x265 from the repository along with vlc in order to test the Duo camera streaming.

Any advice welcome here! Thanks!

我碰到了和你一样的报错问题,已解决。
我刷内存是28 M的固件(官方的固件)测试这个拉流正常,我修改成58 M 的就是这个。[quote=“wukongxuetang, post:7, topic:280, full:true”]
提示下面错误,没有启动 :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…
[/quote]

目前算能官方以及社区均没有mipi摄像头使用指南,能否提供测试程序源码,谢谢

Some kind of documentation will be very appreciated. The test program is nice to test, but the source code would be great to create our own applications.

Thank you

It seems like older versions of VLC do not properly handle that RTSP url.

I had luck with MPV :slight_smile:

mpv --no-cache --untimed --no-demuxer-thread --video-sync=audio --vd-lavc-threads=1 \ rtsp://192.168.42.1:8554/stream0

This also strongly reduces latency.

Jstoefer,

Thanks for the advice. I installed mpv. I am still not getting stream. When I run the mpv command, I get the following output on the Duo when running CviIspTool.sh:

CVI_VPSS_GetChnFrame Grp: 0 Chn: 0 failed with 0xc0068010

That log message just repeats over and over until I stop mvp on the Ubuntu laptop.

@MilkV folks: Any advice for me? I assume it must be something simple since others are able to preview the stream. However, I can confirm that I have tested on two different Duos with two separate camera modules and get the same results. I’ve also tried to change out the ribbons cables.

Thx for any help here.

@Piper984 Please refer to the FPC Ribbon Cable connection method in the first post. If there is still a problem, please perform this command after powering on the Duo, busybox syslogd -l 8 -s 204800 -O /dev/console, then execute ./CviIspTool.sh 64M, and then send the log to us.

can you share the source code of this demo?

i have the same problem
reading the output the error is
cannot open /dev-cvi/vo

seems there is a problem on sensor Name. 2 rows above i have sensorname(0) mismatch mwSns:2083 != pqBinSns : 2053

using nmap i can’t see the port 8554 open

If the test fails, please provide information as follows:

Power on the device again!

  1. Enter the command in the terminal:

    busybox syslogd -l 8 -s 204800 -O /dev/console
    
  2. Then execute test command:

    ./CviIspTool.sh 64M
    
  3. Post the LOG displayed in the terminal after executing the ./CviIspTool.sh 64M command.

  4. Then open another terminal through ssh and enter the following command, post the displayed content

    cat /proc/cvitek/vi_dbg