PC & IT SUPPORT MADE EASY FORUM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Security Camera 1 Min Loop

Go down

Security Camera 1 Min Loop Empty Security Camera 1 Min Loop

Post by jamied_uk 27th October 2017, 00:48

Code:
#!/bin/bash

name="`date +%Y-%m-%d_%H.%M`"

# Where the videos will be saved
BASEpath='/home/jay/scripts/Stream_Recorder'
RECpath=$BASEpath'/video'

# Save the streams using ffmpeg at 30 fps, stopping the capture after 900 seconds (15 minutes). Add more lines if you have more than 2 cameras
ffmpeg -n -i rtsp://192.168.0.34:554 -r 30 -vcodec copy -an -t 60 $RECpath/cam01/$name.mp4
name="`date +%Y-%m-%d_%H.%M`"

-n = no dont overwrite write when this happens, and -y = yes.


Box Link (Updated)
https://app.box.com/s/w9na99lc7quvagspx4ep7onldn1qh6hj
jamied_uk
jamied_uk
Admin

Posts : 3053
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum