I'd like to check if an encoded webm video has errors. So far I've managed to catch an error using something like this:
ffmpeg -v error -i ../broken.webm -f null -
which outputs:
[matroska,webm @ 0x7fba5400a200] Read error at pos. 110050 (0x1ade2)
I would like to achieve the same output using node.js and fluent-ffmpeg, but I couldn't figure out to to pass -v error
and -f null -
using the js wrapper syntax.
My naive attempt looks like this:
// ffmpeg -v error -i ../broken.webm -f null -
ffmpeg("../broken.webm")
.on('error', function(err) {
console.error('An error occurred: ',err.message)
})
.save('-f null -')
.on('end', function() {
console.log('done !')
})
but I got an error straight away: ffmpeg exited with code 1: Unrecognized option '-f null -'.
Any ideas on how I could call ffmpeg -v error -i ../broken.webm -f null -
from node.js using fluent-ffmpeg ?