m4b-tool
は、チャプター付きのオーディオブック ファイルをマージ、分割、または操作するためのffmpeg
およびmp4v2
のラッパーです。 m4b-tool
m4b ファイルを処理するように設計されていますが、mp3、aac、ogg、alac、flac など、ほぼすべてのオーディオ形式がサポートされている必要があります。
私のプロジェクトを使用していて役立つと思われる場合は、私をサポートするために寄付を検討してください。私はそのお金を他のオープンソース プロジェクトのサポートや慈善目的に使用する予定です。ありがとう!
>= 25.00$
月額>= 25.00$
以上を寄付してくださったスポンサーの皆様に心より感謝いたします。
名前 | 額 |
---|---|
ヌミニット | 25.00ドル |
Nix を入手して Flakes が有効になっていることを確認してください。
nix run github:sandreas/m4b-tool
またはnix run github:sandreas/m4b-tool#m4b-tool-libfdk
nix build github:sandreas/m4b-tool
またはnix build github:sandreas/m4b-tool#m4b-tool-libfdk
./result/bin/m4b-tool
にあります。nix develop
composer2nix --executable --composition=composer.nix
を実行して .nix ファイルを更新します。 実験を開始しましたが、現在は初期のアルファ レベルに達しており、試すことができます。コマンド ライン ツールはC#
で書かれており、完全にオープン ソースであり、 tone
と呼ばれます。すでにかなり優れた機能セットが備わっているので、試してみたい場合は、次のとおりです。
https://github.com/sandreas/tone
この発表は、 m4b-tool
が非推奨になる、または間もなく非推奨になるということを意味するものではありません。 m4b-tool
の開発は (少なくともtone にm4b-tool
と同様の機能セットが搭載されるまで) 続けられます。制限がある可能性のある機能の代替ツールを用意するためです。
ぜひお楽しみください。フィードバックをお待ちしています。
残念ながら、現在かなり忙しいので、 m4b-tool 0.4.2
は非常に古いものです。完全なドキュメントがなければ新しいバージョンをリリースする予定はないため、バグ修正が行われた最新のプレリリースのみが存在します。すでにかなり安定しているため、 v0.4.2
でバグが発生している場合は、最新のプレリリースがすでに修正されている場合は、それを試してください。
ありがとう、サンドレアス
https://pilab.com
merge
。split
、 flac
エンコードされたアルバムを cue シート経由で単一のトラックに分割したりできます。chapters
を追加または調整しますディレクトリdata/my-audio-book
内のすべてのオーディオ ファイルをファイルdata/merged.m4b
にmerge
(タグは保持され、 data/my-audio-book/cover.jpg
とdata/my-audio-book/description.txt
が埋め込まれます) 、利用可能な場合)
m4b-tool merge "data/my-audio-book/" --output-file="data/merged.m4b"
data/my-audio-book_splitted/
で 1 つの大きな m4b ファイルを章ごとに複数の mp3 ファイルにsplit
(タグは保持され、m4b にカバーが含まれている場合はdata/my-audio-book_splitted/cover.jpg
が作成されます)
m4b-tool split --audio-format mp3 --audio-bitrate 96k --audio-channels 1 --audio-samplerate 22050 "data/my-audio-book.m4b"
chapters
無音検出によって m4b の既存のチャプタを調整することができます
m4b-tool chapters --adjust-by-silence -o "data/destination-with-adjusted-chapters.m4b" "data/source-with-misplaced-chapters.m4b"
m4b-tool
の最もよく使用されるサブコマンドはmerge
のようですので、ベストプラクティスについて話しましょう...
残念ながら、 m4b-tool
は多くの依存関係があります。ワンライナーだけでなく、最高の品質とタグ付けのサポートを取得したい場合は、追加のオプションを使用して多くの依存関係を手動でコンパイルする必要があります。だからこそ、Docker イメージを見てみる必要があります。Docker イメージには、最高のオーディオ品質、最高のタグ付けサポート、簡単なインストールというあらゆる機能が備わっており、ほとんど欠点がありません。
注: Windows を使用している場合は、動作させるのが難しい場合があります。
オーディオブックを結合するときは、オーディオブックを準備する必要があります。単一のオーディオブックのみを結合する場合でも、次のディレクトリ構造が非常に役立ちます。
input/<main genre>/<author>/<title>
またはシリーズの場合
input/<main genre>/<author>/<series>/<series-part> - <title>
例:
input/Fantasy/J.K. Rowling/Quidditch Through the Ages/
input/Fantasy/J.K. Rowling/Harry Potter/1 - Harry Potter and the Philosopher's Stone/
注: オーディオブックのタイトルに
/
などの無効なパス文字が含まれている場合は、それらをダッシュ-
に置き換えてください。
さて、オーディオブックにはほとんどの場合、表紙と説明が必要になるため、次のファイルをメイン ディレクトリに追加する必要があります。
cover.jpg
(またはcover.jpeg
またはcover.png
)description.txt
(コンテンツには必ずUTF-8
テキスト ファイル エンコードを使用してください)例:
input/Fantasy/J.K. Rowling/Quidditch Through the Ages/cover.jpg
input/Fantasy/J.K. Rowling/Quidditch Through the Ages/description.txt
注:
m4b-tool
これらのファイルを自動的に検索して埋め込みますが、ファイルが存在しない場合でも失敗しません。
章は、オーディオブックのウェイポイントを追加するのに適しています。これらは、最後の位置を記憶し、エクスペリエンス全体を向上させるのに役立ちます。
チャプターを手動で調整したい場合は、次の内容 ( <chapter-start>
<chapter-title>
) を含むchapters.txt
( cover.jpg
と同じ場所) を追加できます。
00:00:00.000 Intro
00:04:19.153 This is
00:09:24.078 A way to add
00:14:34.500 Chapters manually
入力ファイルがタグ付けされている場合、これらのタグはtitle
ごとに章のメタデータを作成するために使用されます。したがって、トラックtitle
として有効なチャプタ名を入力ファイルにタグ付けすると、有効なチャプタ名を持つきれいなm4b
ファイルが作成されます。
m4b-tool
v.0.4.0以降のもう 1 つの優れた機能は--max-chapter-length
パラメーターです。多くの場合、個々の入力ファイルが大きすぎるため、章の長さが非常に長くなります。これは、特定のポイントにジャンプしたい場合、前後に数回傾けるだけではなく、巻き戻しまたは早送りしてボタンを長時間押し続ける必要があるため、煩わしい場合があります。サブチャプタを自動的に追加するには、次のように指定します。
--max-chapter-length=300,900
これにより、 m4b-tool
発生します。
サブチャプタにはオリジナルと同じ名前が付けられ、追加のインデックスが付けられます。これは、実際の名前を保持しながら、長すぎる章を持たないための優れた方法です。
iPod を所有している場合、iPod は 32 ビットのサンプリング レートしかサポートしていないため、オーディオブックが長すぎると問題が発生する可能性があります。オーディオブックが 22050Hz のサンプリング レートで 27 時間を超える場合は、 --adjust-for-ipod
を指定すると、オーディオブックが自動的にダウンサンプリングされ、品質は低下しますが、少なくとも古き良き iPod では機能します...
m4b-tool
--jobs
パラメーター (例: --jobs=2
) を使用して複数の変換タスクを並行してサポートします。複数のファイルを変換する必要がある場合 (一般的なケースです)、 --jobs=2
パラメータを指定することでマージ速度がほぼ 2 倍になります (クアッド コア システムなどを使用している場合は--jobs=4
を使用して 4 倍になります)。 。)。システムのコア数よりも大きい数を指定しないでください。マージが遅くなります。
注: すべてのコアで変換を実行すると、CPU 使用率がほぼ 100% になり、システムのパフォーマンスが低下する可能性があります。
--batch-pattern
機能を使用するm4b-tool v.0.4.0
では、 --batch-pattern
機能が追加されました。既存のディレクトリ構造からタグを作成できるため、複数のオーディオブックを一度にバッチ変換するだけでなく、1 つのオーディオブックだけを変換することもできます。
ヒント:
--batch-pattern
を使用する場合、output-file
パラメータはディレクトリである必要があります。
複数の--batch-pattern
パラメーターもサポートされていますが、最初に一致したものが最初に使用されます。したがって、上記のようにディレクトリ構造を作成した場合、 input/Fantasy/Harry Potter/1 - Harry Potter and the Philosopher's Stone/
をoutput/Fantasy/Harry Potter/1 - Harry Potter and the Philosopher's Stone.m4b
次のようになります:
m4b-tool merge -v --jobs=2 --output-file="output/" --max-chapter-length=300,900 --adjust-for-ipod --batch-pattern="input/%g/%a/%s/%p - %n/" --batch-pattern="input/%g/%a/%n/" "input/"
--batch-pattern
モードでは、既存のファイルはデフォルトでスキップされます
Docker イメージを使用して上記の手順を実行した場合、またはすべての依存関係をインストールしてコンパイルした場合は、次の結果が得られるはずです。
libfdk_aac
エンコーダーを使用した最高品質のオーディオ--batch-pattern
使用法からのgenre
、 author
、 title
、 sorttitle
などの有効なタグがあります。cover.jpg
(またはcover.jpeg
またはcover.png
) とdescription.txt
メイン ディレクトリに存在する場合、 cover
、 description
、およびlongdesc
が埋め込まれます。m4b-tool
で docker を使用するには、まず次のことを行う必要があります。
pull
(推奨)Dockerfile
build
公式のDocker イメージは DockerHub で入手できます。これらは多少実験的なものですが、うまく機能することが証明されています。 latest
タグは、最先端の機能と修正を備えたものとして考えられています。時々、日付付きのタグが公開されます (例: sandreas/m4b-tool:2022-09-25
)。これはかなり安定していると考えられており、壊れたlatest
イメージによってセットアップ全体が壊れることはありません。
# pull the image
docker pull sandreas/m4b-tool:latest
# create an alias for m4b-tool running docker
alias m4b-tool='docker run -it --rm -u $(id -u):$(id -g) -v "$(pwd)":/mnt sandreas/m4b-tool:latest'
# testing the command
m4b-tool --version
注: 上記のエイリアスを使用する場合は、絶対パス (例:
/tmp/data/audiobooks/harry potter 1
) やシンボリックリンクは使用できないことに注意してください。ディレクトリに移動し、相対パスを使用する必要があります (例:cd /tmp/data && m4b-tool merge "audiobooks/harry potter 1" --output-file harry.m4b
)。
特定のm4b-tool
リリース用の Docker コンテナを手動で構築するには、特定のバージョン (たとえばv.0.4.1
をイメージにダウンロードするための追加パラメータを提供する必要があります。
# clone m4b-tool repository
git clone https://github.com/sandreas/m4b-tool.git
# change directory
cd m4b-tool
# build docker image - this will take a while
docker build . -t m4b-tool
# create an alias for m4b-tool running docker
alias m4b-tool='docker run -it --rm -u $(id -u):$(id -g) -v "$(pwd)":/mnt m4b-tool'
# testing the command
m4b-tool --version
# use the specific pre-release from 2022-07-16
docker build . --build-arg M4B_TOOL_DOWNLOAD_LINK=https://github.com/sandreas/m4b-tool/files/9125095/m4b-tool.tar.gz -t m4b-tool
注:
Dockerfile
内の対応する変数を編集することもできます。
開発者や専門家は、 m4b-tool
の完全なカスタム ビルドを実行したり、コードを自分でビルドしたりすることもできます (たとえば、リポジトリをフォークしていくつかのパッチを適用した場合)。その場合は、カスタム ビルドをDockerfile
に関連するdist/m4b-tool.phar
に保存してから、デフォルトのビルドを実行できます。
# dist/m4b-tool.phar is available
docker build . -t m4b-tool
この後、カスタム ビルドを Docker イメージに統合する必要があります。
MacOS では、素晴らしいパッケージ マネージャーbrew
使用してm4b-tool
インストールできます。
最高のオーディオ品質を得るには、追加の努力が必要です。 ffmpeg
フリーではないlibfdk_aac
コーデックで再コンパイルする必要があります。 brew
追加オプションの可能性が排除されているため、デフォルトのffmpeg
パッケージがインストールされている場合はアンインストールする必要があります。公式のffmpeg-with-options
リポジトリはありませんが、時間を節約するために使用できるかなりまともなtap
があります。
# FIRST INSTALL ONLY: if not already done, remove existing ffmpeg with default audio quality options
# check for ffmpeg with libfdk and uninstall if libfdk is not already available
[ -x "$(which ffmpeg)" ] && (ffmpeg -hide_banner -codecs 2>&1 | grep libfdk || brew uninstall ffmpeg)
# tap required repositories
brew tap sandreas/tap
brew tap homebrew-ffmpeg/ffmpeg
# check available ffmpeg options and which you would like to use
brew options homebrew-ffmpeg/ffmpeg/ffmpeg
# install ffmpeg with at least libfdk_aac for best audio quality
brew install homebrew-ffmpeg/ffmpeg/ffmpeg --with-fdk-aac
# install m4b-tool
brew install sandreas/tap/m4b-tool
# check installed m4b-tool version
m4b-tool --version
上記の方法が機能しなかった場合、または運用環境で使用する前にm4b-tool
チェックアウトしたい場合は、迅速で簡単な方法を試してみるとよいでしょう。動作しますが、音質が低下し、並べ替えタグ付けはサポートされません。
# tap m4b-tool repository
brew tap sandreas/tap
# install dependencies
brew install ffmpeg fdk-aac-encoder mp4v2
# install m4b-tool with acceptable audio quality and no sort tagging
brew install --ignore-dependencies sandreas/tap/m4b-tool
# install all dependencies
sudo apt install ffmpeg mp4v2-utils fdkaac php-cli php-intl php-json php-mbstring php-xml
# install / upgrade m4b-tool
sudo wget https://github.com/sandreas/m4b-tool/releases/download/v.0.4.2/m4b-tool.phar -O /usr/local/bin/m4b-tool && sudo chmod +x /usr/local/bin/m4b-tool
# check installed m4b-tool version
m4b-tool --version
注: 可能な限り最高のオーディオ品質を取得したい場合は、高品質エンコーダ
fdk-aac
(--enable-libfdk_aac
) を使用してffmpeg
コンパイルする必要があります - https://trac.ffmpeg.org/wiki/CompilationGuide/ を参照してください。ffmpeg
コンパイルするためのステップバイステップ ガイドの Ubuntu。
m4b-tool
PHP
で書かれており、変換を実行するために高効率コーデックとしてffmpeg
、 mp4v2
、およびオプションでfdkaac
使用します。したがって、%PATH% に次のツールが必要になります。
php
>= 7.1 ( mbstring
拡張機能が有効) (https://php.net)ffmpeg
(https://www.ffmpeg.org)mp4v2
( mp4chaps
、 mp4art
など https://github.com/sandreas/m4b-tool/releases/download/v0.2/mp4v2-windows.zip)fdkaac
(オプション、低ビットレート <= 32k で高い効率が必要な場合のみ、http://wlc.io/2015/06/20/fdk-aac/ - 注意: 公式ではありません!)依存関係を確認するには、コマンド ラインから次のコマンドを実行すると、同様の出力が表示されます。
$ php -v
Copyright (c) 1997-2018 The PHP Group [...]
$ ffmpeg -version
ffmpeg version 4.1.1 Copyright (c) 2000-2019 the FFmpeg developers [...]
$ mp4chaps --version
mp4chaps - MP4v2 2.0.0
$ fdkaac
fdkaac 1.0.0 [...]
すべての依存関係がインストールされていることを確認したら、次のステップはm4b-tool
の最新リリースをダウンロードすることです。
https://github.com/sandreas/m4b-tool/releases
オペレーティング システムに応じて、 m4b-tool.phar
名前をm4b-tool
に変更し、コマンド ラインから直接m4b-tool --version
を実行できます。よくわからない場合は、いつでもコマンドphp m4b-tool.phar --version
使用して、インストールが成功したかどうかを確認できます。これはどのシステムでも機能するはずです。
すべての新機能と修正を含む最新のソース コードを使用したい場合は、ソースからビルドすることもできます。現在のビルドは不安定である可能性があるため、テスト目的、またはリリースされていない特定の機能が必要な場合にのみ使用してください。
mp4v2
による正確な並べ替え順序ほとんどのオーディオブックはアルファベット順にリリースされていません。顕著な例はハリー・ポッターです。したがって、ハリー・ポッターのオーディオブックをすべて持っている場合、それはプレーヤーによって異なりますが、おそらく正しい順序でリストされていません...アルファベット順がどのようになるかを見てみましょう:
そして、正しい順序は次のようになります。
まあ、これには解決策があります。カスタムのsortname
やsortalbum
でオーディオブックにタグを付ける必要があります。プレーヤーがこれらのタグをサポートしている場合、タイトルが元のタイトルのままであっても、順序は正しくなります。これを実現するには、 mp4v2
のカスタム バージョン (より正確にはmp4tags
) をビルドして、これらのタグのオプションを追加し、疑似タグ--series
および--series-part
を追加する必要がありました。
したがって、次のようにすると:
m4b-tool merge --name="Harry Potter and the Chamber of Secrets" --series="Harry Potter" --series-part="2" --output-file="output/Harry Potter and the Chamber of Secrets.m4b" "input/Harry Potter and the Chamber of Secrets"
その結果、次のような結果が得られます。
Harry Potter and the Chamber of Secrets
Harry Potter 2 - Harry Potter and the Chamber of Secrets
mp4v2
をインストールするDocker イメージにはカスタム バージョンがすでにインストールされています
git clone https://github.com/sandreas/mp4v2
cd mp4v2
./configure
make && sudo make install
m4b-tool
では、すべてのオーディオ変換がffmpeg
を使用して実行され、無料のエンコーダを使用するとかなり低いオーディオ品質が得られます。ただし、最高の品質を実現するには余分な労力がかかるため、無料のエンコーダを使用している場合は、 m4b-tool
次のヒントが表示される場合があります。
あなたの ffmpeg バージョンでは、libfdk_aac の代わりにエンコーダ aac を使用して最高品質の aac を生成できません
ほとんどの場合、 aac
とlibfdk_aac
エンコーダーの違いはほとんど目立たないため、これは実際には問題ではありません。ただし、このヒントを克服して可能な限り最高のオーディオ品質を得るには、デフォルトでffmpeg
に統合されていない非フリーのエンコーダーを使用する必要があります (ライセンス上の理由)。使用しているオペレーティング システムによっては、無料でないエンコーダをインストールするには、少し追加のスキル、労力、時間が必要になる場合があります (上記のオペレーティング システムに関する注意事項を参照してください)。わずかに良い品質を得るために追加の努力をする価値があるかどうかを判断する必要があります。 Docker イメージを使用している場合は、デフォルトで最高の品質が得られるはずです。
非常に低いビットレート (<= 32k) を使用している場合は、高効率プロファイルを使用してオーディオ品質をさらに向上させることもできます (例: モノラルの場合は--audio-profile=aac_he
)。残念ながら、 ffmpeg
の高効率実装により生成されるオーディオ ファイルは、多くのプレーヤー (iTunes を含む) と互換性がありません。少なくともほとんどの一般的なプレーヤーと互換性のある高効率のファイルを作成するには、現時点ではfdkaac
インストールする必要があります。
詳細:
m4b-tool
に問題があると思いますか?まず、以下の既知の問題を確認してください。これで問題が解決しない場合は、問題を追加するときに次の情報を提供してください。
m4b-tool merge my-audio-book/ --output-file merged.m4b
the resulting file merged.m4b is only 5kb
例:
Title: m4b-tool does not embed covers
If i run m4b-tool with a folder containing a cover.png, it does not embed the cover and shows an error message.
OS: Ubuntu 16.04 LTS
Command: `m4b-tool merge my-audio-book/ ---output-file merged.m4b`
Error: Cannot embed cover, cover is not a valid image file
Attached files: cover.png
PHP 例外が発生する場合、ほとんどの場合、PHP の構成に問題があります。 PHP 構成に詳しくない場合は、次の手順に従って、いくつかの既知の問題を修正できます。
[Exception]
charset windows-1252 is not supported - use one of these instead: utf-8
これは主に Windows で発生します。これは、ドイツ語のウムラウトなどの特殊な文字がすべてのプラットフォームでサポートされるように、 mbstring
-Extension が文字セットの内部変換に使用されるためです。これを修正するには、mbstring 拡張機能を有効にする必要があります。
コマンドラインでphp --ini
実行します。
C:>php --ini
...
Loaded Configuration File: C:Program Filesphpphp.ini
テキストエディタで構成ファイル (例: C:Program Filesphpphp.ini
) を開き、 extension=
を検索します。 Windows では次のような項目があるはずです。
;extension=php_mbstring.dll
;
拡張機能を有効にするには:
extension=php_mbstring.dll
これで、すべてが期待どおりに機能するはずです。
次のリストには、 merge
、 split
、および各コマンドで使用できるパラメータの参照を伴うchapters
を含むすべての可能なコマンドが含まれています。
m4b-tool
を使用すると、一連のオーディオ ファイルを 1 つの m4b オーディオブック ファイルに結合できます。
m4b-tool merge "data/my-audio-book" --output-file="data/my-audio-book.m4b"
これにより、章を生成するために各ファイルのタグタイトルを使用して、フォルダーdata/my-audio-book
内のすべてのオーディオ ファイルがmy-audio-book.m4b
にマージされます。
ファイルdata/my-audio-book/cover.jpg
(またはcover.jpeg
またはcover.png
) がある場合、それは結果の m4b ファイルの表紙として使用されます。
注: タグなしオーディオ ファイルを使用する場合は、musicbrainz ID を指定して正しいチャプター名を取得できます。詳細については、コマンドの章を参照してください。
すべてのオプションについては、 m4b-tool merge --help
を参照してください。
Description:
Merges a set of files to one single file
Usage:
merge [options] [--] <input> [<more-input-files>...]
Arguments:
input Input file or folder
more-input-files Other Input files or folders
Options:
--logfile[=LOGFILE] file to log all output [default: ""]
--debug enable debug mode - sets verbosity to debug, logfile to m4b-tool.log and temporary encoded files are not deleted
-f, --force force overwrite of existing files
--no-cache clear cache completely before doing anything
--ffmpeg-threads[=FFMPEG-THREADS] specify -threads parameter for ffmpeg - you should also consider --jobs when merge is used [default: ""]
--platform-charset[=PLATFORM-CHARSET] Convert from this filesystem charset to utf-8, when tagging files (e.g. Windows-1252, mainly used on Windows Systems) [default: ""]
--ffmpeg-param[=FFMPEG-PARAM] Add argument to every ffmpeg call, append after all other ffmpeg parameters (e.g. --ffmpeg-param="-max_muxing_queue_size" --ffmpeg-param="1000" for ffmpeg [...] -max_muxing_queue_size 1000) (multiple values allowed)
-a, --silence-min-length[=SILENCE-MIN-LENGTH] silence minimum length in milliseconds [default: 1750]
-b, --silence-max-length[=SILENCE-MAX-LENGTH] silence maximum length in milliseconds [default: 0]
--max-chapter-length[=MAX-CHAPTER-LENGTH] maximum chapter length in seconds - its also possible to provide a desired chapter length in form of 300,900 where 300 is desired and 900 is max - if the max chapter length is exceeded, the chapter is placed on the first silence between desired and max chapter length [default: "0"]
--name[=NAME] custom name, otherwise the existing metadata will be used
--sortname[=SORTNAME] custom sortname, that is used only for sorting
--album[=ALBUM] custom album, otherwise the existing metadata for name will be used
--sortalbum[=SORTALBUM] custom sortalbum, that is used only for sorting
--artist[=ARTIST] custom artist, otherwise the existing metadata will be used
--sortartist[=SORTARTIST] custom sortartist, that is used only for sorting
--genre[=GENRE] custom genre, otherwise the existing metadata will be used
--writer[=WRITER] custom writer, otherwise the existing metadata will be used
--albumartist[=ALBUMARTIST] custom albumartist, otherwise the existing metadata will be used
--year[=YEAR] custom year, otherwise the existing metadata will be used
--description[=DESCRIPTION] custom short description, otherwise the existing metadata will be used
--longdesc[=LONGDESC] custom long description, otherwise the existing metadata will be used
--comment[=COMMENT] custom comment, otherwise the existing metadata will be used
--copyright[=COPYRIGHT] custom copyright, otherwise the existing metadata will be used
--encoded-by[=ENCODED-BY] custom encoded-by, otherwise the existing metadata will be used
--cover[=COVER] custom cover, otherwise the existing metadata will be used
--skip-cover skip extracting and embedding covers
--series[=SERIES] custom series, this pseudo tag will be used to auto create sort order (e.g. Harry Potter or The Kingkiller Chronicles)
--series-part[=SERIES-PART] custom series part, this pseudo tag will be used to auto create sort order (e.g. 1 or 2.5)
--audio-format[=AUDIO-FORMAT] output format, that ffmpeg will use to create files [default: "m4b"]
--audio-channels[=AUDIO-CHANNELS] audio channels, e.g. 1, 2 [default: ""]
--audio-bitrate[=AUDIO-BITRATE] audio bitrate, e.g. 64k, 128k, ... [default: ""]
--audio-samplerate[=AUDIO-SAMPLERATE] audio samplerate, e.g. 22050, 44100, ... [default: ""]
--audio-codec[=AUDIO-CODEC] audio codec, e.g. libmp3lame, aac, ... [default: ""]
--audio-profile[=AUDIO-PROFILE] audio profile, when using extra low bitrate - valid values: aac_he, aac_he_v2 [default: ""]
--adjust-for-ipod auto adjust bitrate and sampling rate for ipod, if track is too long (may result in low audio quality)
--fix-mime-type try to fix MIME-type (e.g. from video/mp4 to audio/mp4) - this is needed for some players to prevent an empty video window
-o, --output-file=OUTPUT-FILE output file
--include-extensions[=INCLUDE-EXTENSIONS] comma separated list of file extensions to include (others are skipped) [default: "aac,alac,flac,m4a,m4b,mp3,oga,ogg,wav,wma,mp4"]
-m, --musicbrainz-id=MUSICBRAINZ-ID musicbrainz id so load chapters from
--no-conversion skip conversion (destination file uses same encoding as source - all encoding specific options will be ignored)
--batch-pattern[=BATCH-PATTERN] multiple batch patterns that can be used to merge all audio books in a directory matching the given patterns (e.g. %a/%t for author/title) - parameter --output-file must be a directory (multiple values allowed)
--dry-run perform a dry run without converting all the files in batch mode (requires --batch-pattern)
--jobs[=JOBS] Specifies the number of jobs (commands) to run simultaneously [default: 1]
--use-filenames-as-chapters Use filenames for chapter titles instead of tag contents
--no-chapter-reindexing Do not perform any reindexing for index-only chapter names (by default m4b-tool will try to detect index-only chapters like Chapter 1, Chapter 2 and reindex it with its numbers only)
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--batch-pattern
のプレースホルダー参照--batch-pattern
パラメーターを使用する場合、次のプレースホルダーがサポートされます
title
/ name
: %n
sort_name
: %N
album
: %m
、sort_album
: %M
、artist
: %a
、sort_artist
: %A
、genre
: %g
、writer
: %w
、album_artist
: %t
、year
: %y
、description
: %d
、long_description
: %D
、comment
: %c
、copyright
: %C
、encoded_by
: %e
、group(ing)
: %G
、purchase_date
: %U
、series
: %s
、series_part
: %p
、 m4b-tool
使用すると、単一のm4b
チャプターごとのファイルに分割したり、 flac
エンコードされたアルバムをキュー シート経由で単一のトラックに分割したりできます。
m4b-tool split --audio-format mp3 --audio-bitrate 96k --audio-channels 1 --audio-samplerate 22050 "data/my-audio-book.m4b"
これにより、ファイルdata/my-audio-book.m4b into
分割され、ファイルがdata/my-audio-book_splitted/
に書き込まれます。
複数のトラックを含むflac
ファイルを分割したい場合は、 flac
の正確なファイル名を含む cue シートが必要です ( my-album.flac
にはmy-album.cue
が必要です)。
# my-album.cue is automatically found and used for splitting
m4b-tool split --audio-format=mp3 --audio-bitrate=192k --audio-channels=2 --audio-samplerate=48000 "data/my-album.flac"
すべてのオプションについては、 m4b-tool split --help
を参照してください。
Description:
Splits an m4b file into parts
Usage:
split [options] [--] <input>
Arguments:
input Input file or folder
Options:
--logfile[=LOGFILE] file to dump all output [default: ""]
--debug enable debug mode - sets verbosity to debug, logfile to m4b-tool.log and temporary files are not deleted
-f, --force force overwrite of existing files
--no-cache do not use cached values and clear cache completely
--ffmpeg-threads[=FFMPEG-THREADS] specify -threads parameter for ffmpeg [default: ""]
--platform-charset[=PLATFORM-CHARSET] Convert from this filesystem charset to utf-8, when tagging files (e.g. Windows-1252, mainly used on Windows Systems) [default: ""]
--ffmpeg-param[=FFMPEG-PARAM] Add argument to every ffmpeg call, append after all other ffmpeg parameters (e.g. --ffmpeg-param="-max_muxing_queue_size" --ffmpeg-param="1000" for ffmpeg [...] -max_muxing_queue_size 1000) (multiple values allowed)
-a, --silence-min-length[=SILENCE-MIN-LENGTH] silence minimum length in milliseconds [default: 1750]
-b, --silence-max-length[=SILENCE-MAX-LENGTH] silence maximum length in milliseconds [default: 0]
--max-chapter-length[=MAX-CHAPTER-LENGTH] maximum chapter length in seconds - its also possible to provide a desired chapter length in form of 300,900 where 300 is desired and 900 is max - if the max chapter length is exceeded, the chapter is placed on the first silence between desired and max chapter length [default: "0"]
--audio-format[=AUDIO-FORMAT] output format, that ffmpeg will use to create files [default: "m4b"]
--audio-channels[=AUDIO-CHANNELS] audio channels, e.g. 1, 2 [default: ""]
--audio-bitrate[=AUDIO-BITRATE] audio bitrate, e.g. 64k, 128k, ... [default: ""]
--audio-samplerate[=AUDIO-SAMPLERATE] audio samplerate, e.g. 22050, 44100, ... [default: ""]
--audio-codec[=AUDIO-CODEC] audio codec, e.g. libmp3lame, aac, ... [default: ""]
--audio-profile[=AUDIO-PROFILE] audio profile, when using extra low bitrate - valid values (mono, stereo): aac_he, aac_he_v2 [default: ""]
--adjust-for-ipod auto adjust bitrate and sampling rate for ipod, if track is to long (may lead to poor quality)
--name[=NAME] provide a custom audiobook name, otherwise the existing metadata will be used [default: ""]
--sortname[=SORTNAME] provide a custom audiobook name, that is used only for sorting purposes [default: ""]
--album[=ALBUM] provide a custom audiobook album, otherwise the existing metadata for name will be used [default: ""]
--sortalbum[=SORTALBUM] provide a custom audiobook album, that is used only for sorting purposes [default: ""]
--artist[=ARTIST]