advplyr / audiobookshelf

Self-hosted audiobook and podcast server
https://audiobookshelf.org
GNU General Public License v3.0
6.2k stars 432 forks source link

[Bug]: m4b limit size or lenght ? #2296

Open cnu80 opened 10 months ago

cnu80 commented 10 months ago

Describe the issue

Hi, I have a playbook in mp3 with a length of 50hr. When I convert this book to m4b the audiobook is defect. It is the first time that this happened and the only different is the size/length of the audiobook compared with my others.

I tried the ffmpeg prope command:

/audiobooks/xxx) # ffprobe -i xxx.m4b  -show_streams -show
_format -print_format json
ffprobe version 6.0 Copyright (c) 2007-2023 the FFmpeg developers
  built with gcc 12.2.1 (Alpine 12.2.1_git20220924-r10) 20220924
  configuration: --prefix=/usr --disable-librtmp --disable-lzma --disable-static --disable-stripping --enable-avfilter --enable-gnutls --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopenmpt --enable-libopus --enable-libplacebo --enable-libpulse --enable-librist --enable-libsoxr --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-lto --enable-pic --enable-postproc --enable-pthreads --enable-shared --enable-vaapi --enable-vdpau --enable-vulkan --optflags=-O3 --enable-libjxl --enable-libsvtav1 --enable-libvpl
  libavutil      58.  2.100 / 58.  2.100
  libavcodec     60.  3.100 / 60.  3.100
  libavformat    60.  3.100 / 60.  3.100
  libavdevice    60.  1.100 / 60.  1.100
  libavfilter     9.  3.100 /  9.  3.100
  libswscale      7.  1.100 /  7.  1.100
  libswresample   5.  0.100 /  5.  0.100
  libpostproc    57.  1.100 / 57.  1.100
{
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fe37bc38740] moov atom not found
xxx.m4b: Invalid data found when processing input

}

Steps to reproduce the issue

  1. Copy audiobook to audiobookshelf
  2. Start conversation with default options
  3. audiobook is missing afterward, log: Invalid data found when processing input

Audiobookshelf version

2.5.0

How are you running audiobookshelf?

Docker

nichwall commented 10 months ago

What is the size of the mp3 files you're combining, what is the bitrate of the conversation, and what are you running ABS on?

cnu80 commented 10 months ago
cnu80 commented 9 months ago

Is there a time limit for ffmpeg configured in abs ? I checked the command which abs is using to convert the playbook. When I start the process manually (within docker) the process ends successful and the playbook is ok.

mrburns-42 commented 9 months ago

There are limits that are specified by the respective device. Here is an excerpt from the homepage from audiobookbuilder:

https://www.splasm.com/audiobookbuilder/support.html#7

Many Apple devices are still limited to files with approximately 2 billion audio samples or less. This translates into roughly 27 hours for Audiobook Builder's Low Quality preset (22.05 kHz), 18 hours for its Normal Quality preset (32 kHz) and 13 hours for its High Quality preset (44.1 kHz). The lower the audio sample rate the longer your parts can be. It's possible to reach a maximum part length of 74 hours by selecting the Custom... Quality option and choosing an 8 kHz sample rate. Files that exceed the 2 billion sample limit will not play properly on some devices.

FreedomBen commented 9 months ago

I've encountered this also with very long books like Atlas Shrugged and Hitler: A Biography. In one case I was trying to combine 4 .m4b files into a single .m4b. In the other case it was .mp3 files. Both cases I ended up having to rm the files and replace them with the originals again.

The device didn't seem to matter. Even just the ABS scanner would spit out an error message in the logs, and VLC wouldn't open them, etc.