[FFmpeg-trac] #6495(avcodec:new): Add low latency mode in nvcuvid/nvdecode

FFmpeg trac at avcodec.org
Wed Jun 28 12:51:15 EEST 2017

#6495: Add low latency mode in nvcuvid/nvdecode
             Reporter:  abrevet      |                     Type:
               Status:  new          |  enhancement
            Component:  avcodec      |                 Priority:  important
             Keywords:  cuvid        |                  Version:  git-
  nvdecode                           |  master
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0
 When I use h264_cuvid, it takes 4 extra frames to pass before it returns
 the first frame. So, this decoder is not usable for low latency
 After browsing the NvDecode API, there is a parameter to manage the number
 of extra frames: ''ulMaxDisplayDelay''

 This value is hard-coded in FFmpeg to 4, see libavcodec/cuvid.c line 980:

 ''ctx->cuparseinfo.ulMaxDisplayDelay = 4;''

 It would be useful to add a 'low latency' option in FFmpeg to set the
 parameter ''ulMaxDisplayDelay'' to zero (no latency).
 For example, an equivalent mode already exists when using QuickSync:

 ''av_dict_set(&m_opt, "async_depth", "1", 0);''

 Thank you

Ticket URL: <https://trac.ffmpeg.org/ticket/6495>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker

More information about the FFmpeg-trac mailing list