Read RTCP lost packets info

For the developers that use FFmpeg in their software.
Post Reply
vitorvanacor
Posts: 1
Joined: Mon Jun 11, 2018 1:58 pm

Read RTCP lost packets info

Post by vitorvanacor » Mon Jun 11, 2018 2:07 pm

It seems to be something trivial, but I couldn't find a way to get the information of the packets lost, usually sent by RTCP in RTP streams.

I've seen this question about reading RTCP packets, but I have two issues with it:
  • It uses RTSP structures. In my case, the RTP stream is not necessarily RTSP, so I imagine it wouldn't work.
  • Even if it was (or worked without RTSP), it uses the rtsp.h header, and as far as I understand this file functions are not exposed (the only exposed headers in /libavformat when compiling FFmpeg are avio.h, libavformat.h and version.h. Maybe I'm wrong here?)
I also found this function in the rtpdec.h that calculates the packet loss using the RTPStatistics read from RTPDemuxContext. But I don't understand how I would access this RTPDemuxContext (the function I found that returns this structure is in rtsp.h, so I'd be back to the previously mentioned problem).

So, any help regarding these doubts that I have or another different way to extract the packet loss information would be appreciated!

Post Reply