Code Monkey home page Code Monkey logo

mediasoupbin's Introduction

mediasoupbin

GStreamer plugin for mediasoup-demo (https://github.com/vpalmisano/mediasoup-demo/).

Install deps

sudo apt install python3 python3-requests python3-gst-1.0 \
    gstreamer1.0-plugins-bad gstreamer1.0-plugins-base \
    gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly \
    gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-python3-plugin-loader \
    gir1.2-gstreamer-1.0 gir1.2-gst-plugins-base-1.0 gir1.2-gst-plugins-bad-1.0

Install using git:

git clone https://github.com/vpalmisano/mediasoupbin.git
cd mediasoupbin
export GST_PLUGIN_PATH=$GST_PLUGIN_PATH:$PWD/gst/plugins

Install using pip:

pip3 install git+https://github.com/vpalmisano/mediasoupbin.git
export GST_PLUGIN_PATH=$GST_PLUGIN_PATH:$(python3 -m site --user-site)/gst/plugins

Producer mode

export PYTHON_DEBUG=5
export GST_DEBUG=2,python:5

gst-launch-1.0 \
    mediasoupbin_py name=ms server-url="https://localhost:4443/rooms/test" \
    videotestsrc is-live=true ! "video/x-raw,width=1280,height=720,framerate=25/1" ! ms. \
    audiotestsrc is-live=true wave=ticks ! "audio/x-raw" ! ms.

Consumer mode

# get the producers list from the server
curl -k "https://localhost:4443/rooms/test/broadcasters" | jq

gst-launch-1.0 mediasoupbin_py name=ms server-url="https://localhost:4443/rooms/test" local-ip=127.0.0.1 \
    ms. ! "video/x-raw,producer-id=<video producer id>" ! autovideosink sync=false \
    ms. ! "audio/x-raw,producer-id=<audio producer id>" ! autoaudiosink sync=false

Docker usage

docker build -t mediasoupbin .

docker run --rm -it --net=host mediasoupbin \
    videotestsrc is-live=true ! "video/x-raw,width=1280,height=720,framerate=25/1" ! mediasoupbin_py

mediasoupbin's People

Contributors

vpalmisano 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.