Skip to content

Continuously monitor webcam using GStreamer tcp stream and saving on file system using FFmpeg.

Notifications You must be signed in to change notification settings

jayeen28/red_eye

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Webcam 24-Hour Recording and Saving Script

It can have different good or bad use cases but for me I wanted to always keep an eye on my desk.

This project contains two scripts to record camera footage continuously for 24 hours and save the recordings. The index.js file starts the gstreamer tcp stream and the gst_tcp_rcv.js file receives the tcp stream and saves the recording using ffmpeg. So you need to have Gstreamer and FFmpeg installed in your system.

Usage

Start the Webcam Server

Use pm2 to manage seperate process.

  1. Start the index.js file pm2 start "node index.js" --name "gst_streamer"
  2. Then start the tcp receiver. pm2 start "node gst_tcp_rcv.js" --name "gst_stream_saver" --cron-restart="01 01 * * * *"

The --cron-restart option is for restarting the process on every hour. Thus the recording will be saved for every hour. Don't forget to use after everything pm2 save.

Releases

No releases published

Packages

No packages published