Hi-Res Audio Software – Part 3 : CAO

A short follow-up on the last post.

I mentioned that all my software scripts were now fully updated and capable of working with hi-res audio files... except that CAO, whilst perfectly happy merging per-track hi-res FLACs into single composition-at-once hi-res FLACs was unable to reverse the process (whereas, for standard CD-audio resolution FLACs, the processes are completely reversible in either direction).

I mentioned briefly last time that this inability to break apart hi-res FLACs was due to my reliance on shnsplit, a very well-known tool that has been around for donkey's years... and hasn't (as it turns out) really been updated in about 12 years either! Since shnsplit itself can't break open hi-res FLACs, CAO was similarly encumbered.

Well, I promised I'd look for ways around that limitation, and today I'm announcing a brand new CAO version that does split hi-res SuperFLACs into per-track hi-res FLACs, thus making CAO as reversible for hi-res audio as it always was for standard audio. The key was to abandon all use of shnsplit and write my own code to do track-splitting relying on basic ffmpeg functionality. Ffmpeg is gold-standard software, which has long been fully hi-res audio aware and is constantly being maintained by very capable developers. Shnsplit, by contrast, looks to be a little like abandonware at this stage. So both hi-res and standard-res audio are now joined and split by the same ffmpeg-based process: it's frankly a much better way of doing these sorts of audio file manipulations, even if you never use hi-res audio formats and have no intention of touching them in the future, either!

The command cao --asunder will therefore split apart any super-FLAC file that CAO itself has previously created from a bunch of separate per-track FLACs, regardless of whether that super-FLAC is hi-res or standard-res.

I've also taken the opportunity to add an --external (or just -x) switch. This tells CAO to split apart any FLAC or APE file it finds in a folder with an external cue sheet. Programs like Exact Audio Copy on Windows, for example, are commonly used to rip CDs -and, often, will rip them into a per-album format with an external cuesheet. If you've created such files previously, you may now want to split them apart into per-track compositions: CAO can do this now, too. I can't guarantee the results, since CAO didn't produce the cuesheet in the first place and cuesheet formatting can be wildly varied, depending on what program was used to generate them. But in all my testing, I've not encountered an external cuesheet that CAO couldn't translate. So: cao --asunder --external (or just cao --asunder -x) can now be used to split apart super-FLACs even if they weren't created by CAO in the first place.

I just mentioned, too, that CAO can split apart super-APEs. It does this by cheating! CAO cannot actually understand APE files, so if it spots an APE, it simply calls my own AUAC utility to first convert it into a super-FLAC ...and then it can split the super-FLAC as normal. Obviously, for APE-splitting to work, therefore, you must have previously installed AUAC. Also, bear in mind that there are some distros where AUAC has never been able to convert to or from APE (because their developers regard APE as proprietary and/or closed source, so don't allow the relevant encoder/decoder package into their repositories): these are generally Debian- and Ubuntu-derivatives. If you're using such a distro, AUAC cannot deal with APEs at all... and therefore, neither can CAO.

When invoked with the 'external' switch, the rule is that CAO expects to find one APE and a cuesheet or one FLAC and a cuesheet. It will error out if it finds more than one APE or more than one FLAC, or an APE and a FLAC, or more that one cuesheet! So long as the folder in which you invoke CAO contains just one music file and a cuesheet, however, it should work fine.

The new hi-res-and-external-cuesheet capable version of CAO is numbered 1.08 and is available from the usual download page if you like to upgrade things manually. If you have a recent version, you can upgrade more simply with the command cao --checkver. If you have an older version, lacking checkver capability, just run these commands to achieve the same outcome:

cd
wget https://absolutelybaching.com/abc_installer
bash abc_installer --cao

However you upgrade, happy combining-and/or-splitting!