# Get rtp out stream with external endpoint

**URL:** <https://mediasoup.discourse.group/t/get-rtp-out-stream-with-external-endpoint/1851>\
**Category:** Integration\
**Created:** [October 7, 2020, 6:58pm UTC](https://mediasoup.discourse.group/t/get-rtp-out-stream-with-external-endpoint/1851 "2020-10-07T18:58:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fgolshani](https://avatars.discourse-cdn.com/v4/letter/f/50afbb/32.png) [@fgolshani](https://mediasoup.discourse.group/u/fgolshani)\
**Post date:** [October 7, 2020, 6:58pm UTC](https://mediasoup.discourse.group/t/get-rtp-out-stream-with-external-endpoint/1851/1 "2020-10-07T18:58:39Z")

</div>

Hi,

I have a scenario, for example imagine media soup demo, I want to use ffmpeg to capture rtp stream and have some processing on it (for example converting it to HLS).

The only documentation that I’ve found is this: [https://mediasoup.org/documentation/v3/communication-between-client-and-server/#consuming-media-in-an-external-endpoint](https://mediasoup.org/documentation/v3/communication-between-client-and-server/#consuming-media-in-an-external-endpoint)

so first of all is there any example for RTP OUT scenario ?  
is this line applied to FFMPEG ? "  
" You may need to build a “remote” SDP offer based on those transport and RTP parameters if your endpoint requires a SDP."  
by this I mean can i simply create a consumer transport and use ffmpeg to capture the stream?

And finally what will be the uri that I can use to capture the rtp stream ? I’m guessing rtp://(transport IP):(transport PORT) but It wont work (it will connect but it wont capture any stream).

thanks

---

<div class="post-metadata">

**Author:** ![ibc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/ibc/32/1540_2.png) [@ibc](https://mediasoup.discourse.group/u/ibc)\
**Post date:** [October 7, 2020, 7:05pm UTC](https://mediasoup.discourse.group/t/get-rtp-out-stream-with-external-endpoint/1851/2 "2020-10-07T19:05:39Z")

</div>

> [@fgolshani](#):
>
> is there any example for RTP OUT scenario ?

There are some related projects referenced in the Examples section in the mediasoup website.

> [@fgolshani](#):
>
> can i simply create a consumer transport and use ffmpeg to capture the stream?

And bypass all the other requirements told in the section you referenced? No, you just do more things.

> [@fgolshani](#):
>
> And finally what will be the uri that I can use to capture the rtp stream ? I’m guessing rtp://(transport IP):(transport PORT) but It wont work (it will connect but it wont capture any stream).

This is a ffmpeg related question. No idea.

---

<div class="post-metadata">

**Author:** ![fgolshani](https://avatars.discourse-cdn.com/v4/letter/f/50afbb/32.png) [@fgolshani](https://mediasoup.discourse.group/u/fgolshani)\
**Post date:** [October 7, 2020, 7:20pm UTC](https://mediasoup.discourse.group/t/get-rtp-out-stream-with-external-endpoint/1851/3 "2020-10-07T19:20:01Z")

</div>

Thanks for your quick answer.

> [@ibc](#):
>
> There are some related projects referenced in the Examples section in the mediasoup website.

Actually I couldn’t find any example with capturing stream (there is one for injecting) I’ll be really grateful if you tell me which one is about capturing.

> [@ibc](#):
>
> And bypass all the other requirements told in the section you referenced? No, you just do more things.

I believe I’m satisfying all the requirement that you have specified in that section.  
for example in the demo example, first I’m creating a broadcaster with specifying rtpCapabilites, then I’m creating a transport and finally I’m calling ${SERVER\_URL}/rooms/${ROOM\_ID}/broadcasters/${BROADCASTER\_ID}/transports/${videoTransportId}/consume endpoint to connect the transport to producer to get the stream.  
Is there anymore step that I’m missing ?

---

<div class="post-metadata">

**Author:** ![fgolshani](https://avatars.discourse-cdn.com/v4/letter/f/50afbb/32.png) [@fgolshani](https://mediasoup.discourse.group/u/fgolshani)\
**Post date:** [October 13, 2020, 11:52am UTC](https://mediasoup.discourse.group/t/get-rtp-out-stream-with-external-endpoint/1851/4 "2020-10-13T11:52:31Z")

</div>

Hi,  
The problem solved,  
this project: [https://github.com/ethand91/mediasoup3-record-demo](https://github.com/ethand91/mediasoup3-record-demo)  
helped a lot.
