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

322
Vistas
Convert Blob audio file to mp4 type in javascript

I'm trying to convert a blob audio file to .mp4 type which is generated from MediaRecorder it is returning with webm type and I have tried other types in MimeType(attribute in MediaRecorder to set the type) but they are not supported so I have tried ffmpeg npm library but it was asking for path of the file but i'm not saving it so that also didn't work for me. Any suggestion and answer that will help!!

This is how I'm recording it and it is working fine

 const stream = await navigator.mediaDevices.getUserMedia({ audio: true });
 const mediaRecorder = new MediaRecorder(stream);
  const audioChunks = [];

mediaRecorder.addEventListener("dataavailable", event => {
  audioChunks.push(event.data);
});
const start = () => mediaRecorder.start();

const stop = () =>
  new Promise(resolve => {
    mediaRecorder.addEventListener("stop", async () => {
      const audioBlob = new Blob(audioChunks,{
        'type': 'audio/wav;' 
      });
      const audiomp3 = URL.createObjectURL(audioBlob);
      const audio = new Audio(audiomp3);
      const play = () => audio.play();
      resolve({ audioBlob,audio,play });
    });
    
    mediaRecorder.stop();
  });

This is the link i refer for ffmpeg

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