New submission from epatton <[email protected]>:
I am connected to a AXIS 7401 H264 server and the link times out when the camera
isn't connected or image is very dark. I believe the problem is due to the code
in libavformat\rtpdec.c ln 197 where the number of bytes in the RTP stream is
used to calculate when to send the RTCP keep alive message. When there are few
bytes sent (due to the camera not connected or dark image), RTCP frequency
decreases.
s->octet_count += count;
rtcp_bytes = ((s->octet_count - s->last_octet_count) * RTCP_TX_RATIO_NUM) /
RTCP_TX_RATIO_DEN;
Although RFC 3550 states "It is RECOMMENDED that the fraction of the session
bandwidth added for RTCP be fixed at 5%.", I was able to maintain the RTP link
with the AXIS by using a timer.
if (s->last_rtcp_timestamp < s_rpt_time_old)
s_rpt_time_old = s->last_rtcp_timestamp; // reset for wrap-around.
if (s->last_rtcp_timestamp <= (s_rpt_time_old + 4*ONE_SECOND))
return -1;
else
s_rpt_time_old = s->last_rtcp_timestamp;
I'm not sure this is the best way to solve the problem since the standard states
that the RTCP frequency should be a function of the session bandwidth, but it
works.
I'm using the following command to communicate with the AXIS:
ffmpeg -i rtsp://169.254.177.84/axis-media/media.amp?videocodec=h264 -t 240
C:\VideoSamples\axis_video.h264
----------
messages: 8079
priority: normal
status: new
substatus: new
title: RTCP keep alive timeout on AXIS 7401
type: bug
_____________________________________________________
FFmpeg issue tracker <[email protected]>
<https://roundup.ffmpeg.org/roundup/ffmpeg/issue1578>
_____________________________________________________