npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

pi-camera-rtsp-server

v1.0.0

Published

Raspberry Pi camera RTSP server tested on Pi Zero W using OV5647 module.

Downloads

3

Readme

pi-camera-rtsp-server

Raspberry Pi camera RTSP server tested on Pi Zero W using OV5647 module.

Requirements

Hardware :

  • Raspberry Pi
  • Raspberry Pi compatible camera
  • Pi/camera compatible ribbon cable

System : up-to-date Raspbian

Setting : camera interface enabled from raspi-config

Software :

  • bash
  • nodejs
  • raspivid
  • cvlc from vlc
  • openRTSP from livemedia-utils

No NodeJS dependancies.

API

Camera

camera.config

Settings Object

  • port : RTSP server broadcasting port Default 8554
  • rotation : image rotation Default 0, available 90 180 270 (i.e. -90)

camera.isActive()

Checks if camera feed is active by the following conditions :

  • raspivid (unique) process active
  • RTSP server port open

camera.enable()

Enable camera. Returns Promise

camera.disable()

Disable camera. All active records will be stopped first. Returns Promise

Record

new Record(file, overwrite, duration)

  • file (string) : file path + name. Absolute path required ; use $HOME instead of ~ when applicable.
  • overwrite (boolean) : delete duplicate if exists
  • duration (integer, optional) : automatically stop record after n seconds NOTE: record still can be manually stopped before defined duration.

Record.start()

Start record. Camera will be enabled if not already active. Returns Promise

Record.stop()

Stop record.

Record.file

Record file path + name

Record.duration

Record duration

Record.pid

Record process PID (integer)

Record.startTime

Record start time (Date)

Record.stopTime

Record stop time (Date)

Record.elapsedTime

Record elapsed time in (integer, seconds)

Record.recording

Record active state (boolean)

static Record.stopAll()

Stop all active records.

static Record.records

All records (array of Record instances)

Unit testing

  • Make sure you have ffprobe binary from ffmpeg package
  • Install development dependancies : yarn install
  • Fill test/config.json with your video recording test folder
  • Disable camera (if enabled)
  • Run yarn test

Planned features

License

This project is licensed under GNU GPL v3.