Open lucafaggianelli opened 4 years ago
You can convert the video to hls, After success, the HLS link will be accessed.
You may then need to add a task manager or socket.io to get the status of the video parsing.
const FfmpegCommand = require('fluent-ffmpeg');
FfmpegCommand('filename.mp4')
.videoCodec('libx264')
.addOption('-hls_time', 10)
.addOption('-hls_list_size', 0)
.save('filename.m3u8')
.on('start', () =>{})
.on('end', () =>{
})
.on('stderr',(stderrLine)=> {})
.on('error', (err) => {
});
Hi there,
I'm working on a media center project (kind of Plex/personal Netflix), where, basically, I serve video files to a browser or to a Chromecast, though some videos are not supported thus I use
fluent-ffmpeg
for transcoding audio and/or video streams.Everything works fine, but the videos aren't seekable and haven't the right duration, of course, this is normal due to HTTP protocol, Range headers, etc... Question is, do you suggest other protocols/methods to streaming a transcoded video over HTTP? Such as HLS or others?
This is the repo: https://github.com/lucafaggianelli/couch-buddy
and this is where the transcoding happens (I'm using Koa library): https://github.com/lucafaggianelli/couch-buddy/blob/master/server/routes/streaming.js