Created
May 6, 2019 18:26
-
-
Save boverby/cd0dffebce8870c42a3e4ff2ff97332e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
NASMOUNT=/system/media/nas | |
HOST=`hostname` | |
FILE="${HOST}-`date +%Y-%m-%d_%H.%M.%S.mp4`" | |
DEST=${NASMOUNT}/`date +%Y-%m` | |
if [ "$1" == "on" ]; then | |
mkdir -m 0777 -p ${DEST} | |
CMD="/system/sdcard/bin/avconv -v quiet -probesize 2M -analyzeduration 2M -rtsp_transport tcp -y -i rtsp://0.0.0.0:8554/unicast -vcodec copy -an -strict experimental -t 5 ${DEST}/${FILE} " | |
busybox nohup $CMD & | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment