Comments (7)
We do have plans to support really large rooms. Though if I'm understanding your use correctly, you should be able to join multiple rooms as a publisher, and publish your track to each room separately.
from livekit.
edit: misread the reply...
joining multiple rooms on the client side would however introduce a significant overhead esp. in simulcast scenarios, what i meant was a solution within the server, basically what mediasoup does with pipeToRouter
https://mediasoup.org/documentation/v3/mediasoup/api/#router-pipeToRouter
from livekit.
pipeToRouter
would only work with rooms on the same host. LiveKit is a distributed service, so we likely wouldn't introduce features that rely on the location of two different rooms.
Though, you could implement a version of bridging feature yourself by using the Go server SDK. You could do something like:
- Connect to the source room as a hidden participant (will be supported in 0.11.1+)
- Connect to the destination room as normal participant
- Read tracks from source room and republish to destination
This would work well for audio and non-simulcast video tracks. With simulcast, however, only a single layer will be forwarded on.
from livekit.
thanks for the suggestion!
pipeToRouter
would only work with rooms on the same host. LiveKit is a distributed service, so we likely wouldn't introduce features that rely on the location of two different rooms.
just fyi, it is possible to make the pipeToRouter
approach work across hosts, but the signalling between hosts is just not part of mediasoup.
from livekit.
gotcha, that makes sense. we'll definitely take it into consideration.
from livekit.
@davidzhao Hi. I'm trying to implement bridge (proxy) between two livekit rooms in this way:
- Connect to the source room
- Connect to the destination room
- Read tracks from source room and republish to destination
and find out that my video stream isn't stable and have regular interruptions.
Code is here
func (proxy *LivekitProxy) proxyH264SampleTrackWithPliReport(
incomingWebrtcTrack *webrtc.TrackRemote,
incomingPublication *lksdk.RemoteTrackPublication,
remoteParticipant *lksdk.RemoteParticipant,
) error {
outcomingTrack, err := lksdk.NewLocalSampleTrack(
webrtc.RTPCodecCapability{
MimeType: incomingPublication.MimeType(),
},
)
if err != nil {
log.Fatal(err)
}
if _, err := proxy.publisherRoom.LocalParticipant.PublishTrack(outcomingTrack, &lksdk.TrackPublicationOptions{
Name: incomingPublication.Name(),
}); err != nil {
log.Fatal(err)
}
go func() {
sb := livekitsamplebuilder.New(
1000,
&codecs.H264Packet{},
incomingWebrtcTrack.Codec().ClockRate,
livekitsamplebuilder.WithPacketDroppedHandler(func() {
log.Println("pli from proxy")
remoteParticipant.WritePLI(incomingWebrtcTrack.SSRC())
}),
)
for {
rtpPacket, _, err := incomingWebrtcTrack.ReadRTP()
if err != nil {
log.Fatal(err)
}
sb.Push(rtpPacket.Clone())
for {
sample, _ := sb.PopWithTimestamp()
if sample == nil {
break
}
if err := outcomingTrack.WriteSample(*sample, nil); err != nil {
log.Fatal(err)
}
}
}
}()
return nil
}
Am I to understand that for working this way I need to implement something like rtp buffer in my application for forward error correction tasks via RTCP??
from livekit.
buffering is built into our Go SDK, (when you use samplebuilder, it's buffering for you). What do you mean by and find out that my video stream isn't stable and have regular interruptions
? Can you describe these in more detail?
also I see you are handling packet loss from the original publisher, but not PLI packets coming from the destination (if the forward destination dropped frames, you'll need to signal to the original room too).
from livekit.
Related Issues (20)
- Failed to execute 'getStats' on 'RTCPeerConnection': The callback-based getStats() method is no longer supported.
- How to host a production LiveKit server *without* WSS? HOT 1
- LiveKit Server Startup Error: Secret Key Length and Redis Connection Issues
- h264 issue HOT 2
- publish issue HOT 1
- BitrateScore is always MaxScore HOT 4
- Participant pair can not be selected HOT 2
- activeSpeakers array contains stale references if participant disconnects while speaking
- Disconnected without doing anything HOT 1
- Disconnected without doing anything HOT 3
- If deploy on server, how many people can support at same time on a 4GB memory server? HOT 2
- How to have multiple people on the same call HOT 3
- What is a `Track` as Mentioned in the React Documentation?
- How to add third party participants with a single "sendrecv" PeerConnection
- Calling ParticipantLeft twice HOT 1
- How to distinguish different audio tracks?
- nat issue HOT 1
- nat issue
- Participant counting API returns negative values HOT 1
- Others could hear my voice but I couldn't hear others' voices when I minimized the webview on iOS.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from livekit.