[FFmpeg-trac] #7674(undetermined:reopened): ffmpeg with cuvid transcoding after version 3.4.1 work unstable on heavy load CUDA card

FFmpeg trac at avcodec.org
Mon Apr 8 21:56:52 EEST 2019


#7674: ffmpeg with cuvid transcoding after version 3.4.1 work unstable on heavy
load CUDA card
-------------------------------------+-------------------------------------
             Reporter:  maxfs79      |                    Owner:
                 Type:  defect       |                   Status:  reopened
             Priority:  normal       |                Component:
                                     |  undetermined
              Version:  unspecified  |               Resolution:
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Changes (by malakudi):

 * status:  closed => reopened
 * resolution:  needs_more_info =>


Comment:

 I confirm the issue reported in this ticket with current git. Running
 multiple transcoding instances (above 50) starts to have a big performance
 degredation.

 With the following patch on current git
 {{{
 --- ffmpeg/libavcodec/nvenc.c   2019-04-08 20:53:19.745925070 +0300
 +++ ffmpeg/libavcodec/nvenc.c   2019-04-08 20:55:51.619074973 +0300
 @@ -1846,13 +1846,6 @@
                  res = nvenc_print_error(avctx, nv_status, "Failed
 unmapping input resource");
                  goto error;
              }
 -            nv_status = p_nvenc->nvEncUnregisterResource(ctx->nvencoder,
 ctx->registered_frames[tmpoutsurf->reg_idx].regptr);
 -            if (nv_status != NV_ENC_SUCCESS) {
 -                res = nvenc_print_error(avctx, nv_status, "Failed
 unregistering input resource");
 -                goto error;
 -            }
 -            ctx->registered_frames[tmpoutsurf->reg_idx].ptr = NULL;
 -            ctx->registered_frames[tmpoutsurf->reg_idx].regptr = NULL;
          } else if (ctx->registered_frames[tmpoutsurf->reg_idx].mapped <
 0) {
              res = AVERROR_BUG;
              goto error;
 }}}
 the issue is resolved. I am not in a position to understand why this patch
 fixes the issue, but it does. And I see no other problem (mem leak or
 something else) when applying above patch.

 The issue affects nvenc in general, it is not related to mpeg-2 input that
 original author reported.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/7674#comment:17>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list