finos / SymphonyMediaBridge

The Symphony Media Bridge (SMB) is a media server application that handles audio, video and screen sharing media streams in an RTC conference system.
Apache License 2.0
54 stars 18 forks source link

RTP payload not supported #361

Open topilski opened 3 months ago

topilski commented 3 months ago

Support Question

Hello, i have in logs:

2024-03-19 09:02:06.426 INFO [0x7f20180aad80][TransportFactory] opened main media port at 172.31.0.2:12000
2024-03-19 09:02:06.427 INFO [0x7f20180aad80][main] Build: Release 697d35d
2024-03-19 09:02:12.234 INFO [0x7f1f7d7fa700][RequestHandler] Incoming request [1001] POST /conferences/
2024-03-19 09:02:12.235 INFO [0x7f1f7d7fa700][MixerManager] Create mixer, last-n 5
2024-03-19 09:02:12.247 INFO [0x7f1f7d7fa700][MixerManager] Mixer-2 id=15567660543410975965, local 596846179 slides 2777252046 pins 3778981342 3827951542 940096512 70977836
2024-03-19 09:02:12.247 INFO [0x7f1f7d7fa700][ApiRequestHandler] Allocate conference 15567660543410975965, mixer Mixer-2, last-n -1, global-port t
2024-03-19 09:02:12.247 INFO [0x7f1f7d7fa700][RequestHandler] Outgoing response [1001] 200
2024-03-19 09:02:12.249 INFO [0x7f1f667fc700][RequestHandler] Incoming request [1002] POST /conferences/15567660543410975965/ingest
2024-03-19 09:02:12.251 INFO [0x7f1f667fc700][Transport-3] SRTP client: SrtpClient-4
2024-03-19 09:02:12.251 INFO [0x7f1f667fc700][Mixer-2] Created bundle transport, endpointId ingest, endpointIdHash 5765349304897777532, transport Transport-3 (0x7f1f4800b538), ice controlling t
2024-03-19 09:02:12.251 INFO [0x7f1f667fc700][Mixer-2] Created bundled audioStream id 1128390118524043092, endpointId ingest, endpointIdHash 5765349304897777532, transport Transport-3
2024-03-19 09:02:12.251 INFO [0x7f1f667fc700][Mixer-2] Created bundled videoStream id 2392350303525710656, endpointId ingest, endpointIdHash 5765349304897777532, transport Transport-3
2024-03-19 09:02:12.251 INFO [0x7f1f667fc700][RequestHandler] Outgoing response [1002] 200
2024-03-19 09:02:12.255 INFO [0x7f1f677fe700][RequestHandler] Incoming request [1003] POST /conferences/15567660543410975965/ingest
2024-03-19 09:02:12.256 WARN [0x7f1f677fe700][RequestHandler] Outgoing response [1003] 400. Error message: rtp payload '' not supported

how can i debug this? thx

topilski commented 3 months ago
2024-03-19 09:34:14.657 DEBUG [0x7fdca1ffb700][RequestHandler] POST response {"audio":{"payload-types":[{"channels":2,"clockrate":48000,"id":111,"name":"opus","parameters":{"minptime":"10","useinbandfec":"1"},"rtcp-fbs":[]},{"clockrate":48000,"id":110,"name":"telephone-event","parameters":{},"rtcp-fbs":[]}],"rtp-hdrexts":[{"id":1,"uri":"urn:ietf:params:rtp-hdrext:ssrc-audio-level"},{"id":3,"uri":"http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time"},{"id":8,"uri":"c9:params:rtp-hdrext:info"}],"ssrcs":[629495325]},"bundle-transport":{"dtls":{"hash":"44:23:38:33:B4:03:35:96:F4:84:A5:1B:43:75:17:9F:72:68:A7:D8:1A:54:12:C6:07:36:D3:90:FC:64:5B:AB","setup":"actpass","type":"sha-256"},"ice":{"candidates":[{"component":1,"foundation":"969969762896","generation":0,"ip":"192.168.16.3","network":1,"port":12000,"priority":142541055,"protocol":"udp","type":"host"},{"component":1,"foundation":"969969762897","generation":0,"ip":"74.81.33.52","network":1,"port":12000,"priority":140837119,"protocol":"udp","rel-addr":"192.168.16.3","rel-port":12000,"type":"srflx"}],"pwd":"AqSE40ooWfBiIJnXVKB+px3X","ufrag":"UNmgJTj3PnGWNY"},"rtcp-mux":true},"video":{"payload-types":[{"clockrate":90000,"id":100,"name":"VP8","parameters":{},"rtcp-fbs":[{"type":"goog-remb"},{"type":"nack"},{"subtype":"pli","type":"nack"}]},{"clockrate":90000,"id":96,"name":"rtx","parameters":{"apt":"100"},"rtcp-fbs":[]}],"rtp-hdrexts":[{"id":3,"uri":"http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time"},{"id":4,"uri":"urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id"}],"streams":[{"content":"local","sources":[{"main":1141997220}]}]}}
2024-03-19 09:34:14.657 INFO [0x7fdca1ffb700][RequestHandler] Outgoing response [1002] 200
2024-03-19 09:34:14.660 INFO [0x7fdca1ffb700][RequestHandler] Incoming request [1003] POST /conferences/9751696680690624088/ingest
2024-03-19 09:34:14.661 WARN [0x7fdca1ffb700][RequestHandler] Outgoing response [1003] 400. Error message: rtp payload '' not supported
topilski commented 3 months ago

Issue in this commit: 32167aa0c49b32e2ae73880f63fce668fea5d903

RicardoMDomingues commented 2 months ago

Hello @topilski,

We changed the format of "audio" object. Before there was a single attribute "payload-type" for describing the supported payload of the audio stream. Like this:

"audio": {
    "payload-type": {
      "channels": 2,
      "clockrate": 48000,
      "id": 111,
      "name": "opus",
      "parameters": {
        "minptime": "10",
        "useinbandfec": "1"
      },
   ...
  }

As we introduced NTE support, we changed this from "payload-type" to "payload-types" and we made it an array. So you have to change to:

"audio": {
    "payload-types": [{
      "channels": 2,
      "clockrate": 48000,
      "id": 111,
      "name": "opus",
      "parameters": {
        "minptime": "10",
        "useinbandfec": "1"
      }],
    },
   ...
  }

Also, if you haven't noticed yet, the POST response you get from this request 2024-03-19 09:34:14.657 DEBUG [0x7fdca1ffb700][RequestHandler] POST response has the same modification. So you get an offer description with "payload-types" and SymphonyMediaBridge expects an answer on action: configure with same format.

Please check the description on this PR for more details: https://github.com/finos/SymphonyMediaBridge/pull/352.

If you are struggle with this change, please share with me the payload you are sending.

topilski commented 1 month ago
type SmbEndpointAudioDescription struct {
    SSRCs       []int                   `json:"ssrcs"`
    PayloadType []SmbPayloadType        `json:"payload-types"`
    RtpHdrExts  []SmbRtpHeaderExtension `json:"rtp-hdrexts"`
}

type SmbEndpointVideoDescription struct {
    Streams      []SmbVideoStream        `json:"streams"`
    PayloadTypes []SmbPayloadType        `json:"payload-types"`
    RtpHdrExts   []SmbRtpHeaderExtension `json:"rtp-hdrexts,omitempty"`
}

right?

RicardoMDomingues commented 3 weeks ago
type SmbEndpointAudioDescription struct {
  SSRCs       []int                   `json:"ssrcs"`
  PayloadType []SmbPayloadType        `json:"payload-types"`
  RtpHdrExts  []SmbRtpHeaderExtension `json:"rtp-hdrexts"`
}

type SmbEndpointVideoDescription struct {
  Streams      []SmbVideoStream        `json:"streams"`
  PayloadTypes []SmbPayloadType        `json:"payload-types"`
  RtpHdrExts   []SmbRtpHeaderExtension `json:"rtp-hdrexts,omitempty"`
}

right?

Yes, looks correct