Kurento / bugtracker

[ARCHIVED] Contents migrated to monorepo: https://github.com/Kurento/kurento
46 stars 10 forks source link

RTP & multicast streams: UDP port issue #586

Open makkarpov opened 3 years ago

makkarpov commented 3 years ago

Prerequisites

These are MANDATORY, otherwise the issue will be automatically closed.

Issue description

Suppose you have a host that broadcasts H.264 video stream. It does so by sending it to predefined multicast group on predefined port. This stream runs continuously 24/7, no matter whether anyone listens to it or not. Stream can be played with command like mplayer test.sdp without any problems with following SDP:

v=0
o=- 0 0 IN IP4 127.0.0.1
s=-
c=IN IP4 238.XXX.XXX.XXX
t=0 0
m=video 27000 RTP/AVP 96
b=AS:200
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1

Now I want to make Kurento "catch" it and relay to browser. This is where problem arises. For now, Kurento will generate it's own port number for the transmission, and of course this port will be different to sender port.

E.g. if I will send above SDP as an offer, I will get back something like this:

v=0
o=- 3826207939 3826207939 IN IP4 10.YYY.YYY.YYY
s=Kurento Media Server
c=IN IP4 10.YYY.YYY.YYY
t=0 0
m=video 34782 RTP/AVP 96
a=recvonly
a=rtcp:34783
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1
a=ssrc:3749048 cname:user3382982735@host-1181025c

Of course Kurento receives nothing since it's port 34782 is different to sender port 27000. Running ffmpeg ... -f rtp rtp://238.XXX.XXX.XXX:34782/ works, so Kurento joins the group, but just picks a wrong port.

How to reproduce?

  1. Start RTP streaming to some multicast group with predefined port.
  2. Use modified "RTP receiver" tutorial to generate offer and see answer.

Possible solution

Add parameter to RTP endpoint to specify desired reception port.

About Kurento Media Server

github-actions[bot] commented 3 years ago

Hello @makkarpov! :wave: we're sorry you found a bug... so first of all, thank you very much for reporting it.

To know about progress, check in Triage. All issues are considered Backlog Candidates until work priorities align and the issue is selected for development. It will then become part of our official Backlog.