Opened 6 weeks ago

Last modified 3 weeks ago

#8479 open enhancement

ffplay ignores a=rtcp SDP attribute for RTP streams

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


Summary of the bug:

When sending RTP with ffmpeg, 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. For example:

ffmpeg -re -i video.mp4 -an -c:v copy -f rtp -sdp_file video.sdp \

To play back this stream, ffplay can be used with an SDP file. The equivalent of "rtcpport=54321" in SDP format is an attribute such as "a=rtcp:54321", like in this example SDP (generated by ffmpeg and edited by hand to work around related bugs and

o=- 0 0 IN IP4
s=No Name
c=IN IP4
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

However, ffplay ignores the "a=rtcp" attribute, thus it listens for RTCP packets in the default port 5005 (RTP + 1), and packets sent by ffmpeg don't arrive correctly to their destination.

Example playback command:

ffplay \
    -protocol_whitelist file,rtp,udp \
    -i video.sdp

This renders the usage of "rtcpport" URL parameter not viable if all we use is FFmpeg itself for both sending and receiving.

Full, uncut console outputs from ffmpeg and ffplay generated with '-report' and provided in the attached files.

Related bugs:

Attachments (2)

ffmpeg-20200117-123120.log (140.6 KB) - added by juannm 6 weeks ago.
ffmpeg comand (RTP sender)
ffplay-20200117-123209.log (33.4 KB) - added by juannm 6 weeks ago.
ffplay comand (RTP receiver)

Download all attachments as: .zip

Change History (5)

Changed 6 weeks ago by juannm

ffmpeg comand (RTP sender)

Changed 6 weeks ago by juannm

ffplay comand (RTP receiver)

comment:1 Changed 6 weeks ago by cehoyos

  • Component changed from ffplay to undetermined

Is this issue reproducible with current FFmpeg git head?

comment:2 Changed 5 weeks ago by cehoyos

  • Component changed from undetermined to avformat
  • Keywords rtp added
  • Priority changed from normal to wish
  • Type changed from defect to enhancement
  • Version changed from unspecified to git-master
Note: See TracTickets for help on using tickets.