This repo demonstrates a RTMP server that on every RTMP publish makes the audio/video available via WebRTC playback.
go run *.go
- Open http://localhost:8080/
- Publish an RTMP feed to
rtmp://localhost:1935/publish/foobar
. It must be H264 and alaw
Modify from source https://github.com/Glimesh/rtmp-ingest.git thanks Glimesh
Modify from source mediadevices/pkg/codec/opus at master · pion/mediadevices (github.com)
Modify from source hraban/opus: Go wrapper for libopus (golang) (github.com)
Opus lib ref xiph/opus: Modern audio compression for the internet. (github.com)
Opus Lib : static build(please add your lib to path ./opus/lib name like :libopus-linux-x64.a), pkgconfig dynamic
please build your lib or install your opus lib dev env
of course you can use opus "gopkg.in/hraban/opus.v2"
instead of opus "github.com/sean-der/rtmp-to-webrtc/opus" (just my study)
brew install opusfile fdk-aac
apt install -y pkg-config build-essential libopusfile-dev libfdk-aac-dev libavutil-dev libavcodec-dev libswscale-dev