add rtsp parameters

This commit is contained in:
Alfonso Gamboa 2022-05-14 23:10:03 -07:00
parent afbeae9bbd
commit 94b2aad718
2 changed files with 25 additions and 1 deletions

View File

@ -183,7 +183,8 @@ ENABLE_NFSv4="true"
---
RTSP streaming:
You can choose to enable or disable audio. Set your login credentials here, you can also change the port the server listens on.
You can choose to enable or disable audio. Set your login credentials here, server listening port, and the stream bitrate.
(RTSP_ENC_PARAMETER variable accepts numbers only. 0=FIXQP, 1=CBR, 2=VBR, 4=CAPPED VBR, 8=CAPPED QUALITY. Currently only 2, 4, and 8 are working)
```
RTSP_ENABLED="true"
@ -191,6 +192,10 @@ RTSP_ENABLE_AUDIO="true"
RTSP_LOGIN="admin"
RTSP_PASSWORD=""
RTSP_PORT="8554"
RTSP_MAX_BITRATE="2048"
RTSP_TARGET_BITRATE="1024"
RTSP_ENC_PARAMETER="2"
```
the stream will be located at ```rtsp://login:password@IP_ADDRESS:8554/unicast```
@ -202,6 +207,7 @@ Huge credit to @mnakada for his libcallback library: [https://github.com/mnakada
## Latest Updates
* 05-14-22: Added ability to specify RTSP bitrate parameters. Note that changing bitrate in the mobile app will briefly reset the bitrate for the RTSP stream.
* 05-14-22: Update v4l2rtspserver, tinyalsa, alsa-lib. Patch busybox for older official FW's failing to run scripts, fix choppy/static audio in libcallback
* 05-09-22: fix bug in run_mmc.sh that did not store the wlan mac when using a wired usb or ethernet connection for the rtsp server
* 05-09-22: update libcallback sources with patch to fix rtsp across multiple firmware versions for all devices (v3/panv2/db)

View File

@ -35,6 +35,9 @@ RTSP_ENABLE_AUDIO="false"
RTSP_LOGIN="admin"
RTSP_PASSWORD=""
RTSP_PORT="8554"
RTSP_MAX_BITRATE=""
RTSP_TARGET_BITRATE=""
RTSP_ENC_PARAMETER=""
#####GENERAL#####
ENABLE_SWAP="true"
@ -364,8 +367,23 @@ if [[ "$RTSP_ENABLED" == "true" ]]; then
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_PORT &
fi
if [[ "$RTSP_ENC_PARAMETER" != "" ]]; then
watch -n5 -t "/system/bin/impdbg --enc_rc_s 0:44:4:$RTSP_ENC_PARAMETER" > /dev/null 2>&1 &
fi
if [[ "$RTSP_MAX_BITRATE" != "" ]]; then
watch -n5 -t "/system/bin/impdbg --enc_rc_s 0:48:4:$RTSP_MAX_BITRATE" > /dev/null 2>&1 &
fi
if [[ "$RTSP_TARGET_BITRATE" != "" ]]; then
watch -n5 -t "/system/bin/impdbg --enc_rc_s 0:52:4:$RTSP_TARGET_BITRATE" > /dev/null 2>&1 &
fi
else
echo "rtsp disabled"
fi
touch /opt/wz_mini/tmp/.run_mmc_firstrun