Opened 5 years ago
Last modified 4 years ago
#8479 open enhancement
ffplay ignores a=rtcp SDP attribute for RTP streams
Reported by: | Juan Navarro | Owned by: | |
---|---|---|---|
Priority: | wish | Component: | avformat |
Version: | git-master | Keywords: | rtp |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
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)
Attachments (2)
Change History (6)
by , 5 years ago
Attachment: | ffmpeg-20200117-123120.log added |
---|
comment:1 by , 5 years ago
Component: | ffplay → undetermined |
---|
Is this issue reproducible with current FFmpeg git head?
comment:2 by , 5 years ago
Component: | undetermined → avformat |
---|---|
Keywords: | rtp added |
Priority: | normal → wish |
Type: | defect → enhancement |
Version: | unspecified → git-master |
comment:3 by , 5 years ago
Status: | new → open |
---|
ffmpeg comand (RTP sender)