Code Monkey home page Code Monkey logo

rtsp-to-jpeg's Introduction

rtsp-to-jpeg

This little JavaScript app was written to run on node.js on a maxOS server (but should run fine on an Linux or similar) and, using ffmpeg, take a single frame from an RTSP stream and convert it to a .jpeg file and return to the caller of the HTTP GET.

Why does it exist? Because UniFi Protect has the ability to generate RTSP streams from managed cameras on the UniFi Dream Machine PRO or other NVR box, and these can be grabbed and rendered as still images for use as you see fit.

The use case this was developed for was to act as the backend for a Athom Homey flow whereby a press of a doorbell triggers a flow to grab an image using Image Grabber (via HTTP call to this app on my Mac server) and when received sends it on to my phone via a Pushover alert. So, press my doorbell and I get a picture on my phone of who's there. Simples.

Edit config.json to:

  • Set level of logging via Bunyan to the console window
  • Change the frame size of the rendered .jpeg (resolution) and JPEG compression level (quality)
  • Enter the name and URI of the RTSP streams, which in my use case are being generated by my UDMPRO box

The URI for the example files would be http://192.168.0.1/wineCellar for example.

I use pm2 to run the app automatically on boot.

You can also create virtual IP Cams in Homey and specify the URI for on-demand viewing of snapshots (or testing obvs).

rtsp-to-jpeg's People

Contributors

daviwil2 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.