You can also use flent-ffmpeg to convert .mp4 files to .flv files, or other types:
res.contentType('flv');
var pathToMovie = './public/' + req.params.filename;
var proc = ffmpeg(pathToMovie)
.preset('flashvideo')
.on('end', function () {
console.log(...