Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/christianrich/webcam-recorder
Record live webcam streams to mp4 video files
https://github.com/christianrich/webcam-recorder
Last synced: 8 days ago
JSON representation
Record live webcam streams to mp4 video files
- Host: GitHub
- URL: https://github.com/christianrich/webcam-recorder
- Owner: ChristianRich
- Created: 2020-07-09T03:59:59.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T11:01:24.000Z (almost 2 years ago)
- Last Synced: 2023-04-03T23:30:17.288Z (over 1 year ago)
- Language: JavaScript
- Size: 987 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Live web cam to mp4 file recorder
Stream live web cam video to local mp4 video files. This code works by opening a web socket which will receive video blobs from the client which is streamed into a file.
This has only been tested on Mac OS Catalina using Google Chrome v83.
## Prerequisites
- ffmpeg https://ffmpeg.org/ (optional for webm > mp4 post capture conversion)
- node## Install ffmpeg with Homebrew
```
brew uninstall ffmpegbrew update
brew upgrade
brew cleanupbrew install ffmpeg --force
$ brew link ffmpeg
```https://apple.stackexchange.com/questions/238295/installing-ffmpeg-with-homebrew
## Install
```
npm install
npm run build
npm start
```## Capture video
First, build the code `npm run build`.
Start the server with `npm start` and let it wait for incoming web socket connections.Go into the folder `/build/client` and copy the contents of the index file into Google Chrome console.
You should now see a user interface in the bottom left corner with a "Record" and a "Stop" button.When you press "Record" the client will start streaming video blobs into a Node socket server and stream it to a file.
When you press "Stop" the recorder will stop and attempt to convert the webm file into an mp4 using ffmpeg.
If ffmpeg is not present on the system, the conversion is skipped and you're left with the webm file.## TODO
- Allow the user to set a max recording time in the UI
- Display hh:mm:ss recorded in the UI
- Add a close button to the UI which will unregister the component and close the socket
- Add cancel button to UI which will delete the video from disk
- Create a Google Chrome extension for the client script