Exporting multiple audio files - Audacity Manual

# Exporting multiple audio files

From Audacity Development Manual

This expansion of the Export Audio dialog appears in response to selecting Multiple Files in the Export Audio dialog.

- This command exports multiple files at once, either one file for each Audacity audio track, or one file for each label placed below audio tracks.
- Exporting multiple audio files by labels is a convenient way to export separate files for each track in a long recording.
- For Exporting multiple audio files, selections in the waveform play no part in determining the audio that is exported.

See the Tutorial - Copying tapes, LPs or MiniDiscs to CD for an example of how this is used.

What you hear by previewing with playback prior to export is what you will get in the Exported audio file.

- When exporting multiple audio files, Audacity will only export tracks that are not grayed-out by use of the Mute or Solo buttons in the tracks' Track Control Panels.
- Also note that any hidden parts of audio clips are not exported, see Audio Tracks and Clips.

  Accessed by: File > Export Audio Ctrl + Shift + E

## Filename, Location and Format

This is the same as in the un-expanded Export Audio dialog.

## Audio options

Use the Audio options pane to choose the options for the export format you have selected. It enables you to make settings like quality or encoding for formats with options.

see Export Audio for details.

## Split files based on

- Tracks: Export each audio track in your project to a separate file. File names are based on the track names. Any labels in the project are ignored.
- Labels: You may choose this option if your project contains labels as well as one or more audio tracks.

  Only labels in the uppermost label track are used for export. If more than one audio track is above the uppermost label track, the audio of all those tracks will be mixed into the exported files, unless you press the Mute button on some of the tracks to exclude them from the mix.

- The label track must contain at least one point or region label, thus:
        • Point labels mark the start of each section of audio you want to make into a separate file
        • Region labels span each section of audio you want to make into a separate file.

  | Be very careful when moving a point label not to accidentally click on a chevron and thus create a region label. If you do this you may end up exporting a very short region of audio, effectively a null audio file.

  - Include audio before first label: Check this option only if you do not have a point label marking the start of the first file or do not have a region label spanning the first file.
  - First file name: If you have checked "Include audio before first label", the name will be taken from the File name at the top of the Export dialog . Type in the name you want to be used for the first exported audio file. If you have imported audio files, this text box contains the name of the first imported file, but you can still change the text.

For both splitting files based on tracks or labels, the metadata exported for each file will be the same (except for Track Title and Track Number) unless your Import / Export Preferences are set to show Metadata Editor and you enter the metadata for each file manually. If you want to import and export multiple audio files and preserve each file's tag values automatically, use Macros instead.

| When exporting using Custom FFmpeg Export, Audacity will not add an extension to the file name. As workarounds: add the appropriate file extension to the labels or the track names add the extension to the files after export.

| When exporting using (external program), Audacity will not export the files, and will show an error message, unless you add an appropriate extension to the (external program) Command or to the file names (the labels or tracks).

## Name files

- Using Label/Track name: Each file will be named exactly as the text of each label if "Split files based on Labels" was selected, or exactly as the name of each track if "Split files based on Tracks" was selected. If any labels are empty (track names cannot be empty), Audacity will name each associated file as "untitled" and add a number as necessary to distinguish multiple "untitled" files.
- Numbering before Label/Track Name: Label or track names are used but a consecutive two-digit number and hyphen are prefixed to each file name. The numbering starts from "00-" if you chose "Include audio before first label", or from "01-" if you did not. This is a good choice if you are burning tracks to an Audio CD.

Examples for numbering before: If you had a label named "Reflection" marking the start of the first file, followed by a label marked "Rejoicing", then the exported files would be "01-Reflection" and "02-Rejoicing"; If the labels were empty in the above case, the exported files would be "01-untitled" and "02-untitled".

- Numbering after File Name Prefix: Label or track names are ignored. Instead, each file is named using a standard prefix specified in "File Name Prefix" below followed by a hyphen and a consecutive two-digit number. The numbering starts from "-00" if you chose "Include audio before first label", or from "-01" if you did not.

  - File Name Prefix: Specifies a file name prefix to be used which will be followed by consecutive numbering. This name will default to the name of the project that you see in the Audacity title bar. If your first action in a project was to import audio files, this text box contains the name of the first imported file. You may change the text to whatever you like.

Example for numbering after: If you had labels that marked the start of the second and third files, chose "Include audio before first label" and entered "Remaster" as the prefix, then the exported files would be "Remaster-00", "Remaster-01" and "Remaster-02".

## Overwrite existing files

This item is off (unchecked) by default. If unchecked, any files to be exported which have the same name as pre-existing files in the export location will be renamed with a hyphen and numerical suffix. The pre-existing files are left "as is". The first file which is exported with an identical name is renamed with suffix "-2" and subsequent files exported with that same name are renamed with suffix "-3", "-4" and so on.

When checked, any pre-existing files in the chosen export location which have the same name as the file to be exported will be replaced (without prompt) by the new file. However, there is an exception to this; if the Export Multiple process would create identically named files based on label text or track name these files will not be overwritten but given an ascending numerical suffixes.

## Metadata

The Edit Metadata button enables you to change the metadata for the all the multiple files you are exporting. Clicking it will invoke the Metadata Tags Editor.

If you do not use this button then Audacity will use whatever you have set as the default metadata in the Metadata Tags Editor. This will be blank if you have never set default metadata.

| There is a bug whereby user supplied metadata applies only to the first exported file - it does not carry through to any further files exported as part of the multiple export, instead Audacity uses the default metadata set for the second and subsequent files exported. Please see Bug #5825.
| The workaround is either: Before the export use Edit > Metadata Editor to set the default metadata set, or Use the Edit Metadata button in the Export Audio dialog and set your required metadata for the export.

## Export and Cancel

Clicking the Export button will export the audio to the folder location, with the file name(s) and type you have selected.

Clicking the Cancel button will abort the export dialog without exporting any files.

## Export progress dialog

Once you have clicked the Export button, or the final metadata OK button, Audacity will display a dialog enabling you to monitor the progress of the export:

The green bar is a visual progress indicator. The Elapsed Time and Remaining Time are based on an estimate of the total time needed to export the file (the estimate may change as the export progresses).

### Stop and Cancel

Clicking the:

- Stop button immediately stops the current export, leaving the partly exported file in place. It then it moves on to start processing the next labeled section,
- Cancel button immediately stops the current export, removing the part exported file then aborts the rest of the exports, returning to the Export Multiple dialog.

## Export results

Once multiple exporting has completed, a status window is displayed showing the resulting files:

Click the OK button to close this results dialog.

## Examples of exporting multiple files using labels

In the following examples the choices in the dialog would be: "Split files based on: Labels" and "Name files: Using Label/Track name".

### Case 1: A point label marking each song

  - In this case the first file will be named "First song" and will contain the audio between the "First song" label and the "Second song" label.
  - Similarly the second file will be named "Second song" and will contain the audio between the "Second song" label and the "Third song" label, and so on for the rest of the labels.
  - The last file will contain the audio from the last label to the end of the audio track and will be named according to the last label in the label track.

### Case 2: A region label marking each song

  - In this case the first file will be named "First song" and will contain the audio spanned by the "First song" label.
  - Similarly the second file will be named "Second song" and will contain the audio spanned by the "Second song" label, and so on for the rest of the labels.
  - Any audio beyond the last region label will not be exported

### Case 3: A point label marking each song except the first

  This is a case where you would want to check "Include audio before first label" and supply a file name in the "First file name" text box.
  - The first file will be named whatever is typed into the "First file name" text box and will contain the audio between the start of the track and the "Second song" label.
  - Similarly the second file will be named "Second song" and will contain the audio between the "Second song" label and the "Third song" label, and so on for the rest of the labels.
  - The last file will contain the audio from the last label to the end of the audio track.

### Case 4: Region labels marking two chosen songs

  In this case we want to export only two songs - perhaps songs by the same artist from a compilation album. Each song is marked with a region label.
  - Only two files will be exported - "Second Song" and "Fourth Song" - corresponding to the audio spanned by those labels. No other audio will be exported.

### Case 5: A mix of point and region labels

In the case above we have an interview with a series of questions (upper track) and answers (lower track), and a concluding statement by the interviewer. We want to export the question-answer pairs and the interviewer's conclusion as separate files.

In most cases the question-answer pairs follow one after another, so point labels are a quick and convenient way to mark them. However after the third answer, the interviewer is told by the studio manager that time is running out, and the two parties discuss this. We want to omit this exchange.

  - We mark the start of the first two question-answer pairs with point labels "QA1" and QA2".
  - We mark the third pair with a region label "QA3" since we want to omit the discussion about running out of time.
  - We mark the start of the fourth pair with point label "QA4" and the start of the interviewer's conclusion with point label "Outro".

So this is what will be exported:

  - The first file will be named "QA1" and will include the audio between the "QA1" and "QA2" point labels.
  - The second file will be named "QA2" and will include the audio between the "QA2" point label and the start of the "QA3" region label.
  - The third file will be named "QA3" and will include the audio spanned by the "QA3" region label.
  - The fourth file will be named "QA4" and will include the audio between the "QA4" and "QA5" point labels. Note that the audio between the end of the "QA3" region label and the "QA4" point label is not exported.
  - The final file will be named "Outro" and will include the audio between the "Outro" label and the end. Had we decided to cut off the conclusion half way through, we would have selected what we wanted to keep and labeled that, producing a region label "Outro" instead. Then the audio beyond the "Outro" label would not have been exported.

Note that in order to export the pairs and the conclusion excluding the interruption, we could equally have drawn region labels for each, similarly to Case 4 above. Had we needed to edit each of these regions individually before export, it might have made sense to label them as regions in any case.