[FFmpeg-trac] #4437(avdevice:open): AVFoundation recording has consistent intermittent frame drops

FFmpeg trac at avcodec.org
Tue Aug 25 15:16:58 CEST 2015

#4437: AVFoundation recording has consistent intermittent frame drops
             Reporter:  LordHDL      |                    Owner:  mateo
                 Type:  defect       |                   Status:  open
             Priority:  normal       |                Component:  avdevice
              Version:  git-master   |               Resolution:
             Keywords:               |               Blocked By:
  avfoundation bounty                |  Reproduced by developer:  0
             Blocking:               |
Analyzed by developer:  0            |

Comment (by mateo):

 Replying to [comment:14 thilo.borgmann]:
 > Thanks for your patch, mateo!
 > If you extend your buffer size to way bigger than 4 frames you should be
 able to see if your assumptions are correct and we just do not consume the
 frames fast enough (and your buffer warning occurs later).

 While testing the patch, ffmpeg did not output the new warning telling the
 user that a frame is being dropped because the queue is full while still
 seeing the issue on the output file (what LordHDL has described / what is
 mentionned in the commit message).

 > Otherwise, if there is something out of sync on the system-side, your
 buffering extension could be useless and memory requirements raise. In
 that case we have to figure out if we can somehow acquire these missing
 frames in any way or if we don't even have a chance.

 I've tried to set the setAlwaysDiscardsLateVideoFrames to NO but it was
 leading to a performance decrease, ie: the capture was running at 54fps
 instead of 60.

 I also experience the same issue using gstreamer.

 Anyway, I don't think the buffering extension is useless as the new code
 reduce the locking area and give more guarantee that in case of a sudden
 slowdown we don't drop any frames (unless the queue gets full). If the
 memory requirements raise is an issue i can reduce the default queue size.
 Even add an option to configure it.
 What do you think ?


Ticket URL: <https://trac.ffmpeg.org/ticket/4437#comment:15>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker

More information about the FFmpeg-trac mailing list