[FFmpeg-user] Symmetric RTP / socket reuse flag
renaud.schoonbroodt at gmail.com
Sun Sep 23 02:00:27 EEST 2018
As the reuse option is not available for RTP, I have modified ffmpeg source
to add it. Unfortunately though the socket address is effectively reused
between my encoder and decoder (no more binding errors), the decoder fails
on av_read_frame with error -8a. I have not idea what can cause this.
So am trying to find another solution: is there is a way to open a
AVFormatContext for both reading and writing ?
I am hoping to use the socket for both encoding and decoding.
Furthermore, is there a way to disable RTCP ?
On Sun, 9 Sep 2018 at 18:29, Renaud Schoonbroodt <
renaud.schoonbroodt at gmail.com> wrote:
> Hi everyone,
> I am implementing a SIP user agent (softphone) in C++ where the media
> encoding and decoding is handled by ffmpeg. I basically have one PCMU
> encoder and one PCMU decoder. Taken separately they both works fine.
> To cope with NAT traversal issues, I need to do Symmetric RTP
> Basically it means that my encoder and decoder need to use the same port.
> But when I enable both encoder and decoder one fails I guess because the
> port can't be reused. Again, enabled separately it works like a charm.
> I see the existence of the "reuse_socket" AVOption for UDP socket. But I
> have very little experience with the ffmpeg API and don't know how to
> access UDPContext form an AVFormatContext or AVCodecContext.
> I have also seen the "reuse" flag for URL but it doesn't seem to work with
> Does someone already succeed in doing this ? Am I looking in the right
> direction ?
> Best regards,
More information about the ffmpeg-user