Skip to content
Port of Fraunhofer FDK AAC with Emscripten
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin Initial commit Mar 28, 2019
build Initial commit Mar 28, 2019
examples Fix example worker in Safari Mar 28, 2019
test Initial commit Mar 28, 2019
.eslintignore Initial commit Mar 28, 2019
.eslintrc.js Fix example worker in Safari Mar 28, 2019
.gitignore Initial commit Mar 28, 2019
.gitmodules Initial commit Mar 28, 2019
Makefile Initial commit Mar 28, 2019
README.md Refine warning Mar 28, 2019
aac-enc.js Initial commit Mar 28, 2019
aac-enc.wasm
fdk-aac.js Initial commit Mar 28, 2019
fdk-aac.umd.js Initial commit Mar 28, 2019
package-lock.json Initial commit Mar 28, 2019
package.json Initial commit Mar 28, 2019

README.md

Port of Fraunhofer FDK AAC with Emscripten

WARNING: This is an experimental library not tested for production.

This projects ports the Fraunhofer FDK AAC encoder to JavaScript using the Emscripten project. Works in modern browsers and in Node.js.

Demo

A very simple demo is available here.

Builds

  • fdk-aac.js: use this from Node, Browserify, Webpack
  • fdk-aac.umd.js: use this directly from the browser

Usage

See the example command line utility and the example web worker.

fetch(url)
    .then((response) => response.arrayBuffer())
    .then((wav) => {
        fdkAac(new Uint8Array(wav), function (err, aac) {
            if (err) return console.error(err)
            const file = new File([aac.buffer], 'test.aac', {type: 'audio/aac'})
            const url = URL.createObjectURL(file)
            // Do something with the file or the url, for example:
            document.querySelector('audio').src = url
        })
    })

Credits

Thanks to ffmpeg.js for inspiration.

License

It's complicated. Fraunhofer FDK AAC has a non-free license. Talk to your lawyer before using it in any project.

Own library code licensed under MIT License.

You can’t perform that action at this time.