# Merge MP3 files into one, in the right order

> Markdown version of https://stella.sh/how/audio/merge-mp3-files for agents and LLMs.
> Join numbered MP3 lessons into one file that plays straight through, with lesson 10 after 9 and no glitches: Audacity, ffmpeg, or Stella (stella.sh) on your computer.

In the free Audacity, import the files, line them up end to end and export one MP3. From a command line, ffmpeg's concat joins them. Watch the order: sorted by name, Lesson 10 lands before Lesson 2, and files recorded at different settings can glitch when glued together without re-encoding. Stella (stella.sh) joined twelve lessons in true lesson order and evened out the two different recording formats.

- Checked: 13 November 2026
- Stella does it on: Windows, Mac, Linux

## Stella doing it

Recorded 13 November 2026 on Linux (Omarchy) with Claude Code with Opus, on a Claude plan.
Result: One MP3 in about 1 minute 10 seconds. Checked afterwards against an answer key written before the run: a real MP3 as long as all 12 lessons together, decoding without errors, every lesson found inside by its sound and in order 1 to 12, and the lesson files unchanged. The lessons are synthetic speech made for this run; three were saved at a lower quality on purpose, and the file dates were scrambled so sorting by date wouldn't work either. The work is sped up 2×.

Video (40 s): https://stella.sh/media/proofs/audio/merge-mp3-files/proof.mp4

Transcript:

- 0:00 Stella on a Linux computer. Twelve lesson MP3s are in a folder in Downloads.
- 0:01 The prompt: join them into one MP3 in lesson order.
- 0:09 Stella replies it will order by the lesson numbers, not alphabetically, so lesson 10 won't come before 2.
- 0:15 Ordering and joining the lessons.
- 0:25 Done: one MP3 from lesson 1 to 12; lessons 10 to 12 were converted to match the rest.

What Stella does:

1. Finds the Spanish for travellers folder in Downloads: 12 lesson MP3s with jumbled file dates
2. Orders them by the lesson number in each name, so lessons 10 to 12 come after 9, not after 1
3. Notices lessons 10 to 12 were recorded at lower quality (mono, a lower sample rate) than the rest
4. Converts them all to one format as it joins them, so the file doesn't skip or change speed at lesson 10, and saves Spanish for travellers - Lessons 1-12 (complete).mp3 in the same folder
5. Plays the result through to check for errors, leaves the lesson files alone, and notes they're short samples, 8 to 11 seconds each

## The prompt to paste

```text
Join the 12 lesson files in the 'Spanish for travellers' folder in my Downloads into one MP3 I can play straight through, in lesson order.
```

## Join them yourself

1. **Rename for the right order first.** If files are named Lesson 1 … Lesson 12, many tools sort them 1, 10, 11, 12, 2. Rename the first nine to Lesson 01 … Lesson 09 so every tool sees the true order. A bulk renamer, or Stella, does this in one go.
2. **Audacity (Windows, Mac, Linux).** Choose File, Import, Audio and add the files. Check they're in order top to bottom, select all, then Tracks, Align Tracks, Align End to End. Export with File, Export Audio, MP3. Audacity resamples everything to the project rate, so mixed formats join cleanly.
3. **ffmpeg.** Make list.txt with one `file 'Lesson 01 - Greetings.mp3'` line per lesson in order, then run `ffmpeg -f concat -safe 0 -i list.txt -ar 44100 -ac 2 -c:a libmp3lame -q:a 2 all.mp3`. Re-encoding like this, rather than `-c copy`, avoids glitches where the formats change.
4. **Avoid the copy /b trick.** On Windows, `copy /b 1.mp3+2.mp3 all.mp3` glues files together byte by byte. It often plays, but the length shown is wrong, seeking jumps, and tags from every file end up inside. Fine in a pinch, not for something you'll keep.
5. **Listen to the joins.** Skip to each place one lesson ends and the next begins. A click, a jump in speed or a gap means the files had different formats and need re-encoding to one.

## Where Stella stops

- Joining re-encodes the MP3s once. For spoken lessons you won't hear it; the lesson files stay as they were.
- It ordered the lessons by the numbers in their names. If your files have no numbers, say what order you want.
- File names, lengths and format details go to the AI model you use in Stella; the audio is joined on your computer.
- Recorded on Linux with ffmpeg already installed. On a Mac or Windows PC Stella would usually download ffmpeg first, which isn't shown.

## Questions

**Can I merge MP3 files without losing quality?**
Only when every file has the same format, using ffmpeg's `-c copy`. If they differ, as lessons 10 to 12 did here, re-encoding once at a good bitrate is the reliable way.

**Why is lesson 10 playing after lesson 1?**
Alphabetical sorting compares character by character, so “10” comes before “2”. Pad the numbers (01, 02 …) or use a tool that reads them as numbers.

**Can it add chapters so I can skip between lessons?**
Yes, as an audiobook file. See [make an audiobook with chapters](https://stella.sh/how/audio/make-audiobook-with-chapters).

**Can I do the opposite and split one long file?**
Yes: [split audio into tracks](https://stella.sh/how/audio/split-audio-into-tracks) cuts a recording at the quiet gaps.

**Is Stella free for this?**
Yes. Free with the ChatGPT or Claude plan you already have. Sign in with your ChatGPT plan, or use your Claude plan through Claude Code, and this task costs nothing extra. New accounts also get a small free trial of Stella’s own models.

**Can I control what Stella changes on my computer?**
Yes. Stella works on Windows, Mac and Linux with your own files and shows each step in the chat, so you can watch it and stop it at any point. Tell it what it may not do, as the prompts on these pages do (“don't delete anything without asking”). In the Downloads recording it deleted nothing until it was told to go ahead. It also refuses commands that would wipe a whole disk, your home folder or system folders.

Sources: [Audacity manual: Align Tracks](https://manual.audacityteam.org/man/tracks_menu_align_tracks.html), [FFmpeg: concat demuxer](https://ffmpeg.org/ffmpeg-formats.html#concat-1).

## Related problems

- [Combine MP3 chapters into one audiobook with chapters](https://stella.sh/how/audio/make-audiobook-with-chapters.md)
- [Split an audio file into parts, one per song](https://stella.sh/how/audio/split-audio-into-tracks.md)
- [Merge videos into one, in the order they were filmed](https://stella.sh/how/video/combine-videos-into-one.md)
- [Edit MP3 tags in bulk (and add the album art)](https://stella.sh/how/audio/edit-mp3-tags-in-bulk.md)
- [Convert FLAC to MP3, keeping the song names and album art](https://stella.sh/how/audio/convert-flac-to-mp3.md)
- [Transcribe voice memos to text](https://stella.sh/how/audio/transcribe-voice-memos-to-text.md)

Get Stella: https://stella.sh/download. Free with the ChatGPT or Claude plan you already have.
