Skip to content

Instantly share code, notes, and snippets.

@jasonpolites
Created May 22, 2017 20:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasonpolites/42ca7b5ca5597d4dbf6f2398626373be to your computer and use it in GitHub Desktop.
Save jasonpolites/42ca7b5ca5597d4dbf6f2398626373be to your computer and use it in GitHub Desktop.
try {
var process = new ffmpeg(pathToVideo);
process.then(function (video) {
// Video metadata
console.log(video.metadata);
// FFmpeg configuration
console.log(video.info_configuration);
callback(null, video.metadata);
}, function (err) {
console.log('Error: ' + err);
callback(err);
});
} catch (e) {
console.log(e.code);
console.log(e.msg);
callback(e);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment