Git Product home page Git Product logo

mediasoup3-record-demo's Introduction

Simple video/audio Record Demo Using mediasoup 3 and GStreamer


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

# 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

cd server && npm i

Install App Modules

cd app && npm i

Start the server

# Change the listen IP in src/config.js to your local ip (config -> webRtcTransport -> listenIps)
cd server && node src/server

Build and start the application

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:8080


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

TODO

  • video/audio only recording
  • FFmpeg Sample?
  • Multiple formats (mp4/avi etc)
  • Multiple Codec support (VP9/VP8/H264)
  • Option to play the recorded file using RTP Producer after recording
  • Docker support

mediasoup3-record-demo's People

Contributors

ethand91 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.