Showing posts with label better know a package. Show all posts
Showing posts with label better know a package. Show all posts

Thursday, May 3, 2012

Gnac: Better Know a Package

As many of the several of you know, I use a blend of Slackware64-13.37, Gnome SlackBuild, some Salix packages, some of Alien's packages, and a bit I've built on my own. That means sometimes things can get a little confusing when it comes to compatibility or remembering what version of what libraries I have installed. I'd like to tell you about that confusion and about one package that's not in any repository I know of but is very useful to Gnome-friendly Slackers who are particular about their audio codecs.

My compatibility confusion is largely due to the introduction of certain Gnome 3 dependencies. For instance, gtkmm2 and gtkmm3 (C++ bindings for GTK+ 2 and 3, respectively) are both called "gtkmm," and I can only have one installed at a time. That means choosing between GTK+ 2 packages and GTK+ 3 packages, and given the staunchly anti-GTK+ 3 nature of Slackware and Salix, that can mean choosing between having a working GParted or a working System Monitor.


Now, I understand why a distribution that has no plans to include Gnome would want to include libraries whose main function is to get Gnome up and running. I have no complaints about it. It's an inconvenience at worst and an opportunity for exploration at best. The wonderful SoundConverter tool for transcoding audio files en masse (after all, if you wanted to convert just one file, you'd use your everyday audio editor and it wouldn't be any trouble to do so) is, unfortunately, one of the packages affected by the transition to Gnome 3. I can compile the present 2.0.x series, but it won't start due to mismatched libraries, and I can't yet get the development version, which targets Gnome 3, to compile.


That's where Gnac comes in. Gnac is the GNome Audio Converter. Its UI is extremely similar to SoundConverter's -- so much so that a first-time user could be forgiven for believing they were using a slightly-improved version of SoundConverter. As far as the backend goes, Gnac also uses Gstreamer for its conversions. As far as the end user is concerned, the only difference is Gnac's flexibility in setting conversion options.


But for you, the Gnome-happy Slacker who has to compile the package yourself, the portability of the code is nothing to sneeze at. SoundConverter's dependency on Gnome-python means that if you can get it to build on your GSB-enabled system, it won't run for you. In general, SoundConverter has many more dependencies, and those dependencies are more complicated. On my older laptop, that means a lot of compile time gets rewarded with a program that's kaput.

In contrast, Gnac is pure C code. To run the latest version, as I've done, all you need is a standard GCC installation and the appropriate GTK+ 3 packages that have come with your GSB installation. If you're not a Gnome user, you'll want to grab an earlier version of the code that uses GTK+ 2 widgets. In practical terms, we're talking about the difference between building half a dozen dependencies plus the desired package vs. simply building the desired package. Even on aging hardware, the build takes less than a minute.

All you have to do is unpack the source from the project's download page and follow the simple process outlined there under the "Build from sources" header. And it just works.


None of this is to knock the SoundConverter package or developers. I used it for years with nothing but pleasure. It's just that it doesn't work with my present setup. In fact, what I like most about Gnac is its similarity to SoundConverter.


As I hinted at earlier, Gnac makes one minor improvement over its cousin: the granularity of control over how your files are encoded. Instead of the fixed profiles seen in SoundConverter, SoundJuicer, and others, with new profiles added by searching the Web for cryptic text to enter into a dialogue box, Gnac comes with only one profile. However, no searching and no copying is necessary to add new ones. All of Gstreamer's codecs are available from a drop-down menu from within the profile editor.


All the preferences about a how that codec is used are set from the profile editor, with standard options always visible and Geek++ options available by opening the "advanced options" tab with a single click. Also, not (initially) having a single, fixed profile for each codec means that you can be sure each one is set to your liking and that you can have multiple presets per codec. That would be useful if you wanted to have low-bandwidth and high-quality options of a podcast available without having to fumble over the controls each week, or you have two portable media players of different sizes or that accepted only particular formats.


Also promising is the talk on Gnac's developer pages about their ambitions to video transcoding. I don't want to name names, but I find all the FFmpeg GUI transcoders available as SlackBuilds to look ugly and to have unyielding profiles in case I want to take advantage of a particular feature. If the Gnac team bring a similar sensibility to the forthcoming features, then they will have achieved something truly great: a program that's as simple or advanced as the user desires that has a clean and attractive UI and is not stressful at all to package maintainers. Well done, team.


Have fun!


I would love to hear what you think of what I've written, or what you'd like to read about in the future. Please don't be shy about commenting on this page or about adding me on Google Plus, where I share more geeky/Linux things and fewer personal things than I do on other social networks, so I'm more comfortable adding Internet strangers (please don't ask to join my other networks, strangers).