check-video

Test video for errors using NodeJS and FFMpeg

Usage no npm install needed!

<script type="module">
  import checkVideo from 'https://cdn.skypack.dev/check-video';
</script>

README

Check Video npm Package

Test video for errors using NodeJS and FFMpeg

Installation

npm install check-video

API

CheckVideo(file[, options])

file

Type: String
Path to the video file

options.bin

Type: String
Default: ffmpeg
Path to ffmpeg binary file

options.buffer

Type: Number
Default: 2000
Exec maximum buffer size in kilobytes

Usage

const CheckVideo = require('check-video');

let video = './videos/MONICA BELLUCCI in the Matrix Sequels (HD Movie Scenes).mp4';

CheckVideo(video, { bin: './bin/ffmpeg.exe' }).then(errors => {
   // =>
   // [h264 @ 00000000005087a0] left block unavailable for requested intra4x4 mode -1 at 0 3
   // [h264 @ 00000000005087a0] error while decoding MB 0 3, bytestream 28606
}).catch(err => {
   console.log(err);
})

v1.0.2:

  • security fix