title: How to use GPU to accelerate the processing speed of ffmpeg filter?
body: <p>According to NVIDIA's developer website, you can use GPU to speed up the rendering of the ffmpeg filter.</p>
  <blockquote>
  <p>Create high-performance end-to-end hardware-accelerated video
  processing, 1:N encoding and 1:N transcoding pipeline using built-in &gt; filters in FFmpeg</p>
  <p>Ability to add your own custom high-performance CUDA filters using
  the shared CUDA context implementation in FFmpeg</p>
  </blockquote>
  <p><strong>The problem I am having now is how to use the GPU to speed up multiple ffmpeg filter processing?</strong></p>
  <p>For example:</p>
  <pre class="lang-sh prettyprint-override"><code>ffmpeg -loop 1 -i dog.jpg -filter_complex &quot;scale=iw*4:-1,zoompan=z='zoom+0.002':x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)':s=720x960&quot; -pix_fmt yuv420p -vcodec libx264 -preset ultrafast -y -r:v 25 -t 5 -crf 28 dog.mp4
  </code></pre>