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

@ -35,7 +35,7 @@ Using this project can potentially expose your device to the open internet depen
* CIFS Supported
* Play .WAV files using "aplay <file> <vol>" command
* iptables included
* Use your camera as a backup Web Camera!
* Use your camera as a spare Web Camera on your PC!
* Inspired by HclX, bakueikozo, and mnakada!

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

View File

@ -12,7 +12,9 @@ HOSTNAME="WCV3"
#### W E B CAMERA###
##THIS MODE DISABLES EVERYTHING AND IT WILL
## WORK AS A WEB CAMERA FOR YOUR PC ***ONLY***
ENABLE_WEB_CAM="false"
WEB_CAM_ENABLE="true"
WEB_CAM_BIT_RATE="8000"
WEB_CAM_FPS_RATE="25"
#####NETWORKING#####
ENABLE_USB_ETH="false"