使用NVidia GTX950M的FFMPEG hevc_nvenc"没有找到支持NVENC的设备"

Nat*_*per 7 ffmpeg h.265 hevc nvenc

在尝试这样的简单编码时,我收到错误"找不到NVENC功能的设备",甚至跳过音频以确保它不是音频问题:

ffmpeg.exe -i input.mp4 -c:v hevc_nvenc -an out.mp4
Run Code Online (Sandbox Code Playgroud)

我还尝试了更多细节,比如设置像素格式,预设,速率控制和格式.

在文档页面上:https: //trac.ffmpeg.org/wiki/HWAccelIntro 它说如果我们得到这个错误,我们应该检查像素格式.视频在这里有yuv420p,甚至指定格式会导致相同的错误.

我还检查了NVidia支持的卡,它说的是GeForce,但没有关于这些型号的详细信息:https: //developer.nvidia.com/video-encode-decode-gpu-support-matrix#Encoder

我尝试了h264_nvenc并且它工作正常,但问题是只有hevc_nvenc有没有人遇到过这个问题?

完整控制台输出:

[h264 @ 0000000002534560] Reinit context to 1280x544, pix_fmt: yuv420p
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 1
    compatible_brands: isom
    creation_time   : 2014-05-23T13:04:15.000000Z
  Duration: 01:54:03.95, start: 0.000000, bitrate: 3193 kb/s
    Stream #0:0(und): Video: h264 (High), 1 reference frame (avc1 / 0x31637661), yuv420p(left), 1280x544 [SAR 1:1 DAR 40:17], 2750 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
    Metadata:
      creation_time   : 2014-05-23T11:25:27.000000Z
    Stream #0:1(spa): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 439 kb/s (default)
    Metadata:
      creation_time   : 2014-05-23T12:56:43.000000Z
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> hevc (hevc_nvenc))
Press [q] to stop, [?] for help
[h264 @ 000000000260ea40] Reinit context to 1280x544, pix_fmt: yuv420p
[graph 0 input from stream 0:0 @ 0000000003857ec0] w:1280 h:544 pixfmt:yuv420p tb:1/24000 fr:24000/1001 sar:1/1 sws_param:flags=2
[hevc_nvenc @ 00000000038574e0] Loaded Nvenc version 8.0
[hevc_nvenc @ 00000000038574e0] Nvenc initialized successfully
[hevc_nvenc @ 00000000038574e0] 1 CUDA capable devices found
[hevc_nvenc @ 00000000038574e0] [ GPU #0 - < GeForce GTX 950M > has Compute SM 5.0 ]
[hevc_nvenc @ 00000000038574e0] Codec not supported
[hevc_nvenc @ 00000000038574e0] No NVENC capable devices found
[hevc_nvenc @ 00000000038574e0] Nvenc unloaded
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
Conversion failed!
Run Code Online (Sandbox Code Playgroud)

hal*_*elf 7

950M确实不支持h265编解码器.

nvidia nvenc页面详细的支持矩阵,我们可以了解到只有第二代maxwell GPU支持h265/hevc.

另请查看maxwell wiki页面NVIDIA GPU列表.您可以看到950M的代号是GM107第一代maxwell架构,这意味着没有h265支持.对不起,你必须回到h264.