A little module that outputs a video file's bits-per-pixel value, i.e.:
video_bitrate / (video_height * video_width * video_fps)
This module depends upon FFmpeg. Any recent version should do.
$ npm install bppconst bpp = require('bpp');
bpp.calculate('/path/to/video.mp4', (result) => {
console.log(result);
});Calculates the bpp, or bits-per-pixel for a video at a given file path.
It returns an instance of a Promise that is rejected when an error occurs, or
resolved with the results of the calculate() function.
The calculate() function calls the given callback() function with the results
as the second argument, if given. If an error occurs, the callback() function,
if given, is called with the error as the first argument with undefined results.
filePathrequired - The file path for a video to calculate the bppcallbackoptional - The callback function called with results or when an error occurs.
TBA