title: Is ffmpeg running in CPU or GPU?
body: <p>It has been shown in the link </p>
  
  <blockquote>
    <p><a href="https://dri.freedesktop.org/wiki/IntelPerformanceTuning/" rel="noreferrer">https://dri.freedesktop.org/wiki/IntelPerformanceTuning/</a></p>
    
    <p>Step 2: CPU vs GPU</p>
  </blockquote>
  
  <p>that if the CPU % is more than 90 then the app is running in CPU.</p>
  
  <p>While configuring ffmpeg, I enabled opencl. ffmpeg configurations are, </p>
  
  <pre><code>ffmpeg version ebe0fa0 Copyright (c) 2000-2015 the FFmpeg developers
    built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-4)
    configuration: --enable-gpl --enable-libx264 --enable-opencl --enable-nonfree --enable-libmfx --enable-libmp3lame --enable-libaacplus
    libavutil      54. 31.100 / 54. 31.100
    libavcodec     56. 60.100 / 56. 60.100
    libavformat    56. 40.101 / 56. 40.101
    libavdevice    56.  4.100 / 56.  4.100
    libavfilter     5. 40.101 /  5. 40.101
    libswscale      3.  1.101 /  3.  1.101
    libswresample   1.  2.101 /  1.  2.101
    libpostproc    53.  3.100 / 53.  3.100
  Hyper fast Audio and Video encoder
  usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
  </code></pre>
  
  <p>But while running ffmpeg using the command </p>
  
  <p>ffmpeg -i /home/M.mp4 -c:v h264 -preset:v faster /home/out.avi</p>
  
  <p>the CPU% has been more than 90 (375%). </p>
  
  <p>In case of ImageMagick, if I enable opencl while configuring, then the app will run in GPU, i.e., the CPU% will be less than 90. I noticed that.</p>
  
  <p>But in case of ffmpeg, it is GPU accelerated one. Then, Why the CPU% is more than 90%? Is the ffmpeg running in CPU or GPU? If it is not, how can I make it to run in GPU?</p>