How to automatically add chapters to your podcast
A frequent request from listeners of my Breaking Change podcast has been for chapter support. At one point, I tried to manually incorporate this into my (extremely light) editing workflow, but it was fiddly and error-prone to do manually.
That is, until yesterday, when I had the thought, "what if I had a script that could detect each time the audio switched from mono to stereo?"
See, like most podcasts, I record my voice in mono, but the music jingles (or "stingers") are all in stereo. And because each mono segment is punctuated by a stereo stinger, the resulting timestamps would indicate exactly where the chapter markers ought to go.
So, an hour later, some new shovelware was born! I call it autochapter, and you can install it with homebrew:
brew install searlsco/tap/autochapter
Once installed, just pass autochapter
your chapter names as a text file or a list of flags, like this:
autochapter \
-s Intro \
-s Follow-up \
-s "Aaron's Pun" \
-s News \
-s Recommendations \
-s Mailbag \
-s Outro \
v44.mp3
And you'll get a remuxed version of the audio file (e.g. v44-chapters.mp3
), as well as textual readout of the chapters, ready to be pasted into your YouTube description:
Chapters:
0:00 Intro
24:11 Follow-up
53:45 Aaron's Pun
56:14 News
1:49:03 Recommendations
2:03:52 Mailbag
2:33:11 Outro
As you might surmise from the examples, v44 of the show is the first version to ship with chapters.
And that's about all there is to it. I wrote autochapter
with Codex CLI in one shot, and it's a great example of a project I would have never bothered building if it weren't for a coding agent to do the gruntwork for me. That makes autochapter
Certified Shovelware.