Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Audiobook length wrong (only some books) #2689

Closed
pardofelis opened this issue Feb 24, 2024 · 10 comments
Closed

[Bug] Audiobook length wrong (only some books) #2689

pardofelis opened this issue Feb 24, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@pardofelis
Copy link

pardofelis commented Feb 24, 2024

Dear advplyr, dear folks who made this project possible,

first of all: Thank you for your time you put into this project.

Sadly, my library has sometimes a wrong audiobook length for some books.

Steps to reproduce - Type 1: Missing audio files

  1. I have scanned a folder containing multiple folders, each containing exactly 1 audiobook.
  2. The mp3 files in it are following always the same naming: %Author% %Album% - %Track%.mp3 [even renaming them to %Track% - %Album%.mp3 didn't help]
  3. When looking into the File Tab, there are all files visible and all audio files (e.g. 1-10) are shown as type "audio"
  4. When looking into the Chapter Tab, there is a length calculated that is way shorter than the length of all audio files and there are tracks "randomly" missing. E.g. chapter 1,2,4,5,6,7,9,10 is available, but chapters 3 and 8 are missing.
  5. This doesn't apply to every book, but in my case, I found 3 books (out of 30) that share this problem.

Ways I tried to get past this - and to add them to the library:

  • Delete the book in the library and rescan the whole library
  • Clicking the "Re-Scan" in the Edit Details Panel
  • Rename the files and Re-Scan
  • Retagging the files and Re-Scan
    Sadly, all of that didn't help.

Expected behaviour

  • Every audio file is added to the track list and the audiobook has the right playing length

Actual behaviour

  • Some audio files are not added and the audiobook is way shorter than the length of all audio files (because of the missing files)

Steps to reproduce - Type 2: Audiofiles with wrong length — Solved

  1. I have scanned a folder containing multiple audiobooks.
  2. The mp3 files in it are following always the same naming: %Author% %Album% - %Track%.mp3 [even renaming them to %Track% - %Album%.mp3 didn't help]
  3. When looking into the File Tab, there are all files visible and all audio files (e.g. 1-10) are shown as type "audio"
  4. When looking into the Chapter Tab, there is a length calculated that is way longer than the length of all audio files and some files show a length way more than when checking them on VLC Player, Windows Details or TagScanner. This results in my case in an audiobookt with twice the length than it actually has.
  5. This doesn't apply to every book, but in my case, I found 1 book with this problem.

Ways I tried to get past this - and to add them to the library:

  • using mp3val, I was able to repair the mp3 file.

Expected behaviour

  • Every audio file is added to the track list and the audiobook has the right playing length

Actual behaviour

  • Some audio files show an incorrect length and the audiobook is way longerthan the length of all audio files (because of the wrong times)

Environment data

Audiobookshelf Version:
v2.8.0 windows

Any suggestions how to solve these inconsistences is highly appreciated.
Have a nice day and thank you for your time

sincerely pardofelis

@pardofelis pardofelis added the bug Something isn't working label Feb 24, 2024
@advplyr
Copy link
Owner

advplyr commented Feb 24, 2024

The duration listed in the audio tracks column is incorrect for you?

image

@pardofelis
Copy link
Author

Hi advplyr,
thank you for your fast reply.
Yes, as for the second part (Type 2), it stated e.g. to be 5 hours in file 1 instead of 7 minutes it actually had. Meanwhile I searched around and - with the help of mp3val - found out that the audio files itself had an internal error regarding the length. After repairing them and re-scanned them, they now show the right length in the file panel. So that part seems to be solved.

Using the named tool mp3val I also checked the files of the Type 1 error. But sadly, the files didn’t show an error there. And I still cannot wait them to be shown as audio tracks.

@nichwall
Copy link
Contributor

nichwall commented Feb 25, 2024

Steps to reproduce - Type 1: Missing audio files

  1. I have scanned a folder containing multiple audiobooks.

Is each book in its own folder? There can be multiple subfolders, but each book needs to be in its own directory.

So something like

Library/
  Author/
    Book1/
      Book1 files
    Book2/
      Book2 files

would work, but

Library/
  Author/
    Book1 files
    Book2 files

would not.

@pardofelis
Copy link
Author

Hi nichwall,
thank you for your reply.

Sorry for being unclear. What I meant was:

Scanned Folder Genre1/
— Folder Author1-Audiobook1
—— Files of audiobook1 (e.g. mp3, cover.jpg, playlist.m3u, details.html)
— Folder Author1-Audiobook 2
—— Files of audiobook2
— Folder Author2-Audiobook 3
—— Files of audiobook3
— Folder Author3-Audiobook 4
—— Files of audiobook1
….

So: yes, every audiobook is in its own folder, but there are multiple folders containing audiobooks in the scanned folder.

@advplyr
Copy link
Owner

advplyr commented Feb 25, 2024

In the web client if you go to the book that has incorrect chapters and press "Edit Chapters" you can see more information about chapters.

My guess is the chapters were initially set before all the audio files were scanned in. Once the chapters are set they aren't going to be modified again when more audio files are scanned but you can go to "Edit Chapters" and map them again based on the audio tracks.

image

@advplyr advplyr added waiting Waiting for OP unable to reproduce Issue is not yet reproducible labels Feb 25, 2024
@pardofelis
Copy link
Author

Hi advplyr,
attached I have taken two screenshots, one of the files page and one of the chapter page
As you can see, every audiofile is present in the files tab, but in the chapters page, some of them (e.g. 2,4,7,9) are missing in the files column

files tab

2024-02-26 08_01_19-Audiobookshelf - Chromium

chapter tab

2024-02-26 08_00_41-Audiobookshelf - Chromium

@pardofelis
Copy link
Author

Hi advplyr,

I have just copied the files out of the folder, deleted all files other than audio files and loaded them into mp3diags.
Afterwards I asked mp3diags to run several diagnoses. After having changed the files using that tool, I reloaded the folder.

When I looked into the logs, I found:

2024-02-26 09_19_28-Audiobookshelf - Chromium

which threw an error for every file that was already missing in the chapter tab before that step.

@advplyr
Copy link
Owner

advplyr commented Feb 27, 2024

Looks like there is an issue with those files. I would need a copy of them to determine what that issue is

@advplyr advplyr transferred this issue from advplyr/audiobookshelf-app Feb 28, 2024
@advplyr
Copy link
Owner

advplyr commented Mar 14, 2024

This turned out to be an issue specific to ffprobe 6.1 so I updated the binary manager to only accept 5.1 for now until we can determine if it is a bug with ffprobe.

d2b006b

@advplyr advplyr added awaiting release Issue is resolved and will be in the next release and removed waiting Waiting for OP unable to reproduce Issue is not yet reproducible labels Mar 14, 2024
@advplyr
Copy link
Owner

advplyr commented Mar 16, 2024

Fixed in v2.8.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants