mirror of
https://github.com/gtxaspec/wz_mini_hacks.git
synced 2025-08-09 20:14:04 +00:00
add webcam mode and change rtsp server configs, add avconv for youtube rtmp testing
This commit is contained in:
BIN
SD_ROOT/wz_mini/bin/avconv
Normal file
BIN
SD_ROOT/wz_mini/bin/avconv
Normal file
Binary file not shown.
8
SD_ROOT/wz_mini/etc/init.d/v3_init.sh
Executable file → Normal file
8
SD_ROOT/wz_mini/etc/init.d/v3_init.sh
Executable file → Normal file
@@ -121,6 +121,14 @@ if [[ $(cat /opt/wz_mini/run_mmc.sh | grep "DEBUG_ENABLED\=") == "DEBUG_ENABLED\
|
||||
sed -i '/app_init.sh/,+3d' /opt/wz_mini/tmp/.storage/rcS
|
||||
sed -i '/^# Run init/i/bin/sh /etc/profile' /opt/wz_mini/tmp/.storage/rcS
|
||||
touch /tmp/dbgflag
|
||||
else
|
||||
|
||||
if [[ $(cat /opt/wz_mini/run_mmc.sh | grep "ENABLE_WEB_CAM\=") == "ENABLE_WEB_CAM\=\"true\"" ]]; then
|
||||
sed -i '/app_init.sh/,+3d' /opt/wz_mini/tmp/.storage/rcS
|
||||
sed -i '/^# Run init/i/opt/wz_mini/etc/init.d/wz_cam.sh' /opt/wz_mini/tmp/.storage/rcS
|
||||
touch /tmp/dbgflag
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if ! [[ -e /tmp/dbgflag ]]; then
|
||||
|
24
SD_ROOT/wz_mini/etc/init.d/wz_cam.sh
Normal file
24
SD_ROOT/wz_mini/etc/init.d/wz_cam.sh
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -x
|
||||
|
||||
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
|
||||
insmod /system/driver/tx-isp-t31.ko isp_clk=220000000
|
||||
insmod /system/driver/sensor_gc2053_t31.ko
|
||||
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 &
|
||||
|
||||
#Set dwc2 ID_PIN driver memory
|
||||
devmem 0x13500000 32 0x001100cc
|
||||
devmem 0x10000040 32 0x0b000096
|
||||
#wipe the bits to set the ID_PIN
|
||||
devmem 0x10000040 32 0x0b000FFF
|
BIN
SD_ROOT/wz_mini/lib/modules/libcomposite.ko
Normal file
BIN
SD_ROOT/wz_mini/lib/modules/libcomposite.ko
Normal file
Binary file not shown.
BIN
SD_ROOT/wz_mini/lib/modules/usbcamera.ko
Normal file
BIN
SD_ROOT/wz_mini/lib/modules/usbcamera.ko
Normal file
Binary file not shown.
BIN
SD_ROOT/wz_mini/lib/modules/videobuf2-vmalloc.ko
Normal file
BIN
SD_ROOT/wz_mini/lib/modules/videobuf2-vmalloc.ko
Normal file
Binary file not shown.
@@ -9,6 +9,11 @@ set -x
|
||||
|
||||
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"
|
||||
|
||||
#####NETWORKING#####
|
||||
ENABLE_USB_ETH="false"
|
||||
|
||||
@@ -32,17 +37,16 @@ REMOTE_SPOTLIGHT_HOST="0.0.0.0"
|
||||
#####VIDEO STREAM#####
|
||||
RTSP_LOGIN="admin"
|
||||
RTSP_PASSWORD=""
|
||||
RTSP_PORT="8554"
|
||||
|
||||
RTSP_HI_RES_ENABLED="false"
|
||||
RTSP_HI_RES_ENABLE_AUDIO="false"
|
||||
RTSP_HI_RES_PORT="8554"
|
||||
RTSP_HI_RES_MAX_BITRATE=""
|
||||
RTSP_HI_RES_TARGET_BITRATE=""
|
||||
RTSP_HI_RES_ENC_PARAMETER=""
|
||||
|
||||
RTSP_LOW_RES_ENABLED="false"
|
||||
RTSP_LOW_RES_ENABLE_AUDIO="false"
|
||||
RTSP_LOW_RES_PORT="8555"
|
||||
RTSP_LOW_RES_MAX_BITRATE=""
|
||||
RTSP_LOW_RES_TARGET_BITRATE=""
|
||||
RTSP_LOW_RES_ENC_PARAMETER=""
|
||||
@@ -183,7 +187,6 @@ swap_enable() {
|
||||
first_run_check
|
||||
wait_sdroot
|
||||
wait_wlan
|
||||
hostname_set
|
||||
|
||||
|
||||
if [[ "$ENABLE_SWAP" == "true" ]]; then
|
||||
@@ -361,19 +364,20 @@ if [[ "$RTSP_HI_RES_ENABLED" == "true" ]]; then
|
||||
swap_enable
|
||||
fi
|
||||
|
||||
/opt/wz_mini/bin/cmd video on
|
||||
/opt/wz_mini/bin/cmd audio on
|
||||
|
||||
|
||||
if [[ "$RTSP_PASSWORD" = "" ]]; then
|
||||
RTSP_PASSWORD=$(cat /opt/wz_mini/tmp/wlan0_mac)
|
||||
fi
|
||||
|
||||
/opt/wz_mini/bin/cmd video on
|
||||
|
||||
if [[ "$RTSP_HI_RES_ENABLE_AUDIO" == "true" ]]; then
|
||||
LD_LIBRARY_PATH=/media/mmc/wz_mini/lib /media/mmc/wz_mini/bin/v4l2rtspserver -C 1 -a S16_LE /dev/video1,hw:Loopback,0 -U $RTSP_LOGIN:$RTSP_PASSWORD -P $RTSP_HI_RES_PORT &
|
||||
/opt/wz_mini/bin/cmd audio on
|
||||
AUDIO_CH="-C 1"
|
||||
AUDIO_FMT="-a S16_LE"
|
||||
DEVICE1="/dev/video1,hw:Loopback,0"
|
||||
else
|
||||
echo "rtsp audio disabled"
|
||||
LD_LIBRARY_PATH=/media/mmc/wz_mini/lib /media/mmc/wz_mini/bin/v4l2rtspserver -s /dev/video1 -U $RTSP_LOGIN:$RTSP_PASSWORD -P $RTSP_HI_RES_PORT &
|
||||
DEVICE1="/dev/video1"
|
||||
echo "rtsp audio disabled"
|
||||
fi
|
||||
|
||||
if [[ "$RTSP_HI_RES_ENC_PARAMETER" != "" ]]; then
|
||||
@@ -393,6 +397,7 @@ if [[ "$RTSP_HI_RES_ENABLED" == "true" ]]; then
|
||||
|
||||
fi
|
||||
|
||||
|
||||
if [[ "$RTSP_LOW_RES_ENABLED" == "true" ]]; then
|
||||
|
||||
if [[ "$ENABLE_SWAP" == "true" ]]; then
|
||||
@@ -402,18 +407,19 @@ if [[ "$RTSP_LOW_RES_ENABLED" == "true" ]]; then
|
||||
fi
|
||||
|
||||
/opt/wz_mini/bin/cmd video on1
|
||||
/opt/wz_mini/bin/cmd audio on1
|
||||
|
||||
|
||||
if [[ "$RTSP_PASSWORD" = "" ]]; then
|
||||
RTSP_PASSWORD=$(cat /opt/wz_mini/tmp/wlan0_mac)
|
||||
fi
|
||||
|
||||
if [[ "$RTSP_LOW_RES_ENABLE_AUDIO" == "true" ]]; then
|
||||
LD_LIBRARY_PATH=/media/mmc/wz_mini/lib /media/mmc/wz_mini/bin/v4l2rtspserver -C 1 -a S16_LE /dev/video2,hw:Loopback,1 -U $RTSP_LOGIN:$RTSP_PASSWORD -P $RTSP_LOW_RES_PORT &
|
||||
/opt/wz_mini/bin/cmd audio on1
|
||||
AUDIO_CH="-C 1"
|
||||
AUDIO_FMT="-a S16_LE"
|
||||
DEVICE2="/dev/video2,hw:Loopback,1"
|
||||
else
|
||||
DEVICE2="/dev/video2"
|
||||
echo "rtsp audio disabled"
|
||||
LD_LIBRARY_PATH=/media/mmc/wz_mini/lib /media/mmc/wz_mini/bin/v4l2rtspserver -s /dev/video2 -U $RTSP_LOGIN:$RTSP_PASSWORD -P $RTSP_LOW_RES_PORT &
|
||||
fi
|
||||
|
||||
if [[ "$RTSP_LOW_RES_ENC_PARAMETER" != "" ]]; then
|
||||
@@ -433,6 +439,11 @@ if [[ "$RTSP_LOW_RES_ENABLED" == "true" ]]; then
|
||||
|
||||
fi
|
||||
|
||||
if [[ "$RTSP_LOW_RES_ENABLED" == "true" ]] || [[ "$RTSP_HI_RES_ENABLED" == "true" ]]; then
|
||||
LD_LIBRARY_PATH=/media/mmc/wz_mini/lib /media/mmc/wz_mini/bin/v4l2rtspserver $AUDIO_CH $AUDIO_FMT -U $RTSP_LOGIN:$RTSP_PASSWORD -P $RTSP_PORT $DEVICE1 $DEVICE2
|
||||
fi
|
||||
|
||||
hostname_set
|
||||
touch /opt/wz_mini/tmp/.run_mmc_firstrun
|
||||
sync;echo 3 > /proc/sys/vm/drop_caches
|
||||
sleep 3
|
||||
|
BIN
SD_ROOT/wz_mini/usr/bin/ucamera
Normal file
BIN
SD_ROOT/wz_mini/usr/bin/ucamera
Normal file
Binary file not shown.
16
SD_ROOT/wz_mini/usr/bin/uvc.config
Normal file
16
SD_ROOT/wz_mini/usr/bin/uvc.config
Normal 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}
|
Reference in New Issue
Block a user