Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ethand91/mediasoup3-record-demo
Simple Record Demo using Mediasoup 3 and GStreamer
https://github.com/ethand91/mediasoup3-record-demo
ffmpeg gstreamer mediasoup nodejs video webrtc
Last synced: 11 days ago
JSON representation
Simple Record Demo using Mediasoup 3 and GStreamer
- Host: GitHub
- URL: https://github.com/ethand91/mediasoup3-record-demo
- Owner: ethand91
- Created: 2019-08-22T01:54:52.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T04:33:56.000Z (almost 2 years ago)
- Last Synced: 2024-05-01T17:14:24.006Z (9 months ago)
- Topics: ffmpeg, gstreamer, mediasoup, nodejs, video, webrtc
- Language: JavaScript
- Homepage:
- Size: 2.04 MB
- Stars: 191
- Watchers: 9
- Forks: 93
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple video/audio Record Demo Using mediasoup 3 and GStreamer/FFmpeg
---
## Introduction
Simple video/audio record application using Mediasoup and GStreamer
Recorded files are stored in the server's files directory or the directory set by the user (via process.env.RECORD_FILE_LOCATION_PATH)
File names are simply the current timestamp
This sample currently only uses VP8/opus and the output file is .webm
---
## How to use
### Install GStreamer
```bash
# For Ubuntu
sudo apt-get install libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio
```### Install Server Modules
```bash
cd server && npm i
```### Install App Modules
```bash
cd app && npm i
```### Configure the server
Change the announced IP in src/config.js to your local ip (config -> webRtcTransport -> listenIps)
### Start the server
```bash
# The server uses FFmpeg as default
cd server && node src/server# To use GStreamer
PROCESS_NAME="GStreamer" node src/server
```### Build and start the application
```bash
cd app
npm run build# Copy the files from dist to a webserver etc.
# OR start the dev server
npm run dev
```### Access the sample page
https://localhost:8080By default recorded videos will be available in `server/files` directory.
---
## Server ENV Options
| Argument | Type | Explanation |
| -------- | :--: | :---------: |
| RECORD_FILE_LOCATION_PATH | string | Path to store the recorded files (user running node MUST have read/write permission) |
| GSTREAMER_DEBUG_LEVEL | number | GStreamer Debug Level (GStreamer only) |
| PROCESS_NAME | string | The command to use (GStreamer/FFmpeg) (case sensitive) default is FFmpeg |
| SERVER_PORT | number | Server port number (default is 3000). Note if you change this you will also need to edit the WebSocket connection url. |---
## TODO
- video/audio only recording
- Multiple formats (mp4/avi etc)
- Docker support---
Like my work? Any support is appreciated.