1

I'm using FFmpeg in my iOS application to read an RTSP (over UDP) stream. VLC offers some media information -> statistics about the stream that is being played. The number of Video Frames lost is what I'm interested in.

My question: is there a way to get these statistics (frames lost) with FFmpeg while reading from an UDP stream?

Thanks.

Mihai
  • 768
  • 2
  • 6
  • 18

1 Answers1

1

RTCP is used to collect statistics. Check if ffmpeg libs provide some API to access RTCP information

Dmitri Sosnik
  • 517
  • 1
  • 12
  • 20
  • Yes, the RTCP information is what I need to access. The problem is that I cannot find how (using FFmpeg). In absence of another answer, I'll choose this one. Thanks. – Mihai Jan 20 '15 at 13:55
  • @MihaiGhete According to [this answer](http://stackoverflow.com/questions/20265546/reading-rtcp-packets-from-an-ip-camera-using-ffmpeg) you can get RTPDemuxContext: ` RTSPState* rtsp_state = (RTSPState*) context->priv_data; RTSPStream* rtsp_stream = rtsp_state->rtsp_streams[0]; RTPDemuxContext* rtp_demux_context = (RTPDemuxContext*) rtsp_stream->transport_priv; ` which can give you [RTCP info](http://www.ffmpeg.org/doxygen/2.0/structRTPDemuxContext.html) – Dmitri Sosnik Jan 20 '15 at 23:48