The “Post Export Command” can be used to operate on files after the export process has completed.
Arguments may be passed to the command interpreter using these aliases:
%f Full path and filename of the exported audio file
%d Directory containing the exported audio file (including trailing directory separator)
%b Basename of the exported audio file (without extension)
%s Path to the current session file
%n Name of the current session file
%% A literal percent sign
Any part of the command-line enclosed in double-quotes (") will be used as-is.
For example, exporting an mp3 file can be done by inserting lame -b320 %f which will convert the exported audio file (‘%f’) to a 320 kbs mp3 using the lame encoder (provided lame is installed first on the system).
Example: File copy to a backup drive on windows:
cp %f D:/backup
Example: converting to mp3 using a third-party encoder (such as LAME)
To export MP3’s you will need to edit one of your export profiles (or make a new one). For details on how to do that, visit the Exporting manual page. Additionally you will need access to the “LAME” encoder (despite the name, the “lame” encoder is widely regarded as one of the best-sounding mp3 encoders), as a program that can be launched from a command-line.
The LAME utility can be downloaded from multiple sources.
- For Windows: the one we use on our testing machine is RareWares LAME Bundle.
- For mac, we use Thalictrum’s LAME (this will make it available from the terminal)
- For Linux machines (debian based at least) you can probably install lame directly from your package manager. For example: “sudo apt-get install lame”
Finally, set up your command post export to run the lame encoder:
1. Edit your existing export format
2. In the section “command post export” (located at the bottom of the format page) you can choose to run a system command after your export has finished, and we link to some variables that you can use like %f being the absolute file-path of your newly exported file.
3. Set your post export command to run the lame encoder on your newly acquired file. See the picture for an example of our setup.
If the executable file isn’t available in your command-line PATH, then you will need to tell Mixbus the absolute path to the executable. Instead of just putting “lame” you would need to do: “path\to\lame.exe %f”
Hit export and now you will have an MP3 file exported automatically!
(note that some LAME implementations will need additional commands to export at higher bit rates, and some might require a slightly different syntax to the one provided)