# Broadcasting demo room to external streaming service (youtube,etc)

**URL:** <https://mediasoup.discourse.group/t/broadcasting-demo-room-to-external-streaming-service-youtube-etc/1719>\
**Category:** mediasoup-demo\
**Created:** [September 9, 2020, 8:19am UTC](https://mediasoup.discourse.group/t/broadcasting-demo-room-to-external-streaming-service-youtube-etc/1719 "2020-09-09T08:19:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nueq22](https://avatars.discourse-cdn.com/v4/letter/n/c4cdca/32.png) [@nueq22](https://mediasoup.discourse.group/u/nueq22)\
**Post date:** [September 9, 2020, 8:19am UTC](https://mediasoup.discourse.group/t/broadcasting-demo-room-to-external-streaming-service-youtube-etc/1719/1 "2020-09-09T08:19:48Z")

</div>

I need to broadcast room videos/audios to some external broadcasting provider like youtube with rtmp/rtsp. Is this possible with mediasoup? I found a schema when the router has rts out, but now I don’t understand how to do it. Which part of the docs do I need to investigate if this is possible?

---

<div class="post-metadata">

**Author:** ![jmillan](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/jmillan/32/9_2.png) [@jmillan](https://mediasoup.discourse.group/u/jmillan)\
**Post date:** [September 9, 2020, 2:16pm UTC](https://mediasoup.discourse.group/t/broadcasting-demo-room-to-external-streaming-service-youtube-etc/1719/2 "2020-09-09T14:16:32Z")

</div>

mediasoup API does not come with such a solution per se.

mediasoup routes RTP streams to endpoints and it is the job of these rendering the content of the different audio/video streams, ie ,in the screen and loudspeakers.

If you want to broadcast a whole room (as in mediasoup-demo) to an external service, you will have to do something like the following:

- Run a server side browser that connects to the room.
  - Indicating it to use a virtual X display (instead of a physical display)
  - Indicating it to use a virtual sound card (instead of a physical speaker)

At this point the room would have this remote attendee which is rendering the room on a virtual X display and the mixed audio on the virtual sound card.

- Start a FFMpeg, GStreamer or similar program that takes the audio and video from the virtual devices used by the browser to output the audio/video and send them to the given service.
