# pipeTransport

**URL:** <https://mediasoup.discourse.group/t/pipetransport/5131>\
**Category:** mediasoup libraries\
**Created:** [April 5, 2023, 12:20pm UTC](https://mediasoup.discourse.group/t/pipetransport/5131 "2023-04-05T12:20:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![moein9gh](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/moein9gh/32/1851_2.png) [@moein9gh](https://mediasoup.discourse.group/u/moein9gh)\
**Post date:** [April 5, 2023, 12:20pm UTC](https://mediasoup.discourse.group/t/pipetransport/5131/1 "2023-04-05T12:20:09Z")

</div>

I need a tested and verified sample for pipeTransport  
I found two samples but I have a problem  
I could consume correctly but I can’t hear any voice I app

samples:

> **[GitHub - craterone/mediasoup-pipetransport](https://github.com/craterone/mediasoup-pipetransport)**
>
> Contribute to craterone/mediasoup-pipetransport development by creating an account on GitHub.

> **[GitHub - mganeko/mediasoup\_v3\_example: WebRTC SFU mediasoup v3 example](https://github.com/mganeko/mediasoup_v3_example)**
>
> WebRTC SFU mediasoup v3 example. Contribute to mganeko/mediasoup\_v3\_example development by creating an account on GitHub.

thanks for you attention

---

<div class="post-metadata">

**Author:** ![BronzedBroth](https://avatars.discourse-cdn.com/v4/letter/b/ad7895/32.png) [@BronzedBroth](https://mediasoup.discourse.group/u/BronzedBroth)\
**Post date:** [April 5, 2023, 2:30pm UTC](https://mediasoup.discourse.group/t/pipetransport/5131/2 "2023-04-05T14:30:59Z")

</div>

What you detailed in the other post, it sounds about right the process, but there could be issues with the code, does the audio transmit if it’s sent only? As if the problem only occurs when sending two tracks and possibly when initiating the pipe connections?

---

<div class="post-metadata">

**Author:** ![zaidiqbal](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/zaidiqbal/32/1498_2.png) [@zaidiqbal](https://mediasoup.discourse.group/u/zaidiqbal)\
**Post date:** [April 5, 2023, 2:35pm UTC](https://mediasoup.discourse.group/t/pipetransport/5131/3 "2023-04-05T14:35:07Z")

</div>

If you are looking for piping within same server then it is really simple as mentioned here in docs:

> **[mediasoup :: API](https://mediasoup.org/documentation/v3/mediasoup/api/#router-pipeToRouter)**
>
> Cutting Edge WebRTC Video Conferencing

If you are looking for piping between servers then going through this source code file of mediasoup will help, you can see how they create the piping between routers:

> <https://github.com/versatica/mediasoup/blob/v3/node/src/Router.ts>

**And if you want me to simplify it then here it is:**  
We have two servers server 1, server 2. Producer 1 is on server 1 and we want this producer to be piped on server 2 so here are the steps:

- Create pipetransport on server 1, lets call is pipetransport 1
- Create pipetransport on server 2, lets call is pipetransport 2
- Exchange connect parameters of pipetransport 1, pipetransport 2 with eachother. Now they are connected
- Consume producer 1 on pipetransport 1 (from server 1), now pipetransport 1 is ready to give producer 1 to pipetransport 2
- Produce producer 1 on pipetransport 2, with the help of producer parameters from previous step, now pipetransport 2 have producer 1 and so does server 2
- Consume producer 1 from server 2 just like normal.

---

<div class="post-metadata">

**Author:** ![zaidiqbal](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/zaidiqbal/32/1498_2.png) [@zaidiqbal](https://mediasoup.discourse.group/u/zaidiqbal)\
**Post date:** [April 5, 2023, 2:38pm UTC](https://mediasoup.discourse.group/t/pipetransport/5131/4 "2023-04-05T14:38:35Z")

</div>

This is where ibc explained me some of the principles for my clarification, go through it:

> [@PipeTransport Clarification](https://mediasoup.discourse.group/t/pipetransport-clarification/4686):
>
> Why we need to consume the producer on localPipeTransport? Can’t we do pipeTransport.produce() without it? Also shouldn’t be we doing localPipeTransport.produce() instead of remotePipeTransport.produce()? Like for example incase of routers on different machines we will have only one pipe transport on one machine and for that we will be doing localPipeTransport.produce(). Can someone clarify on this? thanks.

---

<div class="post-metadata">

**Author:** ![moein9gh](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/moein9gh/32/1851_2.png) [@moein9gh](https://mediasoup.discourse.group/u/moein9gh)\
**Post date:** [April 5, 2023, 2:48pm UTC](https://mediasoup.discourse.group/t/pipetransport/5131/5 "2023-04-05T14:48:33Z")

</div>

@zaidiqbal thanks for your time

I want use pipeTransport in seperate hosts

yes I have read that  
I read all of these issues

---

<div class="post-metadata">

**Author:** ![moein9gh](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/moein9gh/32/1851_2.png) [@moein9gh](https://mediasoup.discourse.group/u/moein9gh)\
**Post date:** [April 5, 2023, 2:49pm UTC](https://mediasoup.discourse.group/t/pipetransport/5131/6 "2023-04-05T14:49:33Z")

</div>

@BronzedBroth  
im sending audio only

---

<div class="post-metadata">

**Author:** ![moein9gh](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/moein9gh/32/1851_2.png) [@moein9gh](https://mediasoup.discourse.group/u/moein9gh)\
**Post date:** [April 5, 2023, 2:58pm UTC](https://mediasoup.discourse.group/t/pipetransport/5131/7 "2023-04-05T14:58:08Z")

</div>

> [@zaidiqbal](#):
>
> - Create pipetransport on server 1, lets call is pipetransport 1
> - Create pipetransport on server 2, lets call is pipetransport 2
> - Exchange connect parameters of pipetransport 1, pipetransport 2 with eachother. Now they are connected
> - Consume producer 1 on pipetransport 1 (from server 1), now pipetransport 1 is ready to give producer 1 to pipetransport 2
> - Produce producer 1 on pipetransport 2, with the help of producer parameters from previous step, now pipetransport 2 have producer 1 and so does server 2
> - Consume producer 1 from server 2 just like normal.

im doing this  
this is my scenario

> [@pipeTransport connected but audio does not play](https://mediasoup.discourse.group/t/pipetransport-connected-but-audio-does-not-play/5104):
>
> Hi awesome community , I have an issue with pipe transport and its that I have an voice call app and I want to use pipeTransport for creating a voice call between two peers in different hosts I could connect consumer and producer which are related to each peer and all events triggered correctly step by step finally I could connect two pipeTransports in different hosts but then I can’t hear any voice while all states and logs are correct all recvTransports, sendTransports and pipeTransports tr…
