/sndcrunch

A simple audio bit crunching tool

Primary LanguageCGNU Affero General Public License v3.0AGPL-3.0

sndcrunch

A simple audio bit crunching tool.

To Build

You must first satisfy the dependencies. You need a C99 compiler and libsndfile. On Debian-based systems, you can get these like so:

# apt-get install build-essential libsndfile1-dev

You also need Delwink's libpfxtree. Follow its instructions for installation.

sndcrunch uses a simple build process: $ make

To Install

After building (see above):

# make install

Using sndcrunch

The most basic usage is an input and output file:

$ sndcrunch infile.wav outfile.wav

The formats supported by sndcrunch are:

  • AIFF with the extensions aif and aiff
  • AU with the extensions au and snd
  • CAF with the extension caf
  • FLAC with the extension flac
  • Ogg Vorbis with the extension ogg
  • WAV with the extensions wav and wave
  • XI with the extension xi

The trickiest part of using sndcrunch is setting the right loss level. It can be set using the -l option as so:

$ sndcrunch -l 5 infile.flac outfile.ogg

Each sound input seems to have its own "sweet spot" where the output is most ideal. A loss level too high produces unpleasant noise, and a loss level too low just makes a scratchy version of the original. The default loss level is 10 which seems to be a decent level for human speech sounds, which is the original purpose of this program.

The minimum loss level of 1 would actually leave the input unaltered. Since any combination of the input and output extensions is allowed, you could actually use sndcrunch as a simple audio converter if you wanted, but it only outputs 16-bit audio, so it would not be the ideal transcoder.

For more information on sndcrunch's CLI, use -h.

Hacking

Match the style you see in the code. Do not use spaces for indentation.

License

sndcrunch is free (libre) software, released under the terms of version 3 of the GNU Affero General Public License. You are free to copy, modify, and redistribute this software and use it for whatever purpose. See COPYING for details.