Opened 7 years ago
Last modified 5 years ago
#6495 open enhancement
Add low latency mode in nvcuvid/nvdecode
Reported by: | abrevet | Owned by: | |
---|---|---|---|
Priority: | wish | Component: | avcodec |
Version: | git-master | Keywords: | cuvid |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
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 application.
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
Change History (4)
follow-up: 2 comment:1 by , 7 years ago
comment:2 by , 7 years ago
Replying to heleppkes:
The decoder would be terribly slow without this delay, fwiw.
I tested my application with ulMaxDisplayDelay = 0 (HD definition), and I have not seen low performance.
It would be useful to let the choice to the user.
comment:3 by , 5 years ago
Status: | new → open |
---|
comment:4 by , 5 years ago
Keywords: | nvdecode removed |
---|---|
Priority: | important → wish |
The decoder would be terribly slow without this delay, fwiw.