Sign In

    Enjoy FOSSwire's content? Have it delivered! Subscribe

    Gnac - A Simple Program to Convert Audio Files

    Gnac is a simple program for GNOME that allows you to convert audio files from one format to another.

    It is built atop of the Gstreamer media framework, meaning that you can import any files that Gstreamer is capable of playing and then output to Gnac's supported formats for the conversion.

    Once you've installed the program, it appears under the Sound & Video category, where you can launch it.

    Gnac on GNOME menu

    The interface is extremely simple. Use the Add button, or drag in a set of input files that you want to convert. Then select the output format from the list box at the bottom. Once you've done that, press the Convert button.

    Gnac interface

    The default export options allow you to convert to Ogg/Theora and FLAC as well as WAV and Speex. While the number of export formats built in by default is nowhere near as high as with some programs, particularly those based upon ffmpeg, keeping just a few formats does keep the application simple.

    For those people familiar with Gstreamer, it is possible to add to that list and add a new 'audio profile' with custom settings, so you are not strictly limited to those audio export formats.

    Despite that limitation, Gnac is an effortlessly simple program with a great interface and could come in extremely handy if you're trying to batch convert a music collection to FLAC or Theora, for example.

    The ability to drag a whole load of files in, choose the format and click Convert and then just leave it doing its work makes it perfect for batch jobs.

    Gnac 0.1.1 has recently been released, packages for your distribution along with source code to build yourself can be downloaded from here.


    Using ffmpeg to convert to MP3

    Now we all know we should be using free and open formats like Vorbis for our audio, right? Yeah. Unfortunately, sometimes we are restricted by what some devices will support.

    If you've got some tracks in Vorbis, WAV or another format and you want to convert it to MP3 format. Now you can use the open source MP3 library LAME, but it doesn't support quite as many input formats as ffmpeg does.

    ffmpeg, for the uninitiated, is a piece of software (and software library) designed for converting all sorts of audio and video from one format to another. Most distributions don't ship it manually and many don't support it, so you may need to enable extra software repositories before installing the ffmpeg package.

    Once you've got that, converting an audio file should be pretty easy and works as follows. Remember ffmpeg does take quite a lot as input files, and will detect the input format automatically. In a similar vain, the output format will be automatically determined by the file extension you give, so it makes light work of conversion and avoids lots of confusing command line switches.

    A simple audio convert might be:

    $ ffmpeg -i file file.mp3

    Substitute in your filename, make sure the .mp3 extension is intact in the output filename and a convert should happen. Obviously, doing like this does have the disadvantage of using default settings.

    The simplest of these settings to alter would be the bitrate, which determines the output quality. For MP3, a really quick guide would be that 128 kbps is fair quality, 160 kbps is good quality and 192 or above is very good quality.

    Setting the bitrate of the output file is also simple, so let's add it to the command:

    $ ffmpeg -b 192k -i file file.mp3

    Here I set for 192 kbps quality.

    This is only a very basic quick starter, but it does show you how easy it is to start converting audio with ffmpeg. If you need more flexibility in your conversion, you may want to switch to a solution like LAME, but for the ease of use and wealth of input formats a well-configured ffmpeg installation can give you, it's well worth a try for your converting needs too.