Clarification on building re-encoder with libmediasoupclient

I have a working nodejs server setup where web clients can get in and view the broadcast. So I know that the basic operation is working correctly, and I have connected a few hundred clients in testing so I am confident that it is reliable. Mediasoup is awesome…

At this point, I want to introduce a libmediasoupclient re-encoder for scalability. I have everything coded for it to connect as a consumer and produce as a broadcaster. I am not getting any errors and the clients can connect to the new re-encoded producer without any errors.

The problem is, there is no audio (silent) or video (black) being passed through.

The question is:

Is the process simply to call GetTrack() and pass that track as the input to the Producer? or is there more that needs to occur for this to work?

Thanks

That’s how it’s supposed to work and we have it working in same demo in GitHub. You may need to replace the default audio routing in libwebrtc when in Linux or Mac.

Thanks. Must be something in my code then. Which demo are you speaking of? I have not found it.
Also, I am working in linux so…
I am not sure I completely understand the statement about audio routing. Do you mean I need to implement my own AudioSinkInterface, and AudioSource, capture the audio data and push it out my audio source?
I do sometimes get a webrtc race condition error on the audio send (this is even though things are not actually working :slight_smile: yet). Is this related to the reason I need to do this?

AFAIR yes, something like that must be done. Perhaps I was wrong and we don’t have such a demo app published anywhere

Hi @nebulasleuth,

We are trying to do the same on our platform. can you please share on which platform are you trying to do it? we are having issues with audio on aws.

At this stage, I am trying on Ubuntu 18.04 LTS in a dev environment. I have not deployed yet to the cloud, but the expectation will be an Azure ubuntu vm. I have not gotten things working yet. I get a connection, but at this point I get no video and garbled audio. I would welcome code sharing on this if you are up for it.