<commit_before># m4b-tool
m4b-tool is a is a wrapper for ffmpeg and mp4v2 to merge, split or and manipulate m4b audiobook files with chapters


## Features

- Merge a set of audio files (e.g. MP3 or AAC) into a single m4b file
- Split a single m4b-File into several output files by chapters
- Add chapters to an existing m4b-File via musicbrainz and silence detection

## Requirements

m4b-tool is written in PHP (Yes, you read it correctly!) and uses ffmpeg and mp4v2 to perform conversions. Therefore you will need the following tools in your $PATH:

- PHP >= 7.0 with mbstring extension enabled
- ffmpeg
- mp4v2


### Installation

Download the built application from [releases](https://github.com/sandreas/m4b-tool/releases) and install the runtime dependencies (instructions follow).  Or, [build from source](#building-from-source).

#### General Notes

If you think there is an issue with m4b-tool, first head over to the [Known Issues](#known-issues).

#### MacOS
On MacOS you can use brew to install the most requirements:


Install ffmpeg
```
brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-libass --with-libquvi --with-libvorbis --with-libvpx --with-opus --with-x265
```

Install mp4v2

```
brew install mp4v2
```


Install PHP >= 7.0

Follow the instructions on https://php-osx.liip.ch



#### Ubuntu
<commit_msg>improved deprecated brew ffmpeg install parameters<commit_after># m4b-tool
m4b-tool is a is a wrapper for ffmpeg and mp4v2 to merge, split or and manipulate m4b audiobook files with chapters


## Features

- Merge a set of audio files (e.g. MP3 or AAC) into a single m4b file
- Split a single m4b-File into several output files by chapters
- Add chapters to an existing m4b-File via musicbrainz and silence detection

## Requirements

m4b-tool is written in PHP (Yes, you read it correctly!) and uses ffmpeg and mp4v2 to perform conversions. Therefore you will need the following tools in your $PATH:

- PHP >= 7.0 with mbstring extension enabled
- ffmpeg
- mp4v2


### Installation

Download the built application from [releases](https://github.com/sandreas/m4b-tool/releases) and install the runtime dependencies (instructions follow).  Or, [build from source](#building-from-source).

#### General Notes

If you think there is an issue with m4b-tool, first head over to the [Known Issues](#known-issues).

#### MacOS
On MacOS you can use brew to install the most requirements:


Install ffmpeg
```
brew install ffmpeg --with-fdk-aac --with-sdl2 --with-freetype --with-libass --with-libquvi --with-libvorbis --with-libvpx --with-opus --with-x265
```

Install mp4v2

```
brew install mp4v2
```


Install PHP >= 7.0

Follow the instructions on https://php-osx.liip.ch



#### Ubuntu

{'fraction_non_alphanumeric': 0.09666788722079825, 'fraction_numerical': 0.020139143170999633, 'mean_word_length': 3.8785714285714286, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '33011', 'n_tokens_mistral': 912, 'n_tokens_neox': 844, 'n_words': 351}