Modified example:
app.get('/video', function (req, res) {
const head = {
//'Content-Length': fileSize,
'Content-Type': 'video/mp4'
};
res.writeHead(200, head);
var proc = ffmpeg("./video.webm")
// use the 'flashvideo' preset (located in /lib/presets/flashvideo.js)
//.preset('flashvideo')
.videoCodec("libx264")
// setup event handlers
.on('end', function() {
console.log('file has been converted succesfully');
})
.on('error', function(err) {
console.log('an error happened: ' + err.message);
})
// save to stream
.pipe(res, {end:true});
});
(note: if the problem only happens with some inputs, include a link to such an input file)
Stream to HTTP client (h264/mp4)
ffmpeg exit with code 1, "invalid argument" -> "pipe:1"
Same problem, did you find something?
same problem.
I would make a fork and fix the bug.
But i dont want to waste my time.
It looks like the maintainer is active on github, but not in this repositroy.
When he would comment that he merge the fix, i would debug & fix the problem.
add
.format
Link here
Most helpful comment
Same problem, did you find something?