The project is designed to manage images uploaded by a (Hikvision) IP-Camera in a folder using FTP. The images in the temp/
Folder are moved by the move.sh
script in the right folder named by it's current date. Every night should be the raffer.sh
script automatically started to render the images to one full video. Optionally the videos are uploaded to specific nextcloud server, configurable in config.cfg
- ffmpeg
sudo apt install ffmpeg
- python3
-
Clone the repo
git clone https://github.com/maexled/camera-images-bash-manager.git cd camera-images-bash-manager/
-
Install needed python libraries
pip install -r requirements.txt
-
Create files folder
mkdir files
-
Define variables in
config.cfg
fps="10" raffer_execution="00:15" samba_user="samba" samba_uid="1000" object_detection="true" check_for_broken_images="true" save_longtime_pictures="true" save_object_detection="true" save_to_nextcloud="true" nextcloud_host="https://yournextcloud.com" nextcloud_path="Videos" nextcloud_username="Maexled" nextcloud_password="YourSecretPassword"
samba_user
- is the user who will own the moved filesraffer_execution
- if you want to execute raffer in other ways (e.g cron), keep it empty
The other variables should be self-explanatory
-
Start
move.sh
in screenbash move.sh
-
Create crontab for
raffer.sh
, for example crontab -e15 0 * * * bash /camera/raffer.sh
This will execute everyday 00:15 the raffer script makes the video then.
docker run \
--name camera-images-manager \
-v /home/max/cameratest/files:/camera/files \
-v /home/max/cameratest/temp:/camera/temp \
-v /home/max/cameratest/config.cfg:/camera/config.cfg \
-e TZ=Europe/Berlin \
ghcr.io/maexled/camera-images-bash-manager
samba_user
- The user that should own the files. Will be created in docker containersamba_uid
- The uid of the user.