FFMPEG [h264_nvenc @ 0x56151389fe00]无法获取预设配置:无效版本(15)

时间:2018-04-22 14:50:34

标签: ffmpeg

我像往常一样对ffmpeg有疑问:D。我有FFMPEG编译(版本N-90807-g00099ef0d0),支持NVIDIA(最新的CUDA和最新的NV标题):

ffmpeg version N-90807-g00099ef0d0 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
  configuration: --enable-libnpp --enable-cuda --enable-cuvid --enable-nvenc --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 --enable-gpl --enable-libx264 --disable-x86asm --enable-libx265 --enable-libfdk-aac --enable-nonfree --enable-x86asm
  libavutil      56. 15.100 / 56. 15.100
  libavcodec     58. 19.100 / 58. 19.100
  libavformat    58. 13.100 / 58. 13.100
  libavdevice    58.  4.100 / 58.  4.100
  libavfilter     7. 19.100 /  7. 19.100
  libswscale      5.  2.100 /  5.  2.100
  libswresample   3.  2.100 /  3.  2.100
  libpostproc    55.  2.100 / 55.  2.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'

当我尝试使用命令在GPU上运行基本转码时:

ffmpeg -i 'udp://@239.100.0.1:331?fifo_size=‎100000000' -map i:0x100 -g 20 -vcodec  h264_nvenc -map i:0x101 -ab 128k -ar 48k -acodec aac -f mpegts udp://@239.0.0.1:1234?overrun_nonfatal_optin=

我收到了这个错误:

    Input #0, mpegts, from 'udp://@239.100.0.1:331?fifo_size=‎100000000':
  Duration: N/A, start: 106.414400, bitrate: N/A
  Program 1 
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080, 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
    Stream #0:1[0x101](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 64 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_nvenc))
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[h264 @ 0x55a5edc45880] co located POCs unavailable
[h264_nvenc @ 0x55a5edc45380] Cannot get the preset configuration: invalid version (15)
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
[aac @ 0x55a5edc46d40] Qavg: 227.785
[aac @ 0x55a5edc46d40] 2 frames left in the queue on closing

我在另一台测试机器上以相同的方式编译了相同版本的FFMPEG,并且它正在运行。我尝试使用最新版本重新编译/重新安装ffmpeg,但结果是一样的。

有人知道我的实例可能出现什么问题吗? 感谢。

1 个答案:

答案 0 :(得分:3)

固定。问题出在nvidia标题中。二手版本非常新。如果您遇到此问题,只需使用带有标记n8.0.14.1的标头,然后编译ffmpeg。 与Nvidias编解码器API接口所需的FFmpeg版本的头文件:

git clone https://github.com/FFmpeg/nv-codec-headers.git
git checkout n8.0.14.1
make && make install