https://github.com/depuits/camprocessor
Bash scripts for maintaining and processing camera image file output.
https://github.com/depuits/camprocessor
Last synced: about 2 months ago
JSON representation
Bash scripts for maintaining and processing camera image file output.
- Host: GitHub
- URL: https://github.com/depuits/camprocessor
- Owner: depuits
- License: apache-2.0
- Created: 2017-07-26T18:05:52.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-12-29T09:34:59.000Z (over 8 years ago)
- Last Synced: 2025-03-02T13:28:29.081Z (over 1 year ago)
- Language: Shell
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CamProcessor (WIP)
Bash scripts for maintaining and processing camera image file output.
## Setup
The cameras should be set to save in the a tmp folder under a camera folder (`/cameras/cam01/tmp/`). These are then timestamped and move to a folder of that date. At the end of the day all images are processed into a single movie and deleted.
### Example:
```
+-- **cam01**
| +-- **tmp** (folder with unprocessed files since last preproccess)
| +-- **24012018** (folder with unprocessed files of today)
| +-- **24012017** (folder with unprocessed files of yesterday)
| +-- **24012016.mkv** (processed output file)
| +-- **24012015.mkv** (processed output file)
| +-- **24012014.mkv** (processed output file)
| +-- **...**
+-- **cam02**
| +-- **tmp**
| +-- **24012018**
| +-- **24012017**
| +-- **24012016.mkv**
| +-- **24012015.mkv**
| +-- **24012014.mkv**
| +-- **...**
+-- **cam03**
| +-- **tmp**
| +-- **24012018**
| +-- **24012017**
| +-- **24012016.mkv**
| +-- **24012015.mkv**
| +-- **24012014.mkv**
| +-- **...**
+-- **...**
+
+
```
### Dependencies
[ImageMagick convert](http://www.imagemagick.org/) - Used to add timestamp onto image.
[MPV](https://mpv.io/) - Used for turning image into an mkv.
### Scripts description
#### 01_preprocess
Timestamp the day and time and then move the image file to its destination.
#### 02_process
Combine all images into the final output.
#### 03_cleanup
When the final file is created remove the source image files and remove final file after the defined ammount of time to free space.
#### dskspc
Check the remaining space on the disk.
#### config
Shared script variables.
### Run automaticly
Add the scipts to crontab with `contab -e`.
```
*/5 * * * * 01_preprocess.sh
0 1 * * * 02_process.sh
0 2 * * * 03_cleanup.sh
30 2 * * * dskspc.sh
```