add rtsp stream video test program

This commit is contained in:
carbon
2023-12-22 22:44:13 +08:00
parent 417deac733
commit e675cf6416
226 changed files with 1894 additions and 0 deletions

View File

@ -1,2 +1,5 @@
mnt/system/
mnt/cfg/
mnt/data/
usr/bin
usr/share

View File

@ -1,2 +1,5 @@
mnt/system/
mnt/cfg/
mnt/data/
usr/bin
usr/share

View File

@ -1,2 +1,5 @@
mnt/system/
mnt/cfg/
mnt/data/
usr/bin
usr/share

View File

@ -1,2 +1,5 @@
mnt/system/
mnt/cfg/
mnt/data/
usr/bin
usr/share

View File

@ -0,0 +1 @@
cvi_sdr_bin_GC2083

View File

@ -0,0 +1,107 @@
#!/bin/sh
# Camera I2C init
/usr/bin/cvi_pinmux -w PAD_MIPIRX1P/IIC1_SDA
/usr/bin/cvi_pinmux -w PAD_MIPIRX0N/IIC1_SCL
sleep 1
#DEFAULT_HOST="192.168.1.3"
echo 16777216 > /proc/sys/net/core/wmem_max
echo "4096 873800 16777216" > /proc/sys/net/ipv4/tcp_wmem
echo "3073344 4097792 16777216" > /proc/sys/net/ipv4/tcp_mem
if [ "$1" == "64M" ]; then
CFG_JSON_FILE="./cfg_64M.json"
elif [ "$1" == "128M" ]; then
CFG_JSON_FILE="./cfg_128M.json"
else
echo "Please input size of RAM!"
echo "e.g. ./CviIspTool.sh 64M"
exit 0
fi
if [ -z "$CVI_RTSP_JSON" ]; then
export CVI_RTSP_JSON=$CFG_JSON_FILE
fi
getopts_get_optional_argument() {
eval next_token=\${$OPTIND}
if [[ -n $next_token && $next_token != -* ]]; then
OPTIND=$((OPTIND + 1))
OPTARG=$next_token
else
OPTARG=""
fi
}
# $1 is used, $2 shift to $1
shift
sed -i 's/"dev-num": 2/"dev-num": 1/g' $CFG_JSON_FILE
while getopts "hgmi" OPTION; do
case $OPTION in
i)
getopts_get_optional_argument $@
if [ -z "$OPTARG" ]; then
HOST=${DEFAULT_HOST}
else
HOST=$OPTARG
fi
echo "set the IP address $HOST to network interface"
;;
g)
GIGABIT="true"
echo "use gigabit ethernet"
;;
m)
if [ -z "$CVI_RTSP_MODE" ]; then
export CVI_RTSP_MODE=1
fi
echo "use multi rtsp server"
sed -i 's/"dev-num": 1/"dev-num": 2/g' $CFG_JSON_FILE
;;
h)
echo "Usage:"
echo " -i set the IP address to network interface"
echo " -g use gigabit ethernet"
echo " -m use multi rtsp server"
echo " -h help (this output)"
exit 0
;;
esac
done
# disable vcodec debug message to minize latency
if [ -d "/sys/module/cv181x_vcodec/" ];then
echo 0x20001 > /sys/module/cv181x_vcodec/parameters/vcodec_mask
elif [ -d "/sys/module/cv180x_vcodec/" ];then
echo 0x20001 > /sys/module/cv180x_vcodec/parameters/vcodec_mask
fi
# enable remap
echo 1 > /sys/module/cvi_vc_driver/parameters/addrRemapEn
echo 256 > /sys/module/cvi_vc_driver/parameters/ARExtraLine
#if [ "$HOST" ]; then
# if [ "$GIGABIT" == "true" ]; then
# # enable gigabit ethernet (=eth1)
# ifconfig eth0 down
# ifconfig eth1 up
# ifconfig eth1 $HOST netmask 255.255.255.0
# #udhcpc -b -i eth1 -R & # unmakr this line to use DHCP
# else
# ifconfig eth1 down
# ifconfig eth0 up
# ifconfig eth0 $HOST netmask 255.255.255.0
# #udhcpc -b -i eth1 -R & # unmark this line to use DHCP
# fi
#fi
# for eaier debugging, add $PWD to LD_LIBRARY_PATH and PATH
SCRIPT_SELF=$(cd "$(dirname "$0")"; pwd)
export LD_LIBRARY_PATH=${SCRIPT_SELF}/lib:${SCRIPT_SELF}/lib/ai:${LD_LIBRARY_PATH}:/mnt/system/usr/lib:/mnt/system/usr/lib/3rd:/lib/3rd
PATH=${SCRIPT_SELF}:/mnt/system/usr/bin:$PATH
cd ${SCRIPT_SELF}
isp_tool_daemon

View File

@ -0,0 +1,49 @@
{
"//": "-----------------------------------------------------------------------------------------------------------------------------------------------------",
"//": "more option please refer https://cvitekcn-my.sharepoint.com/:x:/g/personal/tjyoung_cvitek_com/EavTSnA63CNAl2ZXmKwZnaoBK45WzoKdsrEQ7gwXNxKOpQ?e=l3hgB8",
"//": "-----------------------------------------------------------------------------------------------------------------------------------------------------",
"//": "compress-mode none,tile,line,frame",
"//": "if run AI(face ae) function, make buf1-blk-cnt 4 please!",
"//": "we set venc-bind-vpss=1 can cost down vb blk",
"//": "bitstream-buf-size can set venc buffer size",
"//": "vi-vpss-mode 0.VI_OFFLINE_VPSS_OFFLINE 1.VI_OFFLINE_VPSS_ONLINE",
"//": "vi-vpss-mode 2.VI_ONLINE_VPSS_OFFLINE 3.VI_ONLINE_VPSS_ONLINE",
"//": "when it is wdr mode or dual sensor, we cant't set VI_ONLINE_VPSS_OFFLINE/VI_ONLINE_VPSS_ONLINE",
"//": "devNum decides whether to run oneRtspServer or dualRtspServer",
"//": "devNum=1 dualSensor use the same video-src-info chn0 settings",
"//": "if run sbm mode, set vi-vpss-mode 1 set venc-bind-vpss true",
"dev-num": 1,
"rtsp-port": 8554,
"buf1-blk-cnt": 0,
"vi-vpss-mode": 1,
"model": "./cvi_models/retinaface_mnet0.25_342_608.cvimodel",
"sbm": 0,
"sbm-buf-line": 64,
"sbm-buf-size": 16,
"video-src-info": [
{
"chn": 0,
"buf-blk-cnt": 2,
"venc-bind-vpss": false,
"enable-isp-info-osd": false,
"enable-retinaface": false,
"venc_json": "./vc_param_128M.json",
"codec": "265",
"gop": 50,
"bitrate": 5000,
"compress-mode": "tile"
},
{
"chn": 1,
"buf-blk-cnt": 5,
"venc-bind-vpss": false,
"enable-isp-info-osd": false,
"enable-retinaface": false,
"venc_json": "/mnt/data/vc_param.json",
"codec": "265",
"gop": 50,
"bitrate": 5000,
"compress-mode": "tile"
}
]
}

View File

@ -0,0 +1,51 @@
{
"//": "-----------------------------------------------------------------------------------------------------------------------------------------------------",
"//": "more option please refer https://cvitekcn-my.sharepoint.com/:x:/g/personal/tjyoung_cvitek_com/EavTSnA63CNAl2ZXmKwZnaoBK45WzoKdsrEQ7gwXNxKOpQ?e=l3hgB8",
"//": "-----------------------------------------------------------------------------------------------------------------------------------------------------",
"//": "compress-mode none,tile,line,frame",
"//": "if run AI(face ae) function, make buf1-blk-cnt 4 please!",
"//": "we set venc-bind-vpss=1 can cost down vb blk",
"//": "bitstream-buf-size can set venc buffer size",
"//": "vi-vpss-mode 0.VI_OFFLINE_VPSS_OFFLINE 1.VI_OFFLINE_VPSS_ONLINE",
"//": "vi-vpss-mode 2.VI_ONLINE_VPSS_OFFLINE 3.VI_ONLINE_VPSS_ONLINE",
"//": "when it is wdr mode or dual sensor, we cant't set VI_ONLINE_VPSS_OFFLINE/VI_ONLINE_VPSS_ONLINE",
"//": "devNum decides whether to run oneRtspServer or dualRtspServer",
"//": "devNum=1 dualSensor use the same video-src-info chn0 settings",
"//": "if run sbm mode, set vi-vpss-mode 1 set venc-bind-vpss true",
"dev-num": 1,
"rtsp-port": 8554,
"buf1-blk-cnt": 0,
"vi-vpss-mode": 1,
"model": "./cvi_models/retinaface_mnet0.25_342_608.cvimodel",
"sbm": 0,
"sbm-buf-line": 64,
"sbm-buf-size": 16,
"video-src-info": [
{
"chn": 0,
"buf-blk-cnt": 5,
"venc-bind-vpss": false,
"enable-isp-info-osd": false,
"enable-retinaface": false,
"venc_json": "./vc_param_64M.json",
"codec": "265",
"gop": 50,
"bitrate": 2000,
"compress-mode": "tile",
"rc-mode": 0,
"bitstream-buf-size": 524288
},
{
"chn": 1,
"buf-blk-cnt": 5,
"venc-bind-vpss": false,
"enable-isp-info-osd": false,
"enable-retinaface": false,
"venc_json": "/mnt/data/vc_param.json",
"codec": "265",
"gop": 50,
"bitrate": 5000,
"compress-mode": "tile"
}
]
}

View File

@ -0,0 +1,8 @@
[LOG]
level = 3
[PQBIN]
isEnableSetPQBin = 1
SDR_PQBinName = /mnt/data/bin/cvi_sdr_bin
WDR_PQBinName = /mnt/data/bin/cvi_wdr_bin
isEnableSetSnsCfgPath = 1
SnsCfgPath = ./sensor_cfg.ini

View File

@ -0,0 +1,2 @@
[2022-06-13]
retinaface_mnet0.25_342_608.cvimodel

Binary file not shown.

View File

@ -0,0 +1 @@
libavcodec.so.58.106.100

View File

@ -0,0 +1 @@
libavcodec.so.58.106.100

View File

@ -0,0 +1 @@
libavformat.so.58.58.100

View File

@ -0,0 +1 @@
libavformat.so.58.58.100

View File

@ -0,0 +1 @@
libavutil.so.56.59.100

View File

@ -0,0 +1 @@
libavutil.so.56.59.100

Binary file not shown.

View File

@ -0,0 +1 @@
libcrypto.so.1.1

View File

@ -0,0 +1 @@
libcvi_json-c.so.5

View File

@ -0,0 +1 @@
libcvi_json-c.so.5.1.0

View File

@ -0,0 +1 @@
libjson-c.so.5

View File

@ -0,0 +1 @@
libjson-c.so.5.1.0

View File

@ -0,0 +1 @@
libnanomsg.so.5

View File

@ -0,0 +1 @@
libnanomsg.so.5.1.0

View File

@ -0,0 +1 @@
libopencv_core.so.3.2

View File

@ -0,0 +1 @@
libopencv_core.so.3.2.0

View File

@ -0,0 +1 @@
libopencv_imgcodecs.so.3.2

View File

@ -0,0 +1 @@
libopencv_imgcodecs.so.3.2.0

View File

@ -0,0 +1 @@
libopencv_imgproc.so.3.2

View File

@ -0,0 +1 @@
libopencv_imgproc.so.3.2.0

View File

@ -0,0 +1 @@
libsqlite3.so.0.8.6

View File

@ -0,0 +1 @@
libsqlite3.so.0.8.6

View File

@ -0,0 +1 @@
libssl.so.1.1

View File

@ -0,0 +1 @@
libswresample.so.3.8.100

View File

@ -0,0 +1 @@
libswresample.so.3.8.100

View File

@ -0,0 +1 @@
libuv.so.1

View File

@ -0,0 +1 @@
libuv.so.1.0.0

View File

@ -0,0 +1 @@
libwebsockets.so.17

View File

@ -0,0 +1 @@
libz.so.1

View File

@ -0,0 +1 @@
libz.so.1.2.11

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1,5 @@
{
"video-src-info": [{
"codec": "264"
}]
}

View File

@ -0,0 +1,5 @@
{
"video-src-info": [{
"codec": "265"
}]
}

Some files were not shown because too many files have changed in this diff Show More