title: nodejs get mp4 file thumbnail quickly
body: <p>I want to have a thumbnail of 0.0 sec of a video.
  Currently I am using node-fluent-ffmpeg to generate thumbnail. Following is the code:</p>
  
  <pre><code>ffmpeg(tempLocalFile)
            .screenshots({
              timestamps: [0.0],
              filename: 'xx.png',
              folder: tempFilePath
            }).on('end', function() {
              console.log('done');
            });
  </code></pre>
  
  <p>But the problem is, it is taking too much of time to do the process. It is normally taking 30sec to generate the thumbnail. Which keeps increasing if the mp4 file size increases.</p>
  
  <p>So my question is, Is there any fast way to generate the thumbnail. Can we improve above code to improve the performance.</p>
  
  <p>ps: The machine this code is running is 512MB RAM 800MHz</p>