HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
sandreas
m4b-tool
PHP2018–2025
sandreas / m4b-tool

m4b-tool

m4b-tool is a command line utility to merge, split and chapterize audiobook files such as mp3, ogg, flac, m4a or m4b

3Distinct people
30Mentions
0Explicit recommenders
1.6KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

m4b-tool is a command line utility to merge, split and chapterize audiobook files such as mp3, ogg, flac, m4a or m4b

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year30 dated mentions

Observed mentions: 2018-06-20 18:04:29 UTC to 2025-08-10 11:12:32 UTC.

024682018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 3 mentions; 3 submissions, 0 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 6 mentions; 4 submissions, 2 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 8 mentions; 0 submissions, 8 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC330
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC642
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC202
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC303
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC808
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC505
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC202
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC101

What Hacker News says

30 sources
I use "kokoro-tts" CLI, which has better chunking/splitting. https://github.com/nazdridoy/kokoro-tts It generates a directory of audio files, along with a metadata file for ebook chapters You have to use m4b-tool to stitch the audio files together into an audiobook and include the chapter metadata, but it works great: https://github.com/sandreas/m4b-tool I've been meaning to write a post on this workflow because it's incredibly useful
In Abogen – Generate audiobooks from EPUBs, PDFs and text
It depends. If its something like my personal todo list pure-todo [1], I tend to write it down in less than a week without using any frameworks and hardly ever touch it again. If it's something like m4b-tool[2] or tone [3], that has to be maintained for a while, I tend to use battle proven libraries or frameworks (in this case Symfony, because it is an older project and Spectre.Console and atldotnet for tone). I prefer libraries over frameworks though, less background magic. However, I have the feeling that you also find something in this comment that you don't like - maybe the shameless advertisement of my FOSS projects ;-) 1: https://github.com/sandreas/pure-todo 2: https://github.com/sandreas/m4b-tool 3: https://github.com/sandreas/tone
In It's not just you, Next.js is getting harder to use
I created a few audio tinkering utilities, e.g. - m4b-tool[1], an audio book utility - tone[2], an audio tagger mainly for myself because the existing tools did not fit my needs or weren't FOSS. I did never think so many people would be interested. By the end of the year I plan to make my first donation of my github sponsoring income to a charity project. Currently I'm working on `pure-todo`, a todo list with sqlite, REST API and JWT based user management. The first approach was to publish it with a single index.php file without ANY dependency, but this is something I have to think over again. Maintenance will be a nightmare :-) Next FOSS project I will work on is `Tone Audio Player`, a fully cross platform (Linux, Windows, macOS, Android, iOS, WASM) audio player app, that fully supports background playback without stuttering. But C# / A
Read the rest
valonia UI is just not there yet, I'm currently switching to flutter. [1]: https://github.com/sandreas/m4b-tool [2]: https://github.com/sandreas/tone
In Ask HN: What apps have you created for your own use?
The iPod is such an underestimated device... I'm still searching for a comparable replacement of my iPod Nano 6G / 7G. The thing is: Even modern Android players throwing tons of features at it, can't really compete with the user experience. Most people only listen to music, so they will never miss the awesome audio book and podcast integration of the whole iPod line (besides the good music ability). The iPod Nano is many years old and still: - Is REALLY small - Already has bluetooth low energy - Supports cable headphone remote controls (EarPods have questionable audio quality, but the remote works absolutely flawless) - Can play a variety of formats for a really long time with a 220mah battery - Supports audio book single files with chapters (m4b format) I modded many iPod Classics with Rockbox and iFlash Quads, but the origina
Read the rest
l interface is hard to beat in terms of audio books. Unfortunately repairing iPod Nanos is really tough compared to the iPod classic 2009 (even this device already supports the cable headphone controls). Currenlty I'm trying to mod an iPod Nano 7G to have a 600mah battery by milling out the backplate, keeping the original BMS and placing an iPod Mini Battery (which fits perfectly in size, when the backplate is milled out). This way I hope I will have the only iPod Nano 7G with interchangeable batteries ;) The best alternative I found so far is the Unihertz Jelly 2(e) Phone with selfhosted Audiobookshelf and different player / sync apps, but the experience is nowhere near the iPod... It's bigger, way thicker and the headphone controls are "unstable". Not to talk about the app crashes, unsupported android background service playing and missing / non-working chapter controls. Disclaimer: I'm the developer of m4b-tool[1] and tone[2], so I know what I'm talking about :-) [1]: https://github.com/sandreas/m4b-tool [2]: https://github.com/sandreas/tone
In iPods now considered vintage tech– so of course sold out at Urban Outfitters
hehe, that's how I made `m4b-tool`[1] - a command line tool written in PHP (!) using external tools to merge audio files to a single iTunes compatible m4b file. It started as one single simple script and now has grown into a maintenance hell of a thing, but I still use it on a weekly basis :-) Unfortunately atm I cannot even afford the time to redirect the github sponsoring income to charities[2], but by the end of the year, this might change. [1]: https://github.com/sandreas/m4b-tool [2]: https://pilabor.com/projects/github-sponsors/
In It's okay to make something nobody wants
There is also https://www.vorleser.net/ for german users. In case you want to take it a step further, you could convert the `mp3`s to `m4b` format (one file per audio book), which internally uses an `mp4` container aac codec, chapters for separation and extended metadata. It's well supported on iTunes / iPods / iPhone as well as Jellyfin, Kodi, Plex, etc. and the files have lower bitrates than mp3 providing similar quality. (see https://github.com/seanap/Plex-Audiobook-Guide#optional-auto...) There is also https://www.thorsten-voice.de/en/motivation-vision-english/ (see my comment below), if you would like to generate your own german audio books via TTS and AI. A self hosted audio book server is audiobookshelf (https://www.audiobookshelf.org/) which comes with an app that is open souce and supports offline listening. Tools to convert `mp3
Read the rest
` to `m4b` and edit metadata: - AudioBookConverter - https://github.com/yermak/AudioBookConverter (GUI, cross platform) - Chapter and Verse - http://lodensoftware.com/chapter-and-verse/ - m4b-tool - https://github.com/sandreas/m4b-tool (command line, cross platform) - tone - https://github.com/sandreas/tone (command line, cross platform) Note: I'm the author of the last two tools.
In Free Public Domain Audiobooks
Hey, I'm the author of m4b-tool[1] and tone[2]. The most important thing I learned about software development, is that the best software has a meaning to yourself and that you should use it yourself on a regular basis. m4b-tool is a tool to merge multiple audio files into the m4b audio book format. I hacked it together in a weekend in the language I knew best (PHP) and that probably was the worst for the job. All because there were no tools, that fitted my needs. After the first improvements I said to my self: Why not open source it, even if it is in a pretty crappy state? And the feedback was surprisingly good for a hackish script. And I learned A LOT from the community (e.g. how to implement something like multithreading in PHP or the simple fact that `cd -` goes back one directory in history). Another important thing I learned is, that
Read the rest
early shipping is good, but automatic deployment and versioning is nearly as important. Thats why I decided to invest some time and simply release `tone` based on git tags with github actions... that was a very good decision so far. So to conclude: Build something, that you use (and want to improve) yourself Ship early Go for auto-deployment / CI as soon as possible Do some "marketing" for high quality feedback (e.g. on hackernews) Cover your ass with automatic tests as soon as possible [1]: https://github.com/sandreas/m4b-tool [2]: https://github.com/sandreas/tone
In Ask HN: HN people who write meaningful software, how did you learn to program?
Sure, why not... so my pet project is basically for managing my audio files. There already is navidrome[1] and audiobookshelf[2]. They work great so far, but some minor details are kind of annoying... The first milestone will be providing a basic API for my files - the main components of this will be the database (postgres), the API (C# + swashbuckle + JsonApiDotNet + Websockets) and the file indexer (C# HostedService). All parts except the file indexer are pretty much done, but it is a critical component, because it has to be as fast and correct as possible. There are multiple approaches to index files... A best case scenario would be an "import" / "move" of files into a library or repository. That way you would be always up to date and always perfectly sorted. Unfortunately, an import would also be a big amount of work, because analysin
Read the rest
g the files and getting metadata from online sources is... lets say a huge project. And NOT getting metadata would mean, that I cannot move the files while another app manages the metadata. So I took another path - scanning an existing and well tagged library (that I manage with beets[3] for music and m4b-tool[4] / tone[5] for audio books). My current Idea is to have a file indexer that: - can run on multiple sources - runs one full index scan after starting the app - registers a filesystem watcher for every file source and reacts to events - To ensure, no filesource is blocking others, each source is processed by a fixed batch size and then move on the the next file source - If sources are modified (added, changed, deleted), there is a decision, what to do with already running indexers and registered file watchers (added just go to the queue, changed and deleted cancel already running tasks only for this source) - All files are hashed (content only) to ensure, a change of metadata or tags will not change the hash, and if a file is moved, it will recognize this and update instead of delete and insert The database will contain Tag-Values for every possible value. E.g. File.Location music/album/AC_DC/Back in Black/01 - Hells Bells.mp3 FileTag.Type Artist Tag.Value AC/DC That way I can add a fulltext index on the Tags.Value field containing a searchable value while maintaining the FileTag.Type for recommendations. Let's say I search for `AC/DC`, it will provide an auto-complete for all FileTags.Type values, that show a match + a generic one for searching ALL values: Artist: AC/DC FullText: AC/DC Searching for 2010 will show: Released: 2010 Title: 2010 FullText: 2010 because it contains matches in Releasedate and title. There may be a lot to optimize, but I think my current plan goes pretty well. Let me know what you think about this approach :-) [1]: https://www.navidrome.org/ [2]: https://www.audiobookshelf.org/ [3]: https://beets.io/ [4]: https://github.com/sandreas/m4b-tool/ [5]: https://github.com/sandreas/tone/
In Ask HN: What interesting problems are you working on?
Usually, for electronic devices I start with the Open Source Projects recommendations or first class support items... They usually have good hardware quality e.g. for a smartphone, I look at lineage devices first and then check out reviews for these, that work for me from looking at the specs. For your purpose, there is no such audio player, I know of. The best devices I know atm are: - iPod Nano 7th gen 16GB - Pro: Size, Bluetooth, UI - Con: Battery, Storage, Formats, req. iTunes, no Wifi / NFC, No Upgrades - iPod classic (mod with iFlash Quad and 2200mah battery + iKokkia Bluetooth) - Pro: Storage, Battery, UI, Hackable (kind of) - Con: Size, Formats, req. Itunes, No native Bluetooth/Wifi/NFC, No upgrades - Maybe you should think of RockBox to have more freedom - LG G5 H850 (optional with Bang & Olufsen Hifi-Pl
Read the rest
us module) + Audiobookshelf + Substreamer - Pro: Formats, Battery, Storage, Bluetooth/Wifi/NFC, Hackable - Con: Size, UI (I did not find a Server/App nearly as good as iPod) Let me cite my comment from https://news.ycombinator.com/item?id=32042780: I use m4b-tool[1], tone[2] and audiobookshelf[3] together with an LG G5 H850 smartphone[8] with Bang & Olufsen Hifi-Plus Module for Audio Only and I am pretty happy with this config. For Music I use Navidrome[5] and Substreamer App[7]. Maybe I'll try out Jellyfin[4] or maybe Plex[6], but I really don't wanna go closed source. I also thought about writing something self hosted in C# to have ONE solution for audiobooks, podcasts and music and started a small private project, but this will take a while until it is ready to release something... You may ask: Why an LG G5 H850? Well, its relatively small and cheap (about 50 - 80 bucks used) it has an audio Jack, USB-C, you can change the battery, it can hold up to 2TB microSD storage, has an HiFi Plus module for audio enthusiasts and a descent screen. Besides that it can run lineage os... Note: I'm the author of the first two projects :-) [1]: https://github.com/sandreas/m4b-tool [2]: https://github.com/sandreas/tone [3]: https://github.com/advplyr/audiobookshelf [4]: https://jellyfin.org/ [5]: https://www.navidrome.org/ [6]: https://www.plex.tv [7]: https://substreamerapp.com/ [8]: https://en.wikipedia.org/wiki/LG_G5
In Ask HN: How do you search for products / apps given a list of requirements?
I use m4b-tool[1], tone[2] and audiobookshelf[3] together with an LG G5 H850 smartphone[8] with Bang & Olufsen Hifi-Plus Module for Audio Only and I am pretty happy with this config. For Music I use Navidrome[5] and Substreamer App[7]. Maybe I'll try out Jellyfin[4] or maybe Plex[6], but I really don't wanna go closed source. I also thought about writing something self hosted in C# to have ONE solution for audiobooks, podcasts and music and started a small private project, but this will take a while until it is ready to release something... You may ask: Why an LG G5 H850? Well, its relatively small and cheap (about 50 - 80 bucks used) it has an audio Jack, USB-C, you can change the battery, it can hold up to 2TB microSD storage, has an HiFi Plus module for audio enthusiasts and a descent screen. Besides that it can run lineage os... Note:
Read the rest
In Ask HN: Is there a Calibre equivalent for Audio books?
> Correction, ID3 is a good start. ;) Id3v2 is ... much more. You're absolutely correct :-) > Unrelated, I like your project! Nice! Thanks for your feedback, you're welcome... > (I'm not entirely sure what your tool does that isn't done by the standard tagging tools id3, id3tool, id3v2... but that's NOT a criticism. I wrote my own multithreaded-resumable-forensic `dd` and a homegrown replacement for `tar` for instance) Not much really, it is just a tool that supports multiple platforms and multiple metadataformats all in one static binary AND supports chapters... it may be a bit more versatile and easy too use than existing tools. But that is opinionated. > wanted something HIGH performance for tunable and batchable splits, silence detection, merges, as well as automatic clustering (!). Those split/merge features, that, I'm guessing you'
Read the rest
re planning on implement by requiring ffmpeg _AND_ using another library just to wrap it? I'd do in native code and, as a result, performance would be orders of magnitude better. Yes, I plan to use `ffmpeg` for the first part, but also include `fdkaac` and maybe `sox` or other audio specialist tools to provide better audio. My plan is also to integrate a dependency downloader, that does not want you to install the dependencies yourself, but does everything for you. I'm the author of `m4b-tool`[1], which has also split, merge and silence detection, so I have a little experience in exactly this topic you are talking about (tone is planed as long term successor of m4b-tool, but this will take time). I will use a library called CliWrap[4] to integrate shell execution though, but do it multithreaded to provide more performance. > I don't use windows (at least, I'm not willing to use windows for any 'pro bono' work ;-) ) but if you were to write your tool in C or C++ instead, or perhaps... have a common API layer of sorts... If I understood this correctly: C# is not Windows-Only any more, and it is pretty fast on all platforms. It provides Ahead of Time Compilation and a so called self-contained binaries working without any C# runtime or VM... using github actions I provide a full featured monolitic executable binary, but I could also provide a library. C# is even capable of and using unmanaged code, writing drivers and embedded stuff, like RPi... I think it is not a bad language to start such a project, but at least the best I know well enough ;) > and actually enjoy, helping you out by "gifting" some fast and MUCH leaner solutions for any and all of the audio processing work It would really be nice to find some collaborators, thank you. There are some C# audio processing libraries out there (like NAudio[2] or cscore[3]), but currently windows only or pretty complex. We'll see... :-) This was very helpful. Thanks again. [1]: https://github.com/sandreas/m4b-tool [2]: https://github.com/naudio/NAudio [3]: https://github.com/filoe/cscore [4]: https://github.com/Tyrrrz/CliWrap
In Show HN: Tone v0.0.4 – now hackable command line audio tagger, any feedback?
My audio workflow is basically command line / self-hosted: - beets [1] for music tagging - m4b-tool [2] and tone [3] for audio books merging and tagging (Note: I'm the author of these) - iTunes and an iPod Nano 7g and iPod classic 2009 to listen "offline" (although audiobookshelf supports offline downloads) - self-hosted navidrome [4] + substreamer[5] for music and audiobookshelf [6] for audio books on my android / ios devices Everything with docker containers without further dependencies. I must say, that this works pretty good so far and I never missed something really bad on id3v2.3 or mp4/m4b native tags. [1]: https://beets.io/ [2]: https://github.com/sandreas/m4b-tool/ [3]: https://github.com/sandreas/tone [4]: https://github.com/navidrome/navidrome [5]: https://substreamerapp.com/ [6]: https://www.audiobookshelf.org/
In What ID3v2 could have been

Showing the 15 most recent of 30 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.