const command = ffmpeg('desktop')
.duration(30)
.size('1920x1080')
.inputFPS(25)
.addInputOption('-f gdigrab')
.on('progress', e => {
console.log(e)
})
.on('end', () => {
console.log('Done!')
})
.on('error', err => {
console.error(err.message)
})
.save(path.resolve(__dirname, 'files', 'output.mpg'))