-
git clone https://github.com/versatica/mediasoup.git
-
cd mediasoup/worker && make
-
go build -mod=vendor
-
MEDIASOUP_WORKER_BIN="path to mediasoup-worker" ./r2wdemo
-
cd web
-
npm install && npm start
OPUS are not supported in rtmp, however, we can still transfer opus packets on rtmp, most of rtmp servers will relay this kind of packets to rtmp clients.
Apply this patch for ffmpeg, then you can use ffmpeg transfer opus packets on rtmp.
- setup a rtmp server, I use lal for testing
- ffmpeg -re -i xx.mp4 -c:v copy -ar 48000 -ac 2 -c:a libopus -f flv rtmp:https://localhost/live/xx
Playing "rtmp:https://localhost/live/xx" in this demo, you will hear sound.