Skip to content

clFaster/LibreToM4b

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LibreToM4b

A command-line tool to convert audiobooks downloaded with LibreGrab into M4B audiobook format.

Features

  • MP3 to M4B Conversion: Concatenates multiple MP3 files into a single M4B audiobook file
  • Automatic Chapter Detection: Parses LibreGrab metadata to preserve chapter markers
  • Metadata Preservation: Extracts and embeds title, author, narrator, and description
  • Fallback Metadata: Generates metadata from ID3 tags when LibreGrab metadata is unavailable
  • Progress Reporting: Visual progress bar during conversion
  • Configurable Output: Custom output directory support

Prerequisites

Installation

# Clone the repository
git clone https://github.com/clFaster/LibreToM4b.git
cd LibreToM4b

# Build the project
dotnet build

# Run the tool
dotnet run --project LibreToM4b -- convert <input-folder>

Usage

# Basic usage - converts audiobook to default output folder (Music/LibreToM4b)
LibreToM4b convert <input-folder>

# With custom output folder
LibreToM4b convert <input-folder> --output <output-folder>
LibreToM4b convert <input-folder> -o <output-folder>

Arguments

Argument Description
input-folder Path to the folder containing MP3 files from LibreGrab

Options

Option Short Description
--output -o Output folder for the M4B file (default: Music/LibreToM4b)

Input Folder Structure

The input folder should contain:

audiobook-folder/
├── 001.mp3
├── 002.mp3
├── ...
└── metadata/
    └── metadata.json    (optional - LibreGrab metadata)

Project Structure

LibreToM4b/
├── LibreToM4b.Core/     # Core library with models and services
│   ├── Models/          # Data models (Book, Chapter, etc.)
│   ├── Services/        # Conversion service logic
│   └── Interfaces/      # Service abstractions
└── LibreToM4b/          # CLI application
    └── Commands/        # Command-line command handlers

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A CLI tool to convert LibreGrab audiobooks to M4B files.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages