node-extract-audio
v1.0.1
Published
Extract audio from video.
Downloads
3
Readme
node-extract-audio
Extract audio from video.
install
pnpm install node-extract-audio
usage
- extractor
const { extractor } = require('node-extract-audio');
// cut video to temp file, extract audio from temp video
await extractor({
input, // input file (support mp4 flv)
output, // output file (support mp3 flac)
duration, // duration (in seconds) example 100
seekInput, // seek input example: '00:00:02'
format, // output format (default is flac support mp3 flac)
});
// extract audio from video
await extractor({
input, // input file (support mp4 flv)
output, // output file (support mp3 flac)
format, // output format (default is flac support mp3 flac)
});
AudioExtractor
cut video
const { AudioExtractor } = require('node-extract-audio'); const audioExtractor = new AudioExtractor({ logger: console, }); await audioExtractor.cutVideo({ input, // input file (support mp4 flv) output, // output file (support mp4 flv) duration, // duration (in seconds) example 100 seek, // seek input example: '00:00:02' });
extract audio
const { AudioExtractor } = require('node-extract-audio'); const audioExtractor = new AudioExtractor({ logger: console, }); await audioExtractor.cutVideo({ input, // input file (support mp4 flv) output, // output file (support mp3 flac) format, // output format (default is flac support mp3 flac) });