https://github.com/saeta-eth/mp3-to-video
Create video from mp3 and image
https://github.com/saeta-eth/mp3-to-video
converter mp3 node-module nodejs video
Last synced: about 1 year ago
JSON representation
Create video from mp3 and image
- Host: GitHub
- URL: https://github.com/saeta-eth/mp3-to-video
- Owner: saeta-eth
- License: mit
- Created: 2016-09-22T04:39:27.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-25T03:13:13.000Z (about 9 years ago)
- Last Synced: 2025-04-07T23:08:42.516Z (about 1 year ago)
- Topics: converter, mp3, node-module, nodejs, video
- Language: JavaScript
- Homepage:
- Size: 20.9 MB
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# mp3-to-video
> Create video from mp3 and a single image.
## Install
`npm i mp3-to-video --save`
## Prerequisites
You need to install `ffmpeg`.
## Simple Usage
```js
// ES6
import ConvertCommand from 'mp3-to-video';
const Convert = new ConvertCommand('mp3Path', 'extension', 'imagePath');
Convert.init((err, response) => {
if (err) {
console.log(err);
} else {
console.log(response.status); // true
console.log(response.message); // Everything OK
console.log(response.videoPath); // eg. /path/to/output.mp4
}
});
// ES5
var ConvertCommand = require('mp3-to-video');
var Convert = new ConvertCommand('mp3Path', 'extension', 'imagePath');
Convert.init(function(err, response){
if (err) {
console.log(err);
} else {
console.log(response.status); // true
console.log(response.message); // Everything OK
console.log(response.videoPath); // eg. /path/to/output.mp4
}
});
```
## API
- `changeMp3` : Change mp3 path.
- `changeOutput` : Change output path.
- `changeExtension` : Change extension output file.
- `changeImage` : Change image path.
## npm scripts
- `npm run build`: It builds a development version of the mp3-to-video (full code).
- `npm run check-coverage`: Check if exist library for code coverage.
- `npm run coverage`: Run test with code coverage (un-tested statements, lines, functions or branches.).
- `npm run lint`: It verify the code according to eslint rules.
- `npm run mocha`: It run the test without code coverage.
- `npm run prepublish`: It builds a development version before to publish in npm repository.
- `npm run test`: Run script `npm run coverage`
## Made with ❤ by
- Sebastian Lorenzo (Javascript developer)
- E-mail: [SebastianLorenzo@gmail.com](mailto:SebastianLorenzo@gmail.com)
- StackOverflow: [sebastian-lorenzo](http://stackoverflow.com/users/1741027/sebastian-lorenzo?tab=profile)
## License
MIT license. Copyright © 2017.