Skip to content

xiangxud/rtmp-to-webrtc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rtmp-to-webrtc

This repo demonstrates a RTMP server that on every RTMP publish makes the audio/video available via WebRTC playback.

How to use

  • go run *.go
  • Open http://localhost:8080/
  • Publish an RTMP feed to rtmp://localhost:1935/publish/foobar. It must be H264 and alaw

AAC convert to OPUS

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)

macOS Development

brew install opusfile fdk-aac

Ubuntu / Linux Development

apt install -y pkg-config build-essential libopusfile-dev libfdk-aac-dev libavutil-dev libavcodec-dev libswscale-dev

About

Demonstrate a RTMP server that publishes to WebRTC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 83.8%
  • Go 15.2%
  • Other 1.0%