# Audio tools

> Merge audio files into one and split chaptered audiobooks into per-chapter files on your Mac. Reorder, pick the format and build M4B audiobooks.

Source: https://picmal.app/docs/audio-tools

Picmal's sidebar has an **Audio** section for working with audio files as a whole, rather than converting them one by one. **Merge Audio** joins several files into a single track (and can build a chaptered M4B audiobook) while **Split by Chapter** breaks an audiobook back into one file per chapter. Both run entirely on your Mac.

## Merge Audio

1. Select **Merge Audio** in the sidebar
2. Drop two or more audio files into the window
3. Drag rows to set the order, the list order is the play order
4. Click **Merge**

![Merge Audio in Picmal: four books of The Odyssey audiobook queued, and the waveform of the single file it merged them into](/images/docs/merge_audio.png)

The merged file is saved next to the first one as `<name> (merged).<ext>`. If that name is taken, Picmal counts up instead of overwriting, `<name> (merged) 2.mp3`, and so on.

- Drag rows to reorder; the number on each row is its position in the merged track.
- Select rows and press Delete to remove them, or right-click for **Remove** / **Show in Finder**.
- A file Picmal can't read as audio shows an orange warning and blocks the merge. Remove it and try again.

### Lossless when it can be

When every file in the list already shares the same format, sample rate, and channels, Picmal joins the streams without re-encoding. It's fast and there's no quality loss. Mix formats (say an MP3 and a WAV) and it re-encodes them to the output format instead. Either way you get one continuous track.

### Output format

Open **Audio Options** to choose the output format. Leave it on **Same as first file** to keep the first track's format (the setting that keeps a same-format merge lossless) or pick one of MP3, M4A, M4B, AAC, WAV, AIFF, FLAC, OGG, OPUS, or AC3 to convert everything as it merges. Your choice is remembered between sessions.

### Build a chaptered audiobook

Pick **M4B** as the output format and a **Add chapter markers** option appears in Audio Options. Tick it, and each file you added becomes its own chapter in the finished book, named after the file. Point Merge Audio at the per-chapter files you get out of Audible or Libation and you get a single M4B that scrubs by chapter in Books, Music, or QuickTime. Leave it unticked for one continuous track with no chapters.

![Merge Audio in Picmal building an M4B audiobook from four books of The Odyssey, with the Audio Options popover set to M4B and chapter markers](/images/docs/merge_audio_chapters.png)

### Output name

In the same popover, type a name for the merged file, or leave it blank for the automatic `<name> (merged)` name. The extension follows the output format you picked. The file is always saved next to the first input.

## Split by Chapter

The reverse of building an audiobook: take one chaptered file and get one file per chapter back.

1. Select **Split by Chapter** in the sidebar
2. Drop in a chaptered audiobook (M4B, M4A, or any file that carries chapter markers)
3. Its chapters show up in a list so you can check them
4. Choose an output format, or keep the original
5. Click **Split**

![Split by Chapter in Picmal: an audiobook's four chapters listed with start times and lengths, and the files it split them into](/images/docs/split_by_chapter.png)

Each chapter is written out as `Book - 01 - Chapter Title`, tagged with its chapter title and track number so it stays in order in your library. Leave the format on the original to split without re-encoding, or pick another format (say MP3) to convert as it splits.

A file with no chapter markers can't be split. Picmal tells you and skips it.

## Use it from Shortcuts and the terminal

- In Shortcuts, the **Merge Audio** action takes audio files in and returns the finished track. See [Integrations](/docs/integrations#shortcuts-app).
- From the terminal, use `picmal-cli merge-audio` to join files and `picmal-cli split-chapters` to split an audiobook. See [Command line](/docs/cli#merge-audio).

## Converting and compressing audio

To change the format of audio files, see the [audio converter for Mac](/audio-converter-mac). To make them smaller, the [compression presets](/docs/compressing-files#audio-presets) cover the audio levels.
