I want to convert videos files (like .mp4 or .avi) to .m3u8 in nodeJs. I tried to do that with ffmpeg and node-js, but that don't work : 'Output format m3u8 is not available'.
Here is my nodeJs code :
const ffmpegInstaller = require('@ffmpeg-installer/ffmpeg');
const ffmpeg = require('fluent-ffmpeg');
var cmd = ffmpeg('./flir_20191202T174341.mp4')
.setFfmpegPath(ffmpegInstaller.path)
.videoBitrate(1024)
.videoCodec('divx')
.format('m3u8')
.on('end', () => {
// ...
})
.on('error', err => {
console.error(err);
})
.save('./file-out.m3u8');
console.log('Hello !');
console.log(cmd);
Do you know how can I do that correctly ?
Thank's in advance.
Jérémy.