An open API service indexing awesome lists of open source software.

https://github.com/symblai/media-conversion

Simple media utility for audio operations like audio transcoding.
https://github.com/symblai/media-conversion

audio convert decoder encoder ffmpeg media node nodejs symbl transcode-audio

Last synced: 4 months ago
JSON representation

Simple media utility for audio operations like audio transcoding.

Awesome Lists containing this project

README

          

# Media Conversion

Use this simple set of utilities for transcoding audio files either in NodeJS code, or as a CLI.

## Setup

### Prerequisites
Use of this utility requires [ffmpeg](http://www.ffmpeg.org/) installed on your system. If not already installed, [download](http://www.ffmpeg.org/download.html) or if on Mac install with [Homebrew](https://brew.sh/)

```bash
brew install ffmpeg
```

### Install
For use as a library in your NodeJS code, run the following from inside your local project:

```bash
npm install symbl-media --save
```

For use as a CLI:

```bash
npm install -g symbl-media
```

To verify that it's installed properly, check with version command:

```bash
media version
```

## Usage
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.
```bash
media --help
```

#### Transcode Audio File

You can simply [transcode](https://en.wikipedia.org/wiki/Transcoding) (convert) an audio file on your file system using this utility.

#### Command line
Use the `transcode` command to transcode the file.

```bash
media transcode -i ./my-input-file.wav -o ./my-output-file.mp3 -f mp3
```
##### Options


`-i`, `--inFile` file Path to the Input File to be transcoded.
`-o`, `--outFile` file Path to where the Output File should be saved.
`-f`, `--outFormat` format Format of the output file. For example: mp3, wav, aac etc.

#### Using Code
You can quickly transcode any audio/video file using `transcodeMediaFile` method.

```javascript
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](examples) folder for more examples

## Community

If you have any questions, feel free to reach out to us at devrelations@symbl.ai, through our Community [Slack][slack], or [developer community][developer_community]

This guide is actively developed, and we love to hear from you! Please feel free to [create an issue][issues] or [open a pull request][pulls] with your questions, comments, suggestions and feedback. If you liked our integration guide, please star our repo!

This library is released under the [MIT License][license]

[license]: LICENSE.txt
[telephony]: https://docs.symbl.ai/docs/telephony/overview/post-api
[websocket]: https://docs.symbl.ai/docs/streamingapi/overview/introduction
[developer_community]: https://community.symbl.ai/?_ga=2.134156042.526040298.1609788827-1505817196.1609788827
[signup]: https://platform.symbl.ai/?_ga=2.63499307.526040298.1609788827-1505817196.1609788827
[issues]: https://github.com/symblai/symbl-media/issues
[pulls]: https://github.com/symblai/symbl-media/pulls
[slack]: https://join.slack.com/t/symbldotai/shared_invite/zt-4sic2s11-D3x496pll8UHSJ89cm78CA