0

I'm trying to play a TTS/PS RTP stream using FFmpeg, but I keep encountering the following error:

[rtp @ 0x55bae8fad5c0] Unable to receive RTP payload type 103 without an SDP file describing it rtp://<multicast-address>:<port>?buffer-size=1000000: Invalid data found when processing input

To give some context, my main goal is to eventually stream in low latency DASH format through FFmpeg. For this, I’m experimenting by first capturing the RTP stream and converting it into MP4 format. Here are my specific questions: Here are my questions: Is FFmpeg capable of playing TTS/PS' over RTP? Since the multicast address and port are dynamically assigned at runtime, do I still need anSDP` file to describe the stream? Is there a way to handle RTP streams without an SDP file, or any alternative methods to resolve the payload type issue? The command I'm using is:

ffmpeg -protocol_whitelist "rtp,udp" -i rtp://<multicast-address>:<port>?buffer-size=1000000 -c:v copy -f mpegts output.ts

Any advice or suggestions would be greatly appreciated. Thanks in advance!

1 Answers1

1

SDP (Session Description Protocol) files provide the stream's codec and payload types:

ffmpeg -protocol_whitelist "rtp,udp" -i stream.sdp -c copy -f mpegts output.ts

stream.sdp

v=0
o=- 0 0 IN IP4 0.0.0.0
s=Session
c=IN IP4 <multicast-address>
t=0 0
a=app:libavformat
m=video <port> RTP/AVP 103
a=rtpmap:103 H264/90000

v=0 Version of the SDP protocol. 0 is the current version.

o=- 0 0 IN IP4 0.0.0.0 Session originator and session ID.

  • -: A placeholder indicating no username is specified.
  • 0: Session ID (can be any number; it's just a unique identifier).
  • 0: Version of this session (increment, if you change the session).
  • IN IP4 0.0.0.0: Network type (IN), address type (IP4), and the address.

s=Session The session's name

c=IN IP4 <multicast-address> Connection Information

  • IN IP4 Specifies an Internet (IN) connection using IPv4.
  • <multicast-address> The multicast address

t=0 0 Time Description. Times session is active.

  • 0 0: Means the session is valid at all times (start/end).

a=app:libavformat Attributes

  • app:libavformat: Is the creation app and library used

m=video <port> RTP/AVP 103 Media Description

  • video: The media type
  • <port>: The port number
  • RTP/AVP: Protocol and profile
  • 103: Payload type number

a=rtpmap:103 H264/90000

  • rtpmap: Maps the payload type to a specific codec.
  • 103: The payload type number.
  • H264/90000: Payload type 103 is H.264 with a clock rate of 90,000 Hz.