Opened 5 years ago
Last modified 4 years ago
#8474 open defect
rtcpport param doesn't add a=rtcp to SDP
Reported by: | Juan Navarro | 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)
Change History (9)
by , 5 years ago
Attachment: | ffmpeg-20200115-193654.log added |
---|
comment:1 by , 5 years ago
Ticket syntax failed when linking to the related bug report:
https://trac.ffmpeg.org/ticket/7068 - "ffmpeg SDP file generation : incorrect header"
comment:2 by , 5 years ago
Cc: | added |
---|
comment:3 by , 5 years ago
Cc: | removed |
---|
follow-up: 6 comment:4 by , 5 years ago
Component: | ffmpeg → undetermined |
---|---|
Version: | 4.2 → unspecified |
Is this issue not reproducible with current FFmpeg?
comment:5 by , 5 years ago
Component: | undetermined → avformat |
---|---|
Version: | unspecified → git-master |
comment:6 by , 4 years ago
Replying to cehoyos:
Is this issue not reproducible with current FFmpeg?
This is reproducible as of today with latest development code:
ffmpeg version git-2020-11-25-3de3d2f
comment:7 by , 4 years ago
Status: | new → open |
---|
Correct, that is https://tools.ietf.org/html/rfc3605
"Real Time Control Protocol (RTCP) attribute in Session Description Protocol (SDP)"
comment:8 by , 4 years ago
Yes, the a=rtcp
attribute is defined in RFC 3605. Technically it is optional when the RTCP port is just RTP + 1, but it should be included otherwise, or else consumers of the SDP file will wrongly assume that they should use RTP + 1 for the RTCP port.
By the way this bug report goes hand to hand with the related one: https://trac.ffmpeg.org/ticket/8479
which is about FFmpeg ignoring the a=rtcp
attribute in input SDP files.
Full, uncut console output