Semplice's Audio Codec Capabilities

1.0 Introduction

This site believes that classical music deserves to be listened to in the highest possible audio quality. It also believes in not using proprietary technologies to achieve that goal, wherever possible. Practically, that means it encourages you to store your classical digital music files in the FLAC (free, lossless audio codec) format. A FLAC file preserves the entire audio signal that was released by the record company. That contrasts with formats such as MP3 or OGG, which are lossy audio codecs: part of the audio signal is thrown away, though it's meant to be the part which most normal human ears couldn't hear anyway. Since MP3s and OGGs throw some of the audio data away at the point of their creation, they are usually significantly smaller than a FLAC of the same music (potentially, an MP3 can be around 10 times smaller than the corresponding FLAC). In the days of expensive, small hard disks, this size difference made MP3s attractive to music collectors; in the modern day of 6TB hard disks for less than £100, there is much less need to worry about storage space, and the higher audio quality associated with the FLAC format therefore ceases to be a concern.

On the other hand, I have a car audio player that can read an SD card, but only in FLAC, WMA and MP3 formats -and given the noisy environment of a car which renders the perfect audio quality of FLAC unnecessary, together with the limited storage space in most SD cards, I often find myself needing to copy a selection of music out of my main FLAC-based music collection and convert it to MP3 before copying the MP3 files onto an SD card.

When I buy music downloads, they have sometimes come in APE format: another lossless audio codec, like FLAC, but proprietary and not open source. I therefore prefer to convert any APE files I buy into their exact FLAC audio equivalents. (Converting between lossless formats can be done as often as you like, in any direction, without losing any audio quality, since the entire audio signal is preserved at all times. Converting between different lossy formats (such as MP3->OGG->WMA) is definitely not recommended, since new bits of the audio signal are thrown away at each conversion).

Finally, these days I occasionally buy SACDs and rip them either to a single ISO file or to multiple DSF files. In all cases, I need to then convert the ISO or the DSFs to high-resolution FLAC files.

So for all these sorts of reasons of convenience and flexibilty, I need the ability to convert to and from a variety of audio formats -and Semplice has been written to provide this sort of functionality using its Option 15. To take that option, you don't need to have used any of Semplice's other functionality, but you do need to have launched Semplice whilst sitting in a folder full of music files of one sort or another.

2.0 Performing 'Standard' Audio Conversions

Semplice can accept eight possible input audio formats, as shown by the first sub-menu you see when you take Semplice's main menu Option 15:

Here, you can see I have a folder full of MP3 files in the file manager, shown in the background. I've launched Semplice from within that folder, taken main menu Option 15 and am now looking at all the input formats that Semplice can accept for audio codec conversion purposes. Semplice makes no intelligent choices (otherwise known as assumptions!) at this point: though it has been launched from within a folder-full of MP3s, it's not going to assume that you want to convert MP3 into anything else: it's up to you to tell Semplice precisely what you want to convert from, by selecting the correctly-numbered option (in my case, I'm going to need to select sub-option 3, to indicate I want to convert MP3s into something different.

Note at this point: you won't always see option 7 displayed in this way. ISOs are a special audio format I'll discuss in detail below. They require special software to be installed on your system, if Semplice is going to be able to work with them. If that software is not detected on your system, Semplice will simply display sub-option 7 in greyed-out text saying, "ISO decoding not available". I'll show you how to fix that problem later on.

You should also note that APE is a problematic format for some distros: as mentioned in the introduction, it's a proprietary, non-open-source, audio codec and therefore some Linux distros do not offer support for it. It depends on whether the ffmpeg audio/video program has been compiled with APE support or not -and that's not something you are likely to have a lot of control over. If Semplice detects your version of ffmpeg does not support APE conversion, it will again display sub-option 2 in greyed-out text reading, "APE  decoding not available". There's nothing really to be done to fix this if you find your distro is affected.

Anyway: if I want to convert my MP3s, I'd better type '3 -> Enter'. The screen changes in response to this:

 

A new list of codecs now appears on the right-hand part of the screen. This time, there are only 7 possible output codecs: you'll notice that APE is not in the list, and neither is ISO nor DSF. APE is not a supported output codec for any Linux distro: as previously mentioned, it's not open source and therefore is not a codec that Semplice wishes to support by making more files using it! ISO and DSF are pecliar formats that I'll discuss in detail below, but the short version at this point is: it makes no sense to ever create a DSF or ISO file unless you have extremely specialised audio hardware, so Semplice simply doesn't bother trying to create them.

So, for now: let us assume I want to convert my MP3s into (say) OGG. That's a lossy codec being converted into another lossy codec -which, whilst certainly do-able, is really not a good idea. The MP3s have already lost audio data; they're now going to lose some more by being converted again to another lossy codec. So: it's not a good thing to be doing, but Semplice is not going to stop you doing it. I therefore type sub-option 5 and press Enter. The screen will clear and display the following message:

Not a lot else happens at this point! The little spinner 'thing' will rotate as the audio conversion takes place and, when it has finished, Semplice will just automatically switch back to displaying the main menu screen. At this point, I can switch back to my file manager and see what Semplice has achieved:

You'll immediately note that the folder that used to have just five files in it now has ten! Semplice has, in other words, created new OGG files, not changed or destroyed the source MP3s. This is in keeping with Semplice's general philosophy of doing things, as far as possible, in a non-destructive way. If you were now to listen to the OGGs and decide they sound horrible -well, at least your original MP3s are still there to fall back to.

I should mention, however, that this is only Semplice's default behaviour: if you get comfortable with the way Semplice converts between audio codecs, it's possible to configure the AUDIOIN_DELETION parameter in the Semplice persistent configuration file to have a value of 1 (rather than its default of 0). Doing that will mean that the source MP3s in this example would have been auto-deleted. I'd suggest not switching this feature on, however, until you're really comfortable with the work Semplice does, because if it deletes the source files, they're gone for good (unless you manually keep backups of them beforehand, of course).

In my case, if I want the source MP3s deleted, it's up to me to use my file manager to do the job, using standard file manager techniques!

One other thing I wanted to point out. If I use a tool such as MP3Tag or Kid3 to inspect the tags that I've associated with my source MP3s, I see this:

Here, you can see that tags such as ARTIST and ALBUM have been filled in with appropriate values, specifically for file "07...March.mp3" Now let me inspect the equivalent "07...March.ogg" file, just below it in the listing on the left of that screenshot:

You'll notice that the OGG has acquired an additional ENCODER tag; the COMMENT tag in the MP3 has also become the DESCRIPTION tag in the OGG. But other than those minor changes, if there was metadata in the source files, it has been copied across into the output files. That is always the case: Semplice will not lose metadata. Incidentally: the change in tag name from COMMENT to DESCRIPTION is something which ffmpeg, the principle audio library that Semplice relies on for its codec conversion activities, does and over which Semplice has little control. If the output format is FLAC, however, then Semplice will take extra steps to ensure that even that change is reversed in the final output files.

Finally, note that you can re-run option 15 as many times as you like on the same set of audio files, converting a single source into many possible output formats, too: here's my file manager after I decided to re-run Option 15 with a choice of OGG (4) as the input and WMA (6) as the output codec:

So now I have three files for each track on the original CD: the original MP3, the MP3-derived OGGs, and now the OGG-derived WMAs... it's a really thing to be doing lossy conversions from lossy formats, as I've mentioned before, but Semplice will do it anyway if you insist on it!

Anyway: that's basically it. From a folder full of audio files, launch Semplice, take main Option 15, then pick an input and output format, and (if auto-deltion of input files is turned off) decide which set of files you wish to keep.

3.0 A Word on Quality

If you are ever asking Semplice to create new files that use lossy audio codecs (such as MP3, WMA or OGG), the question arises as to how aggressive the audio codec will be when discarding parts of the audio signal. If they discard large amounts of it, your output files will be very small, but will probably sound a bit rough. If they don't discard much, they will sound good, but will be significantly larger than they otherwise would be (but still not as big as a lossless FLAC or WAV would be). This 'aggressiveness' is referred to as the codec's quality setting.

The default quality setting for all lossy output codecs is 4: this results in 'reasonable' sounding output for OGG, MP3 and WMAs. In MP3 terms you may be familiar with, the output will be roughly equivalent to 128kbps. You can, however, change the quality setting to be another number by setting the AUDIO_QUALITY parameter in the persistent configuration file to some new value.

Just be warned: there's only one AUDIO_QUALITY parameter to be set, no matter which lossy audio codecs you go on to use... but: MP3 quality works the opposite way to the way it works for WMAs or OGGs. In the world of MP3, for example, a quality setting of 9 will result in dreadful audio, but tiny files; whereas a quality setting of 0 will result in near-CD quality audio, but much larger file sizes. On the other hand, the rules are entirely reversed for OGGs and WMAs: for them, a quality of 9 will sound great, and 0 will sound horrible. This weird reversal of quality scale is why Semplice defaults to a setting of 4, which is about in the middle of all codec's quality settings and so applies more-or-less equally to them all. Start altering the quality one way of another, however, and you need to be aware in which direction you're shifting it and what results it will have on your favourite codec outputs!

The quality setting only applies, by the way, when the specified output audio format is a lossy format. If you are outputting to FLAC, for example, and have AUDIO_QUALITY=4 set in your persistent configuration file, it is silently ignored (since lossless formats don't discard any of the audio signal at all, ever).

4.0 Optional SACD Support

SACDs were meant (by the record companies) as the "upgrade" to bog-standard CDs that would ideally force you to re-buy all your existing music recordings in search of that sweet, sweet high resolution audio experience (that turned out to be indistinguishable from the standard CD audio experience: there's a reason this stuff never really took off!) Whilst it's easy to be cynical about SACDs, they nevertheless do provide a convenient way of obtaining re-mastered old recordings which genuinely do sound better than their original CD releases. So: you may well want to acquire and rip SACDs (and I wrote an article explaining how to do that using BluRay players quite a while ago).

If you rip your own SACDs (or buy digital versions of them), you might well end up the proud owner of "an ISO file". This is not to be confused with the sort of ISO file that computer nerds use as images of data CDs, but is a single file that contains within itself all the audio tracks sourced from the original SACD. You cannot really ever play an ISO file directly: it needs to be converted into separate digital music files using more standard audio codecs.

Semplice can interpret and convert ISOs into any of its standard audio output codecs, but it needs an extra software package to be installed before it can do this, called odio-sacd. The odio-sacd program is available for free download from Robert Tari (its author) own website. It may also be more readily available in your own distro's repositories. Failing that you may need to compile it yourself.

If you are using an Arch-based distro (such as Manjaro, EndeavourOS or even Arch itself), for example, the Arch User Repository (AUR) has the binaries ready to compile, with a command such as :

pamac build odio-sacd

If you don't like installing from the AUR, though, or if you're using a non-Arch distro, you'll need to compile the program from source (which sounds harder to do than it is!). To start with, you'll need to install all the packages required to allow code to be compiled. Precisely how you do that will vary, depending on what distro you're using. For example:

  • Arch-based distros: sudo pacman -S gcc-libs make binutils gcc git cmake pkg-config
  • Fedora-based distros: sudo dnf install g++ make binutils gcc git cmake pkg-config
  • OpenSuse Tumbleweed: sudo zypper in gcc-c++ make binutils gcc git cmake pkgconf
  • On Ubuntu and Debian-based systems: sudo apt install g++ make binutils gcc git cmake pkg-config

Once that 'compiling environment' is present, you'll then be able to issue the followings commands to get the odio-sacd source code, compile it and install it:

cd

git clone https://github.com/tari01/libodiosacd.git
cd libodiosacd
mkdir build
cd build
cmake ..
make
sudo make install

cd
git clone https://github.com/tari01/odio-sacd.git
cd odio-sacd
mkdir build
cd build
cmake ..
make
sudo make install

The first 'cd' just takes you to your home folder, so we know where all the subsequent downloads will save their files to. There are then two sets of 'download, compile and install' commands, to get the two distinct parts of the odio-sacd 'ecosystem' installed on your system. Ignore any messages you see about 'nothing to be done' when you do the second "sudo make install".

After that, you just need to tidy up a little:

cd
rm -rf libodiosacd
rm -rf odio-sacd

...which will just delete the temporary folders the 'git clone' commands created within your home folder.

Note that on Ubuntu 22.10, I had to issue an extra command to make the operating system aware of where, precisely, all the shared files that odio-sacd depends on were actually copied to: that distro seems to build things into /usr/lib64 rather than vanilla /usr/lib, and that makes odio-sacd itself think the files it depends on are missing. A simple sudo ldconfig /usr/lib64 will fix that problem, however. Any distro in the Ubuntu family is likely to be affected by the same problem, of course (and fixed by the same fix!)

The acid test of whether everything has gone to plan is take Option 15 from the Semplice main menu. You might see either of the two options shown below:

The left-hand image is what you'll see if odio-sacd has not been installed: ISOs simply can't be handled. The right-hand image is what you'll see if odio-sacd has been installed correctly: the fact that sub-menu option 7 is not greyed out and simply reads 'ISO' tells you that Semplice feels confident in its ability to talk to odio-sacd to do what's necessary to make sense of SACD ISO files!

When converting an ISO into something more standard and playable, it is recommended that you choose the sub-menu Option 2 Hires FLAC format. This is sampled at double standard Audio CD frequencies, and thus preserves the higher audio sampling resolution associated with most SACDs. Final file sizes will be about four times what they would be as 'standard FLACs' in consequence. If you want to go nuts about it, however, then outputting to sub-menu Option 3 Super Hires FLAC gives you around quadruple the bitrate associated with standard CDs and thus outputs files around 8 times the size of what would be expected from a standard CD. Whether you can hear the difference between the different bit- and sampling-rates is objectively unlikely, but is entirely a matter for your own subjective judgment! There is nothing to stop you, in any case, from converting an ISO into low-quality MP3s if that's your particular mood of the day, too!

5.0 A Note on Parallelism

Audio conversion is CPU-intensive work and can take quite a lot of time. To try to make the pain as bearable as possible, Semplice will always parallelise its audio conversions as much as your CPU will allow. To determine its maximum possible degree of parallelism, it generally uses the operating system command nproc. On MacOS, it uses a different utility, but the outcome is much the same: a count of the number of threads your CPU is able to operate simultaneously. Note that it's counting threads, not cores. If you have a dual-core CPU, for example, with hyperthreading enabled, that would count as 4 threads. If you had a quad-core CPU with hyperthreading disabled, that would also count as 4 threads. Meanwhile, my server's 10 core Xeon, with hyperthreading enabled, would count as a whopping 20-thread processor.

Having worked out how many threads are available on your particular CPU, Semplice will use all of them. If you are doing CPU-intensive work on the same PC at the same time as you're trying to do audio codec conversions, therefore, you can expect your PC to struggle a bit.

Should you wish to artificially restrict Semplice to using a lower degree of parallelism that it would automatically choose, this can be done by setting PARALLELISM in the persistent configuration file to a value other than 0. The zero value means 'work it out for yourself, and use all available threads' -the default behaviour previously described. Set PARALLELISM=4, however, and then Semplice will only use 4 threads, even though many more might be available to it. Should you ever set PARALLELISM to a number greater than your CPU is actually capable of running, the parameter is silently ignored and Semplice reverts to its usual behaviour of using all threads that are actually available.

On my Xeon Server, therefore, with 20 available threads: if I set PARALLELISM=0, Semplice will use all 20 threads. If I set PARALLELISM=5, Semplice will use only 5 threads. And if I set PARALLELISM=900, Semplice will again use just 20 threads.

As a final point: if, for some reason, your particular choice of operating system doesn't report CPU thread counts at all, Semplice defaults to using just 2 threads at a time, which is felt to be a very conservative, safe fallback option! This should never actually happen, though.

6.0 Conclusion

Summing up:

  • You have seen how Semplice can be used to convert between different lossless and lossy audio formats with ease and in a non-destructive manner.
  • When Semplice is working with lossy audio formats, you've learnt how to set the AUDIO_QUALITY persistent configuration parameter so that acceptable audio quality of the output files is achieved.
  • You have also seen how you can add optional SACD ISO format support to Semplice by installing odio-sacd and how this then allows ISOs to be converted to more usable audio formats.
  • Finally, you have learnt how to control how much of your CPU resources Semplice is allowed to use with the PARALLELISM persistent configuration parameter, as well as understanding Semplice's default behaviour in this regard

|[Back to Front Page]|[Semplice Tagging Model][All About SuperFLACs]|[Volume Boosting]|[Audio Codec Conversions]|