soluciones para comprimir audio en el navegador?

I am working on getting audio recorded directly in browser and POSTed to a webserver. I am currently relying on flash to access the user microphone (using code derived from https://code.google.com/p/wami-recorder/) and passing the recorded Wav/pcm blob from flash to JS for upload (using XHR post). This works fine, but I am trying to avoid sending uncompressed WAV data (I can compress the audio on the server, but I am trying to limit CPU intensive work there).

Options I have found so far to compress to ogg on client side include:

  • relying on lab features of flash to compress the audio to ogg (labs.byhook.com/2011/02/15/ogg-vorbis-encoder-for-flash-alchemy-series-part-1/). Since it is an experimental feature in flash, it's risky to rely on it.

  • porting a minimal subset of libvorbis to javascript so that the browser can compress the data. This probably sounds a bit silly, but I only need short audio bits (a few seconds) so performance may not be such an issue. I have looked around, but couldn't find any such project going on.

  • a few other browser specific solutions such as http://firefogg.org which require substantial user-side install to work, which I don't want.

I'm looking for a better option to solve this issue, if such an option exists. I am obviously waiting for html5 getUserMedia() to work, but I need a solution in the meantime that works cross-browser (not necessarily 100%, but at least on major/recent browsers).

preguntado el 09 de marzo de 12 a las 14:03

I would guess a server side solution would be best -

Server side is what I have so far. It does the job, but can get pretty heavy in terms of resource usage, which may affect availability of the website. -

yeah, but doing that in browser will be tough on low spec machines. Maybe you need to queue the jobs, to minimise concurrent resource consumption? -

...and still do it server side -

that's probably what I'll go for if I can't find a better solution. This creates async processing issues, but hopefully we can work around it. Thanks for your suggestion. -

1 Respuestas

Destello: https://github.com/maxl0rd/standingwave3 eg: www.jordansthings.com/blog/?p=5 support mp3.

js compression: https://github.com/jpemartins/speex.js no good examples.

Respondido 07 Abr '13, 11:04

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.