Opened 4 months ago

Last modified 4 months ago

#8474 new defect

rtcpport param doesn't add a=rtcp to SDP

Reported by: juannm Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: rtp, sdp
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
It is possible to specify an RTCP port that is not the default RTP + 1. For this, we just have to add the parameter "rtcpport" to the output URL:

rtp://127.0.0.1:5004?rtcpport=54321

However, FFmpeg is not adding the corresponding media-level attribute "a=rtcp:54321" to the generated SDP file.

This seems like a bug to me instead of a missing feature, because in SDP, the omission of the "a=rtcp" attribute is nominally equivalent to an implicit presence of that attribute, where the value is RTP + 1.

So, in short, FFmpeg is generating an SDP where the RTCP port is wrong.

How to reproduce:

ffmpeg \
    -re \
    -i video.mp4 \
    -an \
    -c:v copy \
    -f rtp \
    -sdp_file video.sdp \
    "rtp://127.0.0.1:5004?rtcpport=54321"

generates an SDP file, "video.sdp", with these contents:

SDP:
v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 127.0.0.1
t=0 0
a=tool:libavformat 58.29.100
m=video 5004 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1; sprop-parameter-sets=Z0LAH9kAUAW7ARAAAD6QAAu4CPGDJIA=,aMuMsg==; profile-level-id=42C01F

Expected SDP would NOT have the invalid first line "SDP:" (that's a different bug: #7068), and also it would have the "a=rtcp" line:

v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 127.0.0.1
t=0 0
a=tool:libavformat 58.29.100
m=video 5004 RTP/AVP 96
a=rtcp:54321
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1; sprop-parameter-sets=Z0LAH9kAUAW7ARAAAD6QAAu4CPGDJIA=,aMuMsg==; profile-level-id=42C01F

Full, uncut console output generated with '-report' and provided in the attached file.

Attachments (1)

ffmpeg-20200115-193654.log (10.0 KB) - added by juannm 4 months ago.
Full, uncut console output

Download all attachments as: .zip

Change History (6)

Changed 4 months ago by juannm

Full, uncut console output

comment:1 Changed 4 months ago by juannm

Ticket syntax failed when linking to the related bug report:
https://trac.ffmpeg.org/ticket/7068 - "ffmpeg SDP file generation : incorrect header"

comment:2 Changed 4 months ago by juannm

  • Cc oneorjuan@gmail.com added

comment:3 Changed 4 months ago by juannm

  • Cc oneorjuan@gmail.com removed

comment:4 Changed 4 months ago by cehoyos

  • Component changed from ffmpeg to undetermined
  • Version changed from 4.2 to unspecified

Is this issue not reproducible with current FFmpeg?

comment:5 Changed 4 months ago by cehoyos

  • Component changed from undetermined to avformat
  • Version changed from unspecified to git-master
Note: See TracTickets for help on using tickets.