From 9f58793f7b609161424280736e6b001129b00bd7 Mon Sep 17 00:00:00 2001 From: Brad Ganley Date: Mon, 21 Oct 2024 23:13:58 -0500 Subject: [PATCH] added readme --- README.md | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..4ce4098 --- /dev/null +++ b/README.md @@ -0,0 +1,53 @@ +# Basic AF IP Camera Recording + +## Overview +Dead-simple IP camera recording with FFmpeg. Chunks the video, deletes old files. No bloat. + +## Setup + +### 1. Configure `.env` +Copy `example.env` to `.env`: +```bash +cp example.env .env +``` + +Edit `.env` as needed: +```env +OUTPUT_PATH=/path/to/cathut +RTSP_URL=rtsp://admin:963852pop@192.168.51.17:554/Streaming/Channels/102 +CHUNK_SIZE=600 +MAX_AGE=720 +``` + +- **OUTPUT_PATH**: Where video chunks go. +- **RTSP_URL**: Your camera stream URL. +- **CHUNK_SIZE**: Video segment length in seconds (default: 600). +- **MAX_AGE**: Max file age in minutes before deletion (default: 720). + +### 2. Make Scripts Executable +```bash +chmod +x start_recording.sh cleanup.sh +``` + +### 3. Start Recording +```bash +./start_recording.sh +``` + +### 4. Set Up Cleanup +Add to cron: +```bash +crontab -e +``` +Add this line: +```bash +*/10 * * * * /path/to/cleanup.sh +``` + +## Prerequisites +- FFmpeg installed (`sudo apt install ffmpeg`) + +## License +Do whatever you want. + +--- \ No newline at end of file