symbl-media v1.0.3
Symbl Media Utility
A simple set of media utilities.
Prerequistes
In order to use this utility you would need ffmpeg installed on your system. The simplest way to install ffmpeg on Mac OS X is Homebrew
brew install ffmpegInstall
This utility can be used as a library in your NodeJS code. You can simply install it in your local project.
npm install symbl-media --saveIf you don't want to use it in your code, you can install this utility as a CLI command.
npm install -g symbl-mediaTo verify that it's installed properly, check with version command.
media versionUsage
Currently this utility only supports one feature:
- Transcode Audio file
If using in CLI mode, to print the detailed usage of this utility you can run this command.
media --helpTranscode Audio File
You can simply transcode (convert) an audio file on your file system using this utility.
Command line
Use the transcode command to transcode the file.
media transcode -i ./my-input-file.wav -o ./my-output-file.mp3 -f mp3Options
Using Code
You can quickly transcode any audio/video file using transcodeMediaFile method.
const {transcodeMediaFile} = require('symbl-media');
(async () => {
try {
const result = await transcodeMediaFile('./my-input-file.wav', 'my-output-file.mp3', 'mp3');
console.log('Successfully transcoded to: ', result.outPath);
} catch (e) {
console.error(e);
}
})();Also checkout the Examples folder for more examples