Skip to content

WebTransport media server that enables ultra low latency live streaming over QUIC (also VOD and rewind)

License

Notifications You must be signed in to change notification settings

rm4n0s/go-media-webtransport-server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NOTICE

This is a fork from 'facebookexperimental/go-media-webtransport-server' and 'facebookexperimental/webcodecs-capture-play'
to put them in one repository and make the client (webcodecs-capture-play) run using Gin with the certificates.
Moreover, I replaced Go compiler from 1.18 to 1.21, to replace the WebTransport's package
from "github.com/adriancable/webtransport-go" to "github.com/quic-go/webtransport-go".
Also, updated the scripts to generate certificates from mkcert.
This way I can study the code without running browser with specific arguments and I will be able to test it from firefox.
Unfortunately, current version of Firefox does not support MediaStreamTrackProcessor.

Installation

Install go 1.21 to compile
Install mkcert from https://github.com/FiloSottile/mkcert
And run

go mod tidy
bash scripts/create-server-certs.sh

go build -o client/client ./client/main.go
go build -o server/server ./server/main.go

Running

First increase the UDP buffer size for WebTransport to work

sudo sysctl -w net.core.rmem_max=2500000
sudo sysctl -w net.core.wmem_max=2500000

Open a terminal and run the server

cd server
./server

Open another terminal and run the client

cd client
./client

Using

Open Google's Chrome and two tabs
The first tab visit https://localhost:8080/encoder
The second tab visit https://localhost:8080/player
Copy the StreamID from the first tab to the second tab
Press start from the first tab (allow camera) and then on the second tab and you will start seeing the feed from the first tab going to the second tab

About

WebTransport media server that enables ultra low latency live streaming over QUIC (also VOD and rewind)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 45.2%
  • HTML 33.8%
  • Go 20.7%
  • Shell 0.3%