I am recording screen with mediaRecorder in 10 second chunks of video.
Then, with node.js, we put those videos together in a single webm.
The problem is that we can't see the duration of the video when we play it.
We tried the package webm-duration-fix but I can only apply it to the video fragments, and when joining them it is broken
I'm using Javascript on the front and node js on the back. In the back I get the video snippet and then apply fs.appendFileSync
app.post('/upload/', async (req, res) => {
let dir = './videos';
let testeador = req.body.testeador;
let cliente = req.body.cliente;
let id = req.body.id;
let fragmento = req.body.fragmento;
let idVideo = generateRandomCode()
res.send('Archivo subido')
fs.mkdirSync(`${dir}/${cliente}/${testeador}`, {
recursive: true
});
fs.appendFileSync(`${dir}/${cliente}/${testeador}/${testeador}.webm`, req.files.video.data, (err) => {
if (err) throw err;
});
})