2

Platform: x79 i7 3970x @4.3GHz 64gb, GTX 1060 6gb, Windows 10.

I have a bunch of jpegs I need to scale and encode.

ffmpeg -f concat -safe 0 -i file.list -vf scale=1920:1440 -c:v h264 -b:v 5M name.mp4
ffmpeg -f concat -safe 0 -i file.list -vf scale=1920:1440 -c:v h264_nvenc -b:v 5M name.mp4  

They both run at the almost the same FPS, libx264 ~10, nvenc ~8.5. The only difference is cpu usage, libx264 is around 25% (regardless of the -threads setting) and nvenc around 8%.

I tried different settings but nothing changed appreciably. I'd love to hear suggestions to speed it up.

All testing is done on a NVM with 3GB/s read speed to exclude possible drive performance.

FFPMG details:

ffmpeg version N-85266-g1229007 Copyright (c) 2000-2017 the FFmpeg developers

built with gcc 6.3.0 (GCC) configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib libavutil 55. 59.100 / 55. 59.100 libavcodec 57. 90.100 / 57. 90.100 libavformat 57. 72.100 / 57. 72.100 libavdevice 57. 7.100 / 57. 7.100 libavfilter 6. 83.100 / 6. 83.100 libswscale 4. 7.100 / 4. 7.100 libswresample 2. 8.100 / 2. 8.100 libpostproc 54. 6.100 / 54. 6.100

  • 1
    With nvenc, try -vf hwupload_cuda,scale_npp=w=1920:h=1440:format=nv12:interp_algo=lanczos,hwdownload,format=nv12 – Gyan Apr 11 '17 at 19:42
  • Thanks, tried that already, but my build errors out with No such filter: 'scale_npp'. – is_this_taken Apr 11 '17 at 20:13
  • scale_npp requires --enable-libnpp configure option. – llogan Apr 11 '17 at 22:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.