Coder Social home page Coder Social logo

camera-images-bash-manager's Introduction

About the Project

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

Prerequisites

  • ffmpeg
    sudo apt install ffmpeg
  • python3

Installation

Be stupid and do it with bash

  1. Clone the repo

    git clone https://github.com/maexled/camera-images-bash-manager.git
    cd camera-images-bash-manager/
  2. Install needed python libraries

    pip install -r requirements.txt 
  3. Create files folder

    mkdir files
  4. 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 files
    • raffer_execution - if you want to execute raffer in other ways (e.g cron), keep it empty

    The other variables should be self-explanatory

  5. Start move.sh in screen

    bash move.sh
  6. Create crontab for raffer.sh, for example crontab -e

    15 0 * * * bash /camera/raffer.sh

    This will execute everyday 00:15 the raffer script makes the video then.

Be smart and do it with docker!

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

Configuration variables in config.cfg:

  • samba_user - The user that should own the files. Will be created in docker container
  • samba_uid - The uid of the user.

camera-images-bash-manager's People

Contributors

dependabot[bot] avatar maexled avatar

Stargazers

 avatar  avatar

Watchers

 avatar

camera-images-bash-manager's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.