Body: <p>Platform: x79 i7 3970x @4.3GHz 64gb, GTX 1060 6gb, Windows 10.</p>
  
  <p>I have a bunch of jpegs I need to scale and encode.</p>
  
  <pre><code>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  
  </code></pre>
  
  <p>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%.</p>
  
  <p>I tried different settings but nothing changed appreciably.
  I'd love to hear suggestions to speed it up.</p>
  
  <p>All testing is done on a NVM with 3GB/s read speed to exclude possible drive performance.</p>
  
  <p>FFPMG details:</p>
  
  <pre><code>ffmpeg version N-85266-g1229007 Copyright (c) 2000-2017 the FFmpeg developers
  </code></pre>
  
  <p><code>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
  </code></p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-04-11T19:42:36.987Z
Comments.Text: With nvenc, try `-vf hwupload_cuda,scale_npp=w=1920:h=1440:format=nv12:interp_algo=lanczos,hwdownload,format=nv12`
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-04-11T20:13:53.603Z
Comments.Text: Thanks, tried that already, but my build errors out with No such filter: 'scale_npp'.
Comments.UserDisplayName: is_this_taken
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-04-11T22:34:45.770Z
Comments.Text: scale_npp requires `--enable-libnpp` configure option.
Comments.UserDisplayName: llogan
Tags: <ffmpeg><nvenc>
Title: Slow ffmpeg h264 performance software and NVENC
UserDisplayName: is_this_taken
ThreadText: # Slow ffmpeg h264 performance software and NVENC
  
  (Asked by: username_0 on 2017-04-11)
  
  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`
  
  **Tags:** ffmpeg, nvenc
  
  > **Comments:**
  > **username_1**: With nvenc, try `-vf hwupload_cuda,scale_npp=w=1920:h=1440:format=nv12:interp_algo=lanczos,hwdownload,format=nv12`  
  > **username_0**: Thanks, tried that already, but my build errors out with No such filter: 'scale_npp'.  
  > **username_2**: scale_npp requires `--enable-libnpp` configure option.  
  
  ---
  
  ## 0 answers
  
  