0.0.1 • Published 7 years ago
node-mp4-parser v0.0.1
node-mp4-parser
Node.js MP4 video parser
Installation
npm install node-mp4-parser
Usage
const fs = require('fs');
const Parser = require('node-mp4-parser');
fs.open('/path/to/file.mp4', 'r', function(fd) {
try {
let movie = Parser.parse(fd);
// Work with movie
// https://github.com/pipll/node-video-common#movie
console.log('Duration:', movie.relativeDuration());
} catch (ex) {
console.error('Error:', ex);
} finally {
fs.close(fd);
}
});
0.0.1
7 years ago