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

Open
opened 2026-02-20 02:03:55 -05:00 by deekerman · 5 comments
Owner

Originally created by @cnu80 on GitHub (Nov 9, 2023).

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

Originally created by @cnu80 on GitHub (Nov 9, 2023). ### 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
Author
Owner

@nichwall commented on GitHub (Nov 9, 2023):

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?

@nichwall commented on GitHub (Nov 9, 2023): 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?
Author
Owner

@cnu80 commented on GitHub (Nov 9, 2023):

  • ABS is running in docker on a synology nas with 6 GB RAM.
  • ~ 500 mp3 files with a summed size of 6,9 GB .
  • m4b bitrate is the standard bitrate with 128
@cnu80 commented on GitHub (Nov 9, 2023): - ABS is running in docker on a synology nas with 6 GB RAM. - ~ 500 mp3 files with a summed size of 6,9 GB . - m4b bitrate is the standard bitrate with 128
Author
Owner

@cnu80 commented on GitHub (Nov 13, 2023):

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.

@cnu80 commented on GitHub (Nov 13, 2023): 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.
Author
Owner

@mrburns-42 commented on GitHub (Nov 15, 2023):

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.

@mrburns-42 commented on GitHub (Nov 15, 2023): 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](url) > 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.
Author
Owner

@FreedomBen commented on GitHub (Nov 20, 2023):

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.

@FreedomBen commented on GitHub (Nov 20, 2023): 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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/audiobookshelf#1615
No description provided.