diff options
| author | 8cy <[email protected]> | 2020-04-03 02:48:28 -0700 |
|---|---|---|
| committer | 8cy <[email protected]> | 2020-04-03 02:48:28 -0700 |
| commit | f9159ea2d994e14180fb02ab562f0119513e67cf (patch) | |
| tree | 09d14cdf05456567156738b681379d4bccd64e5c /node_modules/ffmpeg-static/example.js | |
| parent | 2020/04/03, 02:42, V1.2.1 (diff) | |
| download | s5nical-f9159ea2d994e14180fb02ab562f0119513e67cf.tar.xz s5nical-f9159ea2d994e14180fb02ab562f0119513e67cf.zip | |
2020/04/03, 02:47, V1.2.2
Diffstat (limited to 'node_modules/ffmpeg-static/example.js')
| -rw-r--r-- | node_modules/ffmpeg-static/example.js | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/node_modules/ffmpeg-static/example.js b/node_modules/ffmpeg-static/example.js deleted file mode 100644 index b26a51a..0000000 --- a/node_modules/ffmpeg-static/example.js +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env node -'use strict' - -const {join} = require('path') -const shell = require('any-shell-escape') -const {exec} = require('child_process') - -const argv = process.argv.slice(2) -if (argv.includes('-h') || argv.includes('--help')) { - console.info(` -This is just a simple CLI wrapper around the powerful ffmpeg CLI tool. -This script just showcases how to use ffmpeg-static; It wouldn't make -sense to hide a flexible tool behind a limited wrapper script. -Usage: - ./example.js src-audio-file.m4a dest-audio-file.mp3 -`) - process.exit(0) -} - -const [src, dest] = argv -const makeMp3 = shell([ - 'ffmpeg', '-y', '-v', 'error', - '-i', join(process.cwd(), src), - '-acodec', 'mp3', - '-format', 'mp3', - join(process.cwd(), dest) -]) - -exec(makeMp3, (err) => { - if (err) { - console.error(err) - process.exit(1) - } else { - console.info('done!') - } -}) |