Flac.js
What is Flac.js?
Flac.js is a JavaScript port of the flac tool, which in turn is part of the flac package, created with Emscripten. To say it in simple words, one could download all the static files making up this page and running them offline in a modern browser. No server side processing is required. Together with the sound recording API of contemporary browsers, one can not only build powerful audio editing solutions but also sound recording tools.What is FLAC and why is FLAC great:
To summarize: High compression rates, no loss in quality, lightning fast de- and encoding.FLAC stands for Free Lossless Audio Codec, an audio format similar to MP3, but lossless, meaning that audio is compressed in FLAC without any loss in quality. This is similar to how Zip works, except with FLAC you will get much better compression because it is designed specifically for audio, and you can play back compressed FLAC files in your favorite player (or your car or home stereo, see supported devices) just like you would an MP3 file.
FLAC stands out as the fastest and most widely supported lossless audio codec, and the only one that at once is non-proprietary, is unencumbered by patents, has an open-source reference implementation, has a well documented format and API, and has several other independent implementations.
xiph.org/flac
Demo
Try Flac.js, right here, right now. Clicking run will prompt for a WAV, AIFF, FLAC*, or RAW* file.
Browser support
In order to run the flac tool in a browser, there has to be support for a couple of HTML5 features.
JavaScript
PostMessage
WebWorkers
Blob constructor
WebAssembly
Additional command line switches
Run the demo
Borrow sample audio files
- Loading ...
Ways to give
Flac.js made your day?
- Setting up this project has been made possible through an Individual Engagement Grant by the Wikimedia Foundation. Donate to the Wikimedia Foundation or to Wikimedia Germany.
- The Mozilla Foundation supported the development of Emscripten. Donate to Mozilla.
- Xiph.org is hosting the FLAC project's infrastructure. Their developers created the FLAC audio codec and the command line tool. Donate to Xiph.org.
- GitHub hosts this site and the Flac.js code.
- Rillke ported the
flac
command line tool to JavaScript. Star, fork or watch the project on GitHub.