Git Product home page Git Product logo

Comments (12)

ai avatar ai commented on September 28, 2024 1

Can you send PR to docs how to use lamejs?

from audio-recorder-polyfill.

ai avatar ai commented on September 28, 2024

Hm, interesting idea. I personally prefer Ogg Opus, but MP3 could be a easier way. Especially if we have JS pure codec.

from audio-recorder-polyfill.

coodoo avatar coodoo commented on September 28, 2024

That was my first thought, but by default Chrome will encode audio with opus codec, but for lamejs to work we probably will have to feed wav to it?

from audio-recorder-polyfill.

adueck avatar adueck commented on September 28, 2024

Yes, this would be wonderful to have. MP3 does seem to have much wider cross-browser compatibility.

WAV is also nice for cross-browser compatibility, but MP3 would be much nicer for storage space/compression.

Thanks for the link @coodoo, I'm going to try lamejs myself. I see it hasn't been maintained for a couple of years... 🤔

from audio-recorder-polyfill.

PetterS avatar PetterS commented on September 28, 2024

It is pretty easy to just pass the wave data from this polyfill into lamejs. Use wave-encoder.js with lamejs. I have been doing that and it works great.

from audio-recorder-polyfill.

adueck avatar adueck commented on September 28, 2024

@PetterS Yes, if you could that it would be great! 👏

from audio-recorder-polyfill.

PetterS avatar PetterS commented on September 28, 2024

I did it by parsning the WAV header which is far from the best solution.

I think a much better solution would be to follow wave-encoder.js and create a mp3-encoder.js as well.

from audio-recorder-polyfill.

ai avatar ai commented on September 28, 2024

Released 0.2 version. Thanks to @youkaclub for the work.

from audio-recorder-polyfill.

dmitrybndar avatar dmitrybndar commented on September 28, 2024

Hi guys, thanks for your polyfill and for mp3 encoder, I just wanted to ask is there any workaround to make lamejs options (kbps, bitrate and channel) to be customizable? They are now hardcoded to mono channel, 44100 rate and 128kbps. I think it's nice approach to be able edit them.

from audio-recorder-polyfill.

ai avatar ai commented on September 28, 2024

We can use this API:

MediaRecorder.encoder = require('audio-recorder-polyfill/mpeg-encoder')(opts)

from audio-recorder-polyfill.

dmitrybndar avatar dmitrybndar commented on September 28, 2024

@ai, cool! Will this work with es6 imports? And when you will can implement this? Thanks.

from audio-recorder-polyfill.

ai avatar ai commented on September 28, 2024

@dmitrybndar fixed at 0.3 with dual-publish

https://github.com/ai/audio-recorder-polyfill#mp3

from audio-recorder-polyfill.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.