mirror of
https://github.com/gtxaspec/wz_mini_hacks.git
synced 2024-11-09 15:08:21 +00:00
add fps to rtsp, revise run_mmc.sh for v2
This commit is contained in:
parent
80378fbd5e
commit
8ec1be1666
@ -221,12 +221,14 @@ RTSP_PORT="8554"
|
|||||||
|
|
||||||
RTSP_HI_RES_ENABLED="true"
|
RTSP_HI_RES_ENABLED="true"
|
||||||
RTSP_HI_RES_ENABLE_AUDIO="true"
|
RTSP_HI_RES_ENABLE_AUDIO="true"
|
||||||
|
RTSP_HI_RES_FPS="20"
|
||||||
RTSP_HI_RES_MAX_BITRATE="2048"
|
RTSP_HI_RES_MAX_BITRATE="2048"
|
||||||
RTSP_HI_RES_TARGET_BITRATE="1024"
|
RTSP_HI_RES_TARGET_BITRATE="1024"
|
||||||
RTSP_HI_RES_ENC_PARAMETER="2"
|
RTSP_HI_RES_ENC_PARAMETER="2"
|
||||||
|
|
||||||
RTSP_LOW_RES_ENABLED="false"
|
RTSP_LOW_RES_ENABLED="false"
|
||||||
RTSP_LOW_RES_ENABLE_AUDIO="false"
|
RTSP_LOW_RES_ENABLE_AUDIO="false"
|
||||||
|
RTSP_LOW_RES_FPS=""
|
||||||
RTSP_LOW_RES_MAX_BITRATE=""
|
RTSP_LOW_RES_MAX_BITRATE=""
|
||||||
RTSP_LOW_RES_TARGET_BITRATE=""
|
RTSP_LOW_RES_TARGET_BITRATE=""
|
||||||
RTSP_LOW_RES_ENC_PARAMETER=""
|
RTSP_LOW_RES_ENC_PARAMETER=""
|
||||||
@ -258,6 +260,7 @@ WEB_CAM_FPS_RATE="25"
|
|||||||
|
|
||||||
## Latest Updates
|
## Latest Updates
|
||||||
|
|
||||||
|
* 05-22-22: added fps variable for rtsp server, thanks @claudobahn.
|
||||||
* 05-22-22: Update wz_mini scripts and libraries to support v2 camera. experimental.
|
* 05-22-22: Update wz_mini scripts and libraries to support v2 camera. experimental.
|
||||||
* 05-20-22: updated to latest libcallback including mp4write, bug fixes: usb direct mac addr, usb webcam mode bad variable.
|
* 05-20-22: updated to latest libcallback including mp4write, bug fixes: usb direct mac addr, usb webcam mode bad variable.
|
||||||
* 05-18-22: Added PC Web Camera functionality, changed RTSP server, when you use enable more than one stream, they share the port and use different paths.
|
* 05-18-22: Added PC Web Camera functionality, changed RTSP server, when you use enable more than one stream, they share the port and use different paths.
|
||||||
|
@ -43,12 +43,14 @@ RTSP_PORT="8554"
|
|||||||
|
|
||||||
RTSP_HI_RES_ENABLED="false"
|
RTSP_HI_RES_ENABLED="false"
|
||||||
RTSP_HI_RES_ENABLE_AUDIO="false"
|
RTSP_HI_RES_ENABLE_AUDIO="false"
|
||||||
|
RTSP_HI_RES_FPS=""
|
||||||
RTSP_HI_RES_MAX_BITRATE=""
|
RTSP_HI_RES_MAX_BITRATE=""
|
||||||
RTSP_HI_RES_TARGET_BITRATE=""
|
RTSP_HI_RES_TARGET_BITRATE=""
|
||||||
RTSP_HI_RES_ENC_PARAMETER=""
|
RTSP_HI_RES_ENC_PARAMETER=""
|
||||||
|
|
||||||
RTSP_LOW_RES_ENABLED="false"
|
RTSP_LOW_RES_ENABLED="false"
|
||||||
RTSP_LOW_RES_ENABLE_AUDIO="false"
|
RTSP_LOW_RES_ENABLE_AUDIO="false"
|
||||||
|
RTSP_LOW_RES_FPS=""
|
||||||
RTSP_LOW_RES_MAX_BITRATE=""
|
RTSP_LOW_RES_MAX_BITRATE=""
|
||||||
RTSP_LOW_RES_TARGET_BITRATE=""
|
RTSP_LOW_RES_TARGET_BITRATE=""
|
||||||
RTSP_LOW_RES_ENC_PARAMETER=""
|
RTSP_LOW_RES_ENC_PARAMETER=""
|
||||||
@ -194,7 +196,7 @@ first_run_check
|
|||||||
wait_sdroot
|
wait_sdroot
|
||||||
wait_wlan
|
wait_wlan
|
||||||
|
|
||||||
if [[ -d /etc/hotplug ]]; then
|
if cat /params/config/.product_config | grep WYZEC1-JZ; then
|
||||||
V2="true"
|
V2="true"
|
||||||
KMOD_PATH="/opt/wz_mini/lib/modules/3.10.14_v2"
|
KMOD_PATH="/opt/wz_mini/lib/modules/3.10.14_v2"
|
||||||
else
|
else
|
||||||
@ -390,7 +392,7 @@ fi
|
|||||||
|
|
||||||
if [[ "$RTSP_HI_RES_ENABLED" == "true" ]]; then
|
if [[ "$RTSP_HI_RES_ENABLED" == "true" ]]; then
|
||||||
|
|
||||||
if [[ -d /etc/hotplug ]]; then
|
if [[ "$V2" == "true" ]]; then
|
||||||
HI_VIDEO_DEV="/dev/video6"
|
HI_VIDEO_DEV="/dev/video6"
|
||||||
else
|
else
|
||||||
HI_VIDEO_DEV="/dev/video1"
|
HI_VIDEO_DEV="/dev/video1"
|
||||||
@ -442,6 +444,14 @@ if [[ "$RTSP_HI_RES_ENABLED" == "true" ]]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "$RTSP_HI_RES_FPS" != "" ]]; then
|
||||||
|
if [[ "$V2" == "true" ]]; then
|
||||||
|
watch -n10 -t "/system/bin/impdbg --enc_rc_s 0:8:4:$RTSP_HI_RES_FPS" > /dev/null 2>&1 &
|
||||||
|
else
|
||||||
|
watch -n10 -t "/system/bin/impdbg --enc_rc_s 0:80:4:$RTSP_HI_RES_FPS" > /dev/null 2>&1 &
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "rtsp disabled"
|
echo "rtsp disabled"
|
||||||
|
|
||||||
@ -449,8 +459,8 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
if [[ "$RTSP_LOW_RES_ENABLED" == "true" ]]; then
|
if [[ "$RTSP_LOW_RES_ENABLED" == "true" ]]; then
|
||||||
|
|
||||||
if [[ -d /etc/hotplug ]]; then
|
if [[ "$V2" == "true" ]]; then
|
||||||
LOW_VIDEO_DEV="/dev/video7"
|
LOW_VIDEO_DEV="/dev/video7"
|
||||||
else
|
else
|
||||||
LOW_VIDEO_DEV="/dev/video2"
|
LOW_VIDEO_DEV="/dev/video2"
|
||||||
@ -503,6 +513,14 @@ if [[ "$RTSP_LOW_RES_ENABLED" == "true" ]]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "$RTSP_LOW_RES_FPS" != "" ]]; then
|
||||||
|
if [[ "$V2" == "true" ]]; then
|
||||||
|
watch -n10 -t "/system/bin/impdbg --enc_rc_s 1:8:4:$RTSP_LOW_RES_FPS" > /dev/null 2>&1 &
|
||||||
|
else
|
||||||
|
watch -n10 -t "/system/bin/impdbg --enc_rc_s 1:80:4:$RTSP_LOW_RES_FPS" > /dev/null 2>&1 &
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "rtsp disabled"
|
echo "rtsp disabled"
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@ if [ "$ACTION" = "unpack" ]; then
|
|||||||
|
|
||||||
dd if=${DEMO_IN} of=$OUT_DIR/rootfs.bin skip=$ROOTFS_OFFSET count=$(($DRIVER_OFFSET-$ROOTFS_OFFSET)) bs=1
|
dd if=${DEMO_IN} of=$OUT_DIR/rootfs.bin skip=$ROOTFS_OFFSET count=$(($DRIVER_OFFSET-$ROOTFS_OFFSET)) bs=1
|
||||||
md5sum $OUT_DIR/rootfs.bin
|
md5sum $OUT_DIR/rootfs.bin
|
||||||
|
|
||||||
dd if=${DEMO_IN} of=$OUT_DIR/driver.bin skip=$DRIVER_OFFSET count=$(($APPFS_OFFSET-$DRIVER_OFFSET)) bs=1
|
dd if=${DEMO_IN} of=$OUT_DIR/driver.bin skip=$DRIVER_OFFSET count=$(($APPFS_OFFSET-$DRIVER_OFFSET)) bs=1
|
||||||
md5sum $OUT_DIR/driver.bin
|
md5sum $OUT_DIR/driver.bin
|
||||||
|
|
||||||
@ -28,8 +29,10 @@ if [ "$ACTION" = "unpack" ]; then
|
|||||||
elif [ "$ACTION" = "pack" ]; then
|
elif [ "$ACTION" = "pack" ]; then
|
||||||
TMP_DIR=$2
|
TMP_DIR=$2
|
||||||
DEMO_OUT=$3
|
DEMO_OUT=$3
|
||||||
# need to pad kernel is its smaller than the stock kernel size, 2097152 bytes
|
|
||||||
|
#need to pad kernel is its smaller than the stock kernel size, 2097152 bytes
|
||||||
dd if=/dev/zero of=$TMP_DIR/kernel.bin bs=1 count=1 seek=2097151
|
dd if=/dev/zero of=$TMP_DIR/kernel.bin bs=1 count=1 seek=2097151
|
||||||
|
|
||||||
cat $TMP_DIR/kernel.bin $TMP_DIR/rootfs.bin $TMP_DIR/driver.bin $TMP_DIR/appfs.bin > $TMP_DIR/flash.bin
|
cat $TMP_DIR/kernel.bin $TMP_DIR/rootfs.bin $TMP_DIR/driver.bin $TMP_DIR/appfs.bin > $TMP_DIR/flash.bin
|
||||||
mkimage -A MIPS -O linux -T firmware -C none -a 0 -e 0 -n jz_fw -d $TMP_DIR/flash.bin $DEMO_OUT
|
mkimage -A MIPS -O linux -T firmware -C none -a 0 -e 0 -n jz_fw -d $TMP_DIR/flash.bin $DEMO_OUT
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user