[Example] How to extract audio out of video using 'fluent-ffmpeg' with Electron.js

Intro

I am using Electron.js 6.1.5
I want extract audio out of video.

Here is a code snippet work for me:

npm i fluent-ffmpeg
var ffmpeg = require('fluent-ffmpeg');
const path = require('path');

var filename = './not-commit-test-file/1.mp4';
var full_path = path.resolve(filename);
console.log(full_path);

var command = ffmpeg(full_path);
command.outputOptions([
  '-vn',
  '-acodec copy',
]).save('output-audio.aac');