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

107
Vistas
Dynamically control the chunk size for uploading live videos to S3 multipart using MediaRecorder API

frontend: vue

I have been using MediaRecorder API to record videos in the frontend and using S3 multipart to upload the videos to S3 chunk by chunk
minimum limit in S3 multipart upload is 5MB unless it is the last part
Here I want to dynamically create a chunk for 5MB, but chunks are created on a time basis

this.mediaRecorder = new MediaRecorder(this.stream,{
                         videoBitsPerSecond: 2500000,
                         mimeType: 'video/webm'
                     }
this.mediaRecorder.start(5000) # => 5000 ms

For every 5 seconds, the `ondataavailable` method is called and the chunk is stored to an array

this.mediaRecorder.ondataavailable = event => {
    this.blobs.push(event.data)
    console.log(event.data.size) # => returns size
}

I gave 5 seconds initially but for 5 seconds it only create a blob with a size of ~0.6MB, so I increased the time to 50 seconds, now each blob is larger than 5MB, but what if the low-resolution camera or high-resolution camera is used?

Is there any workaround to achieve without giving static time?

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