Giter VIP home page Giter VIP logo

Comments (7)

sandreas avatar sandreas commented on May 30, 2024 1

If you had time to add the --keep-chapter-names idea it would be much appreciated

Was a simple task, so i did it... things added:

  • --no-chapter-reindexing - will prevent automatic reindexing of similar chapters
  • --use-filenames-as-chapters - will use the filenames (without extension) for chapter names instead of using the tag title or already given chapters of a file

It's not in 0.4.0, so you have to download this nightly... feedback would be great...

Downnload nightly m4b-tool.tar.gz

from m4b-tool.

sandreas avatar sandreas commented on May 30, 2024

Am I missing something super obvious or does m4b-tool not work with mp3 tag data? - Thanks

No this should work. I recently released v.0.4.0 - I'm a bit unhappy with this release, because i did A LOT of changes, some breaking changes, but they were necessary to keep the code maintainable.

Would you mind upgrading and check the issue with the new release? It should be gone...

from m4b-tool.

kour1er avatar kour1er commented on May 30, 2024

OK - so I made sure everything was up to date (this is on a Mac by the way - I installed as per the instructions via brew). Then downloaded the latest release, renamed the .phar checked the version (0.4.0) and tried to build the book again.

Still getting just numbers for chapters I'm afraid :(

I then tried running the process again in debug mode to see if that was helpful and saw this bit:

tagging file test-tmpfiles//tmp_test.m4b with tag:
M4bTool\Audio\Tag Object
(
[encoder] => m4b-tool
[title] => Part - 01

so here, "[title] => Part -01" that is what I'm expecting to see for the first chapter title. So m4btool is reading it - something after that point is happening?

from m4b-tool.

sandreas avatar sandreas commented on May 30, 2024

Ah i see :-) Here m4b-tool's magic is happening - and seems to be unwanted in your case. Well, I need to explain that a bit... since i own a few audiobooks, where the chapters are similar as in your case.

Chapter 1
Chapter 2
Chapter 3
...

I'm german, so the word Chapter is completely useless and if there aren't real chapter names, i thought why should m4b-tool keep this information. So i added the following logic:

  • Strip all numbers from all chapter names
  • Compare all chapter names
  • If more than 75% of the chapters have the same name after stripping the numbers, just reindex the chapters, because they do not contain any useful information

Well, if this is unwanted behaviour in your case, it seems, that i need to add a flag: --keep-chapter-names or something, to prevent reindexing if it is unwanted.

I think i could provide a nightly with that option in the next days.

To solve this problem without a flag, you could also do the following:

  • After merging, m4b-tool puts a file <mergedname>.chapters.txt in your output directory
  • Take this file, put it into the source directory as chapters.txt and rename the chapters to anything you want
  • Then do the merge again - m4b-tool will take the chapters from this file

What do you think? Is the "Part -01" name really something you need?

from m4b-tool.

kour1er avatar kour1er commented on May 30, 2024

Ah your explanation makes total sense :)

I don't really need it, that's just how I've always done it (and I have a lot of books structured this way). If you had time to add the --keep-chapter-names idea it would be much appreciated but I totally understand if you consider it outside of scope

from m4b-tool.

kour1er avatar kour1er commented on May 30, 2024

Brilliant! Have now tried the nightly on three books with the --no-chapter-reindexing and it worked perfectly. Thanks so much

from m4b-tool.

sandreas avatar sandreas commented on May 30, 2024

Nice :-) Glad I could help.

from m4b-tool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.