Skip to content

NodeJS based application handling automated image processing, including generation of timelapses.

License

Notifications You must be signed in to change notification settings

rksiazek/lapseit

Repository files navigation

Lapse It!

Build Status Dependencies Issues License: MIT

NodeJS based web service application, providing handy solution for generation of timelapses.

Getting Started

To run this application on your own you'll have to clone this repository, install dependencies declared in package.json and finally run application by executing 'start' script:

$ git clone https://github.com/rksiazek/lapseit.git project
$ cd project
$ npm install
$ npm run start

Running the tests

To execute all spec's tests procedures with built in Jest library, run following command:

$ npm test

Coding style tests

Coding style tests ensure that developers keep following good and centralized practices regarding code styling.

$ npm lint

API endpoints description

POST /timelapse

Input:

{
  "frameSources": "string[]", -> an array of links of remote images
}

Output:

{
  "status": "failed | waiting | stuck | active | completed",, -> job processing status
  "startedOn": "number",  -> unix time describing when job was started
  "finishedOn": "number", -> unix time describing when job was finished
  "statusPoolLink": "string", -> link that should be used for pooling the state of the job
  "outputResourceUrl": "string", -> link to the output resource (timelapse video)
 }

GET /timelapse/{filename}

Input: Generated timelapse filename

Output: Http stream containing target video

GET /timelapse/status/{id}

Input: Timelapse job id

Output:

{
  "status": "failed | waiting | stuck | active | completed", -> job processing status
  "startedOn": "number",  -> unix time describing when job was started
  "finishedOn": "number", -> unix time describing when job was finished
  "statusPoolLink": "string", -> link that should be used for pooling the state of the job
  "outputResourceUrl": "string", -> link to the output resource (timelapse video)
 }

To do:

  • Configure CI
  • Finish unimplemented tests
  • Implement fallback strategy to resource pull failure
  • Add basic auth (BA) for processed resources access
  • Add service uploading output stream from converter to remote server

Built With

  • NodeJS - An asynchronous event driven JavaScript runtime, designed to build scalable network applications
  • NestJS - A progressive Node.js framework for building efficient, reliable and scalable server-side applications.
  • Bull - Jobs queuing module powered by Redis and wrapped by NestBull module
  • FluentFFmpeg - API bridge between server and FFmpeg - A complete, cross-platform solution to record, convert and stream audio and video.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Radosław Książek - Initial work - rksiazek

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

  • Inspired by timelapse generation from remote resources uploaded to the CDN's by IoT devices, such as IP cameras

About

NodeJS based application handling automated image processing, including generation of timelapses.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published