m4b-tool
m4b-tool copied to clipboard
Config File for some standart options
Hello, I like your tool, it really great.
I'd like to request a feature.
I use it to merge my Audiobook's, so i have one file each Audiobook and for all it remembers where i stopt listening.
A config file, where i can set some options for my default settings, like:
--audio-channels=2 --audio-bitrate=128k --audio-samplerate=44100 --audio-codec=libmp3lame --use-filenames-as-chapters --jobs=8 --cover=cover.jpg -v
or is there a other way to set default options? I did't find anything like that in open or closed Issues, or i missed it.
So that would be nice to have such config file if possibile.
I also could need help.
I tried to merge multiple Audiobooks of a series "Perry Rhodan - Silber Edition"
tried with --batch-pattern like you discribed in the main but it would't work.
For that series my Folder structure looks like that:
Perry Rhodan/Silber Edition/Silber Edition 005 - Vorstoß nach Arkon/001 - Vorstoß nach Arkon - Perry Rhodan - Silber Edition 5, Track 1.flac
In the Silber Edition are over 160 Audiobooks for Neo over 250, is there a way to merge them all at once and for each Audiobook one m4b file? For now i do every Audiobook seperate.
Hope for some Help.
Thanks for any advice and sorry for my bad english. Aber ich dachte mir lieber in Englisch dann kann es jeder verstehen ;-)
Grüße Markus
Hey Markus,
good decision to write in english :-)
1.) Feature request - config file Ok, I'll note this down as a feature request.
As a workaround, you could create a so called alias:
alias m4b-tool-mp3="m4b-tool --audio-channels=2 --audio-bitrate=128k --audio-samplerate=44100 --audio-codec=libmp3lame --use-filenames-as-chapters --jobs=8 --cover=cover.jpg -v"
This leads to:
m4b-tool-mp3 merge "my-book/" -o "output.mp3"
Note: you are already using a bunch of options, that already use sane defaults may be skipped (like
--cover=cover.jpg,--audio-channels=2, etc.)
2.) Help with Batch encoding
See https://github.com/sandreas/m4b-tool#placeholder-reference-for---batch-pattern In the path you provided there are some missing parts:
genreartistwriterAdditionally, there is no way to extractpartas number only (normally, there would be a directory or a split-string, but in your case it is only a space. I also assume, you will provide additional content via--genre, etc.
m4b-tool merge --batch-pattern="%a/%s/%p - %n/" "path/of/audiobooks/" -o /my/output/dir/
# path/of/audiobooks/Perry Rhodan/Silber Edition/Silber Edition 005 - Vorstoß nach Arkon/001 - Vorstoß nach Arkon - Perry Rhodan - Silber Edition 5, Track 1.flac
This would result in:
album: Perry Rhodanseries: Silber Editionpart: Silber Edition 005title: Vorstoß nach Arkon
Hope I could help
Update so far...
that with alias was new to me but good to now (also for other things), i did not yet set it up because iam running a batch merge right now.
to the batch pattern, that i tested my self a little bit and right now i am running a full merge of my Perry Rhodan Collection which is 1151 Audiobooks in total, so far 552 of 1151, started yesterday noon it will still took a while, after that i will merge the rest of my audiobooks which are ca. 2000 more.
I love your tool it makes it so much easyer to merge all the audiobooks. I will report back when i merge my next part of audiobooks, will try different possibilitys of batch patterns. Nice Job Andreas!!!
Eine frage, auf deiner Hauptseite hier steht eine Nummer, kommst du aus SC?
Gruß Markus
Glad to hear it worked. I would recommend to listen to at least one of them before encoding the whole collection :-) Just in case something went wrong.
I love your tool it makes it so much easyer to merge all the audiobooks.
Thank you. I'm happy to hear this.
Eine frage, auf deiner Hauptseite hier steht eine Nummer, kommst du aus SC?
Die Nummer ist eine ID, die dort steht, damit ich meine OpenSource-Tätigkeit nachweisen kann. Meinen Wohnort würde ich jetzt nicht so gerne öffentlich machen... Falls du mich kontaktieren willst, geht das in diversen Foren über PN oder über meine Internetseite (siehe Doku).
Just in case something went wrong.
Thats a good Idea, i also saw some folders from missing merged audiobooks that is because it could one file not convert, so it keeps that folder and i can see which one is a bad one, i think it is some crc error or something like this.
Daumen HOCH!!!
Okay wusste nicht das es eine ID ist, die ersten 5 stellen sind die vorwahl von SC...das stach mir direkt ins auge, bin da aufgewachsen...nein nein du brauchst hier nichts öffentlich machen, deswegen habe ich auch etwas cryptisch geschrieben... wenn es sein sollte werde ich dich wie du schon sagst über ein Forum finden...Vielen Dank
so further Update...
First run of merging Files is a full succsess, thats good and now the rest of it.
But i have a new Question...
is there a way to set a different output path?
i used this command for Perry Rhodan
m4b-tool merge --output-file="/media/disk5/Perry Rhodan" --batch-pattern="/%s/%m" "/media/disk5/Perry Rhodan/" --audio-channels=2 --audio-bitrate=128k --audio-samplerate=44100 --audio-codec=libmp3lame --use-filenames-as-chapters --jobs=8 -v
on output file i thought i can set an absolut path but instead its uses the input path to output files. So is there a way to set a absolut path?
Iam using Debian Buster, have 11 HDD's, four of them in a LVM the rest is setup each on a folder in /media, i dosent have much free space left on the HDD's with audiobooks, so i want run out of space...
Thanks so far
Gruß Markus
m4b-tool should use the --output-file as base directory in batch-mode, so that it creates a clone of the source directory structure in the destination. If this is not the case, you might have configured something wrong.
If you could provide an example, where the --output-file parameter is either ignored or not used correctly, please create a separate issue (this one here is reserved for the config file topic).
However, if you are running out of space and something is wrong with m4b-tool, you could either use docker (which I would recommend) or you could use a bind mount as a last option: mount --bind /some/where /else/where (although this should definetely not necessary.