# Unable to publish multiple UDP streams to the same application using FFmpeg

**URL:** <https://community.wowza.com/t/unable-to-publish-multiple-udp-streams-to-the-same-application-using-ffmpeg/47613>\
**Category:** Wowza Streaming Engine\
**Created:** [October 18, 2016, 9:11am UTC](https://community.wowza.com/t/unable-to-publish-multiple-udp-streams-to-the-same-application-using-ffmpeg/47613 "2016-10-18T09:11:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leonardo\_Citraro](https://avatars.discourse-cdn.com/v4/letter/l/aca169/32.png) [@Leonardo\_Citraro](https://community.wowza.com/u/Leonardo_Citraro)\
**Post date:** [October 18, 2016, 9:11am UTC](https://community.wowza.com/t/unable-to-publish-multiple-udp-streams-to-the-same-application-using-ffmpeg/47613/1 "2016-10-18T09:11:03Z")

</div>

I am trying to send multiple streams to the same application using FFmpeg but only one stream at a time works correctly. I pass a sample video file to FFmpeg and then I send it via UDP as explained in this tutorial “How to use FFmpeg with Wowza Streaming Engine (MPEG-TS)”.

ffmpeg -re -i sample\_video.h264 -vcodec libx264 -an -f mpegts udp://127.0.0.1:8554?pkt\_size=1316/live/stream\_test1

ffmpeg -re -i sample\_video.h264 -vcodec libx264 -an -f mpegts udp://127.0.0.1:8554?pkt\_size=1316/live/stream\_test2

In Wowza I set up two endpoints:

udp://127.0.0.1:8554/live/stream\_test1

udp://127.0.0.1:8554/live/stream\_test2

One of the two streams always work whereas the other do not. It seems to me that the application is not capable of routing/distinguishing the two streams. I also tried different UDP URL but with no luck:

ffmpeg -re -i sample\_video.h264 -vcodec libx264 -an -f mpegts udp://127.0.0.1:8554/live?pkt\_size=1316/stream\_test1

ffmpeg -re -i sample\_video.h264 -vcodec libx264 -an -f mpegts udp://127.0.0.1:8554/live/stream\_test1?pkt\_size=1316

ffmpeg -re -i sample\_video.h264 -vcodec libx264 -an -f mpegts udp://127.0.0.1:8554/live/stream\_test1

I am sure I am missing something trivial in my setup, hope someone can give me a hand.

Best

Leo

---

<div class="post-metadata">

**Author:** ![Jermaine\_Hemby](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@Jermaine\_Hemby](https://community.wowza.com/u/Jermaine_Hemby)\
**Post date:** [November 20, 2016, 10:11am UTC](https://community.wowza.com/t/unable-to-publish-multiple-udp-streams-to-the-same-application-using-ffmpeg/47613/2 "2016-11-20T10:11:10Z")

</div>

Hello!

Thanks for contacting Wowza Forums!

One thing I notice is you ar eusing the same port for all the streams. Here is an article on allowing port sharing for UDP. This may resolve your issue. Also, are you using .stream files or SDP files?

Port Sharing

Regards,

Jermaine
