sandreas / m4b-tool

m4b-tool is a command line utility to merge, split and chapterize audiobook files such as mp3, ogg, flac, m4a or m4b
MIT License
1.12k stars 78 forks source link

Too long chapters - not working? #235

Open gitrys opened 1 year ago

gitrys commented 1 year ago

I use m4b-tool on ubuntu server. My m4b-tool --version is "latest-195-g0304329"

Hey, im struggle with the "Too long chapters" manual. The source is in folder "data/output/hp1.m4b" //this source has good chapter marks (but they are too long) The destination would be "data/output2/hp1neu.m4b"

Thats my command: m4b-tool merge -v --no-conversion --max-chapter-length=300,900 "data/output/" -o "data/output2/hp1neu.m4b"

But this won't recalculate the chapters, they are exactly the same.

Am i doing something wrong, or is this a bug? Thats the output from the cli:

m4b-tool merge -v --no-conversion --max-chapter-length=300,900 "data/output/" -o "data/output2/hp1neu.m4b" found 1 files to convert searching for cover in data/output cover not found or not specified extracting cover to data/output/cover.jpg failed - maybe there was no cover embedded in data/output/hp1.m4b searching for cover in data/output cover not found or not specified tagged file tmp_HP1neu.m4b (artist: Felix von Manteuffel, name: Harry Potter 01 - ... und der Stein der Weisen (Manteuffel), chapters: 18) moved temporary tmp_HP1neu.m4b to data/output2/HP1neu.m4b successfully merged 1 files to data/output2/HP1neu.m4b

Best regards.

ps.: is it possible to use the --batch command for this? What would be the correct command then? Tyvm!

sandreas commented 1 year ago

Am i doing something wrong, or is this a bug?

Neither. This is an intended behaviour. Here is why: https://github.com/sandreas/m4b-tool/issues/152 So I will close this in favor of the already existing feature request and prioritize this for the next pre-release.

ps.: is it possible to use the --batch command for this? What would be the correct command then? Tyvm!

The --batch-pattern parameter has been created for an already well sorted audiobook collection extracting metadata out of directory names (e.g. /Fantasy/J.K. Rowling/Harry Potter/1/Harry Potter and the Philosophers Stone where you could extract Genre, Author, Series, Part and Title from the path). However, you can use it for single books but I would highly recommend to use a good directory structure. Otherwise the --batch-pattern would not make much sense.

gazpachoking commented 1 year ago

Is this the same as the other issue? This one is about chapters not being shortened with --max-chapter-length, whereas the other is about wanting chapters to be lengthened. I have also had issues with --max-chapter-length not working, for me it's only been with certain books that only had a single chapter.

sandreas commented 1 year ago

@gazpachoking Oh, you are right, thank you... this might be another issue. I did not see that comment... well - I'll try to reproduce the problem as soon as possible.