nvidia – ffmpeg wit nvenc does not seem to utilize my GPU

I tried to convert a high-resolution video to 2k. I used this command:

ffmpeg -i input_video.mp4 -vf scale=1920:1080 -c:v h264_nvenc -preset slow -b:v 8M output_video.mp4

Based on the top and nvidia-semi results, my CPU was at maximum utilization, but my GPU was barely used. The ffmpeg process only used about 240 MiB of vram.

nvidia-smi dmon did show lots of enc activity. But the low vram usage and high CPU utilization makes me wonder if ffmpeg is fully utilize my GPU.

nvidia-smi dmon                                                                                     
# gpu    pwr  gtemp  mtemp     sm    mem    enc    dec    jpg    ofa   mclk   pclk
# Idx      W      C      C      %      %      %      %      %      %    MHz    MHz
    0      -     74      -      6      8     66      0      -      -   3504    420
    0      -     74      -      6      8     71      0      -      -   3504    420
    0      -     74      -      6      8     70      0      -      -   3504    420
    0      -     74      -      6      8     71      0      -      -   3504    420
    0      -     74      -      6      7     63      0      -      -   3504    420
    0      -     74      -      5      7     56      0      -      -   3504    420
    0      -     74      -      6      8     70      0      -      -   3504    420
    0      -     74      -      6      8     67      0      -      -   3504    420
    0      -     74      -      6      8     69      0      -      -   3504    420
    0      -     74      -      6      8     71      0      -      -   3504    420
    0      -     74      -      6      8     68      0      -      -   3504    420

Read more here: Source link