Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
RECDIR=/mnt/record/minisio/$(date +%Y-%m-%d)
RECTIME=$(date +-%H:%M:%S)
if [ ! -d "$RECDIR" ]; then
mkdir -p $RECDIR
fi
cd $RECDIR
for i in {0..6}; do
mkdir 1"$i"$RECTIME
done
DURATION=60000000000
gst-launch-1.0 \
rtspsrc location="rtsp://root:Itq140900\!@192.168.1.100/axis-media/media.amp" drop-on-latency=true latency=0 ! rtph264depay ! h264parse ! splitmuxsink location=10$RECTIME/video10%04d.mp4 max-size-time=$DURATION \
rtspsrc location="rtsp://root:Itq140900\!@192.168.1.101/axis-media/media.amp" drop-on-latency=true latency=0 ! rtph264depay ! h264parse ! splitmuxsink location=11$RECTIME/video11%04d.mp4 max-size-time=$DURATION \
rtspsrc location="rtsp://root:Itq140900\!@192.168.1.102/axis-media/media.amp" drop-on-latency=true latency=0 ! rtph264depay ! h264parse ! splitmuxsink location=12$RECTIME/video12%04d.mp4 max-size-time=$DURATION \
rtspsrc location="rtsp://root:Itq140900\!@192.168.1.103/axis-media/media.amp" drop-on-latency=true latency=0 ! rtph264depay ! h264parse ! splitmuxsink location=13$RECTIME/video13%04d.mp4 max-size-time=$DURATION \
rtspsrc location="rtsp://root:Itq140900\!@192.168.1.104/axis-media/media.amp" drop-on-latency=true latency=0 ! rtph264depay ! h264parse ! splitmuxsink location=14$RECTIME/video14%04d.mp4 max-size-time=$DURATION
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment