Skip to content

Instantly share code, notes, and snippets.

@Stubbs
Created September 17, 2017 12:02
Show Gist options
  • Save Stubbs/7cbb8acf73e492712b119d0bbf4bcd26 to your computer and use it in GitHub Desktop.
Save Stubbs/7cbb8acf73e492712b119d0bbf4bcd26 to your computer and use it in GitHub Desktop.
NAME=/mnt/hendry/media/Videos/cctv/cctv
if [[ -e $NAME.h264 ]] ; then
i=0
while [[ -e $NAME-$i.h264 ]] ; do
let i++
done
NAME=$NAME-$i
fi
/usr/bin/raspivid -n -t 30000 -o $NAME.h264
/usr/bin/MP4Box -add $NAME.h264 $NAME.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment