Wrapper around the `mediainfo' for obtaining information about multimedia files.
Inspired by node-mediainfo this module provides an interface to the
mediainfo command, it returns the common properties of a video or movie file in a JSON object, it uses a custom mediainfo template that you can change.
npm install mimovie
The module exposes just one function, which has a signature of:
The callback function is called, in familiar node fashion, with two arguments. The first is an Error object on error, or null on success. The second argument is an object or array of objects with all the video/movie information.
It's really easier to just see the output, so here:
general:path: './test/movie.m4v'size: 79371001bitrate: 10572228duration: 60060modified: 'UTC 2015-10-26 00:14:01'encoded: 'UTC 1904-01-01 00:00:00'tagged: 'UTC 1904-01-01 00:00:00'menu: falsevideo:width: 2560height: 1440codec: 'AVC'fps: 2997bitrate: 9998000profile: 'Main@L4'aspect: '16:9'audio:ch: 2ch_pos: 'Front: L R'sample_rate: '44100'codec: 'AAC LC'bitrate: 128036bitrate_mode: 'CBR'lang: false
var mimovie =util = ;;
mediainfo CLI has to be available somewhere in the system
(The MIT License)
Copyright (c) by Rodrigo Polo http://rodrigopolo.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.