Giter VIP home page Giter VIP logo

Comments (7)

jaymo107 avatar jaymo107 commented on July 19, 2024 1

@geeee This worked, took us weeks to figure this out haha! Thank you very much for your help πŸŽ‰

from lamejs.

jaymo107 avatar jaymo107 commented on July 19, 2024

If anyone has done this sort of splitting up of a recording and encoding each chunk, and has a better way of doing this, that would be a massive help also. Just running out of ideas with this.

from lamejs.

geeee avatar geeee commented on July 19, 2024

Hi. The code you provided looks fine as it is, so the problem might be elsewhere.
Do you reinitialize mp3encoder before each chunk is encoded?

from lamejs.

jaymo107 avatar jaymo107 commented on July 19, 2024

I do yeah, sorry I haven't shared that portion of the code, just above the for loop, where sample rate is 44100 and kbps is 128.

var mp3encoder = new lamejs.Mp3Encoder(2, sampleRate, kbps);

So for every chunk this is all initialised again as each chunk is encoded in a web worker, so all this is executed per chunk, but should be using the same info anyway.

(p.s. thank you for your response πŸ˜„ )

from lamejs.

geeee avatar geeee commented on July 19, 2024

LAME adds silence to the start and the end of encoded mp3s. This might be the cause of the "clicks".
Try to use single Mp3Encoder instance to encode all of your wav chunks, flushing it only once at the very end.

from lamejs.

jaymo107 avatar jaymo107 commented on July 19, 2024

Ok thanks so much, I'll give this a go πŸ‘

from lamejs.

mperezguendulain avatar mperezguendulain commented on July 19, 2024

Can some help me please?? Or could you give me an example please?
I use a single Mp3Encoder instance to encode all my wav chunks, and I flushing only once, but I have the problem yet. And sometimes part of the audio is repeated.

This is the encoded audio: https://clyp.it/dqsoux3a

This is my code: https://gist.github.com/mperezguendulain/3ef390647b274916618cfe0521a9f6bd

I'd really appreciate it if you'd help me.

from lamejs.

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.