Reputation: 61
I'm using ffmpeg to capture a RTSP stream to a file using the following command:
ffmpeg -i rtsp://[IP Address]:[port]/[URL] -vcodec copy -r 60 -t 2600 -y /[outputfile].mp4
This works ok and captures 60 mins fine. What I'd like to be able to do is:
capture1.mp4 capture2.mp4
etc.LIVE555...
). I'd like to change this to
source + timestamp
. Is this possible in ffmpeg or do i need to put a script wrapper around the ffmpeg command? If so, any examples of those I can re-use please?
This is on Ubuntu linux using latest ffmpeg package and using apt-get install ffmpeg
to install so it's built from source.
Thanks
Upvotes: 6
Views: 13011
Reputation: 4275
output hourly video files
You can start ffmpeg over crontab every hour Ubuntu Crontab
0 * * * * ffmpeg -i rtsp://[IP Address]:[port]/[URL] -vcodec copy -r 60 -t 3540 -y $(date +\%Y\%m\%d\%H).mp4
add a text overlay
You can find more Information here ->https://stackoverflow.com/questions/17623676/text-on-video-ffmpeg
cleanup old files
Remove old videos -> Delete files older than 10 days using shell script in Unix
Upvotes: 8