[FFmpeg-trac] #8479(ffplay:new): ffplay ignores a=rtcp SDP attribute for RTP streams

FFmpeg trac at avcodec.org
Fri Jan 17 13:48:42 EET 2020


#8479: ffplay ignores a=rtcp SDP attribute for RTP streams
--------------------------------+---------------------------------------
             Reporter:  juannm  |                     Type:  defect
               Status:  new     |                 Priority:  normal
            Component:  ffplay  |                  Version:  unspecified
             Keywords:          |               Blocked By:
             Blocking:          |  Reproduced by developer:  0
Analyzed by developer:  0       |
--------------------------------+---------------------------------------
 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 \
     "rtp://192.168.1.109:5004?rtcpport=54321"
 }}}

 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 https://trac.ffmpeg.org/ticket/7068
 and https://trac.ffmpeg.org/ticket/8474):

 {{{
 v=0
 o=- 0 0 IN IP4 127.0.0.1
 s=No Name
 c=IN IP4 192.168.1.109
 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
 }}}

 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:

 * ffmpeg SDP file generation: incorrect header
 (https://trac.ffmpeg.org/ticket/7068)
 * rtcpport param doesn't add a=rtcp to SDP
 (https://trac.ffmpeg.org/ticket/8474)

--
Ticket URL: <https://trac.ffmpeg.org/ticket/8479>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list