1.0.2 • Published 4 years ago

node-raspivideo-shyd v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

node-raspivideo

Build Status Total alerts

Wrapper for raspivid tool for Raspbian OS. Typescript typedefs included. Includes built in converter to save records in mp4 format.

Reqs

  • Raspberry Pi (tested on 3 version), Raspbian OS with Raspivid lib
  • Node 10+ installed
  • Raspberry camera connected to your Pi

Install

npm i node-raspivideo

Usage

Sample usage

// import {Raspivid} from 'node-raspivideo';
const {Raspivid} = require('node-raspivideo');

const raspivid = new Raspivid({
    videoFolder: './videos',
    verticalFlip: true,
    format: 'mp4'
});

raspivid.record('myvideo', 10000)
    .then(() => {
        console.log('done!');
    })
    .catch((err) => {
        console.error(err);
    });

Current options are:

keytypedefaultsdesc
widthnumber640
heightnumber480
bitratenumber1200000bps
formatstring - 'mp4' or 'h264'mp4
videoFolderstring./videos
verticalFlipbooleanfalse
horizontalFlipbooleanfalse

License info

Lib is MIT licensed.

Sample video file for tests was provided by https://file-examples.com

TODO

  • More docs
  • Streams
  • More tests