https://github.com/apsdehal/mp3-length
NPM module for calculating length of a mp3 file
https://github.com/apsdehal/mp3-length
Last synced: 4 months ago
JSON representation
NPM module for calculating length of a mp3 file
- Host: GitHub
- URL: https://github.com/apsdehal/mp3-length
- Owner: apsdehal
- License: mit
- Created: 2014-11-15T17:19:55.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-11-15T23:27:28.000Z (over 11 years ago)
- Last Synced: 2024-12-31T07:14:31.372Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 262 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mp3-length 
> Calculate length of a mp3
Provides an api to calculate length of mp3 files
## Requirements
- mp3info - Use `apt-get install mp3info` to get
## Install
```
$ npm install --save mp3-length
```
## Usage
```javascript
var mp3Length = require('mp3-length');
mp3Length('file.mp3', function (err, length) {
if (err == null) {
console.log(length);
}
});
```
## API
## mp3Length(filepath, callback)
### filepath
Type: `string`
Path to the file
### callback(error, length)
Type: `function`
Callback to be called once length is calculated
## License
MIT © [Amanpreet Singh](http://apsdehal.in)