broadcast a webm file from server

Hi,
First congratulations, this library is simply great!
I need to know if is possible to stream to clients an existing webm file server side (streaming).May be it’s possible using a pipeTransport? Any re-encoding will be necessary in this way.
I have see that is possible client side but unfortunately the example (https://github.com/daily-co/mediasoup-sandbox/tree/master/single-page) doesn’t play the video but show the first frame only.

Thanks

Use Gstreamer or ffmpeg in server side to encode that webm file in the desired code and send it via RTP to mediasoup through a PlainRtpTransport and you are done. There is doc and examples about that in the mediasoup website.

1 Like

Thanks for answer, but I want to avoid to use ffmpeg , I dont need other formats but want to use an existing webm encoded file. it’s possible?

I don’t know. We have created mediasoup and expose a super low level API and complete documentation. But, somehow, most of the time we are being asked about off-topic questions not really related to mediasoup.

Please, read the mediasoup documentation and figure out what you need to do in your side. Looking at an example somewhere is not enough.

In summary, you must send RTP to mediasoup (via a plain RTP transport), you must signal the parameters of your RTP stream by creating a Producer, and you need to send the corresponding codec in that RTP stream (as announced in your Producer’s RTP parameters). That’s all. Whether you can send directly a webm without re-encoding or not… I don’t know, not our business.

I see, sorry to disturb.

Thanks in any case.

It’s not about disturbing. It’s just that mediasoup provides a documented API for doing things, so questions like “can I send a file” do not make sense if yo have read the documentation. Said that, you can use gstreamer or ffmpeg for sending files without encoding (as far as your file is encoder with a coded supported in WebRTC).

Despite of the codec, you need to stream the file in real time (RTP). Without using third party tools like ffmpeg, how are you supposed to do that? Mediasoup does not do that for you.

1 Like