add bitrate and fps variables to webcamera

This commit is contained in:
Alfonso Gamboa
2022-05-18 12:43:06 -07:00
parent c98ecf288a
commit 2b92e37f5e
4 changed files with 18 additions and 4 deletions

View File

@@ -2,8 +2,20 @@
set -x
exec 1> /opt/wz_mini/log/wz_cam.log 2>&1
cp /opt/wz_mini/etc/uvc.config /opt/wz_mini/usr/bin/uvc.config
if [[ $(cat /opt/wz_mini/run_mmc.sh | grep "WEB_CAM_FPS_RATE\=") != "" ]]; then
WEB_CAM_FPS_RATE=$(cat /opt/wz_mini/run_mmc.sh | grep "WEB_CAM_FPS_RATE\=" | cut -d'"' -f 2)
echo RATE IS $WEB_CAM_FPS_RATE
sed -i "s/fps_num :30/fps_num :$WEB_CAM_FPS_RATE/" "/opt/wz_mini/usr/bin/uvc.config"
fi
if [[ $(cat /opt/wz_mini/run_mmc.sh | grep "WEB_CAM_BIT_RATE\=") != "" ]]; then
WEB_CAM_BIT_RATE=$(cat /opt/wz_mini/run_mmc.sh | grep "WEB_CAM_BIT_RATE\=" | cut -d'"' -f 2)
sed -i "s/bitrate :8000/bitrate :$WEB_CAM_BIT_RATE/" "/opt/wz_mini/usr/bin/uvc.config"
fi
exec 1> /opt/wz_mini/log/wz_cam.log 2>&1
mount --bind /opt/wz_mini/usr/bin /system/bin
insmod /system/driver/avpu.ko
@@ -13,7 +25,7 @@ insmod /system/driver/audio.ko
insmod /opt/wz_mini/lib/modules/libcomposite.ko
insmod /opt/wz_mini/lib/modules/videobuf2-vmalloc.ko
insmod /opt/wz_mini/lib/modules/usbcamera.ko
cd /system/bin/
/system/bin/ucamera &

View File

@@ -0,0 +1,16 @@
sensor_name :gc2053
i2c_addr :0x37
fps_num :30
width :1920
height :1080
wdr_en :0
bitrate :8000
rcmode :cbr
audio_en :1
gop :30
adb_en :1
speak_en :0
nframes :3
{640, 360}
{1280, 720}
{1920, 1080}