Skip to main content
Topic: SLAC - Simple Lossless Audio Compressor (Read 1223 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

SLAC - Simple Lossless Audio Compressor

After dealing with some of the complexities of WavPack, I started to wonder whether it would be possible to create a basic lossless audio compressor in just a few hundred lines that was very easy to understand, really fast and CPU-friendly, and didn't totally suck performance-wise. Something that could be translated into a different language or even implemented in hardware without much effort.

The result is SLAC, and before anyone gets mad, this is not a new or replacement audio compression format. It's just a for-fun project to demonstrate how lossless audio compression works and how simple it can be. There's a little command-line front-end to convert to/from WAV files, but the resulting SLAC files are just for demo...they do not support error checking, metadata or seeking (haha, just like the first WavPack 20 years ago).

And just FYI, it performs in the same ballpark as Shorten or FLAC -0, so there's no threat of anyone adopting it.

Enjoy...  :)

https://github.com/dbry/slac

Re: SLAC - Simple Lossless Audio Compressor

Reply #1
Nice one, David. :)

Does it make use of "wasted bits" detection? It does - excellent! :D
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848| FLAC -5 -e -p -b 512 -P=4096 -S-

Re: SLAC - Simple Lossless Audio Compressor

Reply #2
Matches Shorten in features AND - from what I can see - even beats MP3 bitrates on certain material!!!1

;-)
High Voltage socket-nose-avatar

Re: SLAC - Simple Lossless Audio Compressor

Reply #3
It beats MP3 bitrates? That's quite impressive! Did you expect that would happen?

Re: SLAC - Simple Lossless Audio Compressor

Reply #4
It beats MP3 bitrates? That's quite impressive! Did you expect that would happen?

Even the popular lossless codecs can reach or beat MP3 bitrates. On some content, heck I'm shocked when some noise music reaches 500 ~ 750kbps. One DBC song reached 332kbps on wavpack when i still had it.
 

Re: SLAC - Simple Lossless Audio Compressor

Reply #5
It beats MP3 bitrates? That's quite impressive! Did you expect that would happen?

The "!!!1" was there to indicate I was joking. The joke is that it is true "on certain material": MP3 has a minimum bitrate that lossless encoders easily beat when the source material is silence.
High Voltage socket-nose-avatar

 
SimplePortal 1.0.0 RC1 © 2008-2019