GithubHelp home page GithubHelp logo

jnkielmann / recorder-service Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.93 MB

Recorder service reading frames from video source and storing them on disk

Python 94.43% Dockerfile 4.49% Makefile 1.09%

recorder-service's Introduction

Recorder Service

This is a simple service that receives http requests from a self-checkout cashier system and captures the last n frames from the self-checkout camera. The captured frames are then stored in a persistent storage. At the moment the service only supports a local video source and local filesystem storage. recorder-service-diagram.png

Installation

The project can be installed using poetry:

poetry install

Alternatively, you can install the project using pip:

pip install -r requirements.txt

Or you can use the provided Dockerfile to build a docker image:

docker build -t recorder-service .

Usage

The service can be started using the following command (requires poetry):

make run

It is possible to specify the number of frames to capture, the input video source and the output storage directory using the following command:

NUM_FRAMES_TO_CAPTURE='10' LOCAL_VIDEO='data/test_video.mp4' STORAGE_DIR='data/storage' make run

A swagger UI will be available at http://localhost:8080/ where you can test the service.

Run Docker Image

The latest version of the service is available on the GitHub Container Registry. You can run the service using the following command:

docker run -p 8080:8080 ghcr.io/jnkielmann/recorder-service:latest

To use a local video source and persistent storage, you can use the following command:

docker run -p 8080:8080 -e LOCAL_VIDEO='/app/data/my_video.mp4' -v "$(pwd)/data:/app/data" -v "$(pwd)/storage:/app/storage" ghcr.io/jnkielmann/recorder-service:latest

Development

Run the formater and linter:

make format
make lint

Run the tests:

make test

recorder-service's People

Contributors

jnkielmann avatar

Watchers

 avatar

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.