[Libav-user] Receiving Multiple RTP streams

Yile Ku stiffstone at gmail.com
Sun Feb 18 21:47:30 EET 2018


I need to receive multiple RTP streams and combine them to one output.
The problem is that when I run ffmpeg, it only opens the first rtp stream
multicast address, and doesn't open any subsequent RTP URLs.   So ffmpeg
doesn't get any input unless some packets come in on the first stream.   My
application is such that packets are bursty and may come in at any time on
any of the RTP address URLs.

I went through the code and the socket is opened in non-blocking mode but
ff_id3v2_read blocks waiting for a header, so the other RTP streams dont
get accessed.

I need to find a fix for this as soon as possible, so any help is
appreciated.

I have three senders:

Sender one:
avconv -v 0 -f alsa -ac 2 -ar 48000 -i hw:1,0 -acodec mp2 -f rtp rtp://
224.255.0.1:11111

Sender Two:
avconv -v 0 -f alsa -ac 2 -ar 48000 -i hw:1,0 -acodec mp2 -f rtp rtp://
224.255.0.2:11111

Sender Three:
avconv -v 0 -f alsa -ac 2 -ar 48000 -i hw:1,0 -acodec mp2 -f rtp rtp://
224.255.0.3:11111

Recever:
avconv -v 48 -f mpegts -i udp://224.255.0.3:11111 -f mpegts -i udp://
224.255.0.2:11111 -f mpegts -i udp://224.255.0.3:11111 out.mp2

I need ffmpeg to open and listen on all multicast addresses (listed above)
simultaneously for input from anyone of them.

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20180218/b87ca4c3/attachment.html>


More information about the Libav-user mailing list