ffmpeg+nvidia 编码错误


ffmpeg version git-2021-12-31-6b7e4de Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
  configuration: --pkg-config-flags=--static --extra-libs='-lpthread -lm' --ld=g++ --enable-gpl --enable-libass --enable-shared --enable-nvenc --enable-cuvid --enable-libfreetype --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-nonfree --enable-cuda-sdk --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64
  libavutil      57. 13.100 / 57. 13.100
  libavcodec     59. 15.102 / 59. 15.102
  libavformat    59. 12.100 / 59. 12.100
  libavdevice    59.  1.100 / 59.  1.100
  libavfilter     8. 21.100 /  8. 21.100
  libswscale      6.  1.102 /  6.  1.102
  libswresample   4.  0.100 /  4.  0.100
  libpostproc    56.  0.100 / 56.  0.100
[h264 @ 0x55e8fd7e00c0] Stream #0: not enough frames to estimate rate; consider increasing probesize
WARNING: defaulting hwaccel_output_format to cuda for compatibility with old commandlines. This behaviour is DEPRECATED and will be removed in the future. Please explicitly set "-hwaccel_output_format cuda".
Input #0, h264, from '2022-01-25-14-50-00_camera8.h264':
  Duration: N/A, bitrate: N/A
  Stream #0:0: Video: h264 (Constrained Baseline), yuv420p(progressive), 3848x2168, 25 fps, 25 tbr, 1200k tbn
Multiple -c, -codec, -acodec, -vcodec, -scodec or -dcodec options specified for stream 0, only the last option '-c:v h264_nvenc' will be used.
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_nvenc))
Press [q] to stop, [?] for help
[h264_nvenc @ 0x55e8fd8ddc00] Driver does not support the required nvenc API version. Required: 11.1 Found: 11.0
[h264_nvenc @ 0x55e8fd8ddc00] The minimum required Nvidia driver for nvenc is 470.57.02 or newer
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height


出现以上错误是因为nv-codec-headers版本太高,可以通过查看nv-codec-headers的readme来了解支持的版本

FFmpeg version of headers required to interface with Nvidias codec APIs.

Corresponds to Video Codec SDK version 11.0.10.

Minimum required driver versions:
Linux: 455.28 or newer
Windows: 456.71 or newer
~

你可能感兴趣的:(工具,视频编解码)