Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

232
Vistas
Is it possible to convert an array of image data URLs, obtained via toDataURL, into an MP4 using javascript and console commands?

Im trying to record a 5 second video of the browser and then save them as an mp4 file.

So far I am capturing the browser as an image alright, and then I can use ffmpeg on my machine locally to create a video using the downloaded pngs BUT I want to generate this video using the array of image urls I will have generated without the user having to download all the images first.

Here is what I have so far to test how I obtain the images:

let myImages = []
let imageCount = 120

window.runGrab = function(){ 
    html2canvas(document.body, {
        useCORS: true,
    }).then(function (canvas) {
        for(let i = 0; i <= imageCount; i++){
            setTimeout(function(){
                myImages.push(canvas.toDataURL("image/png"))

                if(i === imageCount){
                    let a = document.createElement("a");

                    a.href = myImages[0];
                    a.download = 'img000.png';
                    a.click();
                }
            }, 24)
        };
    })
}

And here is the command line I'm using manually to test the video creation:

ffmpeg -loop 1 -i img%03d.png -c:v libx264 -t 5 -pix_fmt yuv420p -vf scale=320:240 out.mp4

How can I pass the image urls instead of 'img%03d.png'?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda