[Enhancement]: xHE-AAC support #2738

Open
opened 2026-04-25 00:10:03 +02:00 by adam · 33 comments
Owner

Originally created by @simmias42 on GitHub (Apr 29, 2025).

Type of Enhancement

None

Describe the Feature/Enhancement

Please add support for the xHE-AAC files created by Libation in today's update when users select the new download setting that allows for the highest possible file quality.

Why would this be helpful?

As of today, Libation now supports downloading from Audible at 128/44 for almost every book. You could already download many newer and shorter books at this quality, but now Libation can download a 128/44 xHE-AAC file for many books that previously only had 64/22 AAX files available.

Unfortunately, Audiobookshelf won't recognize these new xHE-AAC files that Libation produces.

Can support be added so we can add these newer, higher quality files to our libraries?

Thank you!!!

Future Implementation (Screenshot)

Added support for xHE-AAC files.

Audiobookshelf Server Version

v2.20.0

Current Implementation (Screenshot)

No response

Originally created by @simmias42 on GitHub (Apr 29, 2025). ### Type of Enhancement None ### Describe the Feature/Enhancement Please add support for the xHE-AAC files created by Libation in today's update when users select the new download setting that allows for the highest possible file quality. ### Why would this be helpful? As of today, Libation now supports downloading from Audible at 128/44 for almost every book. You could already download many newer and shorter books at this quality, but now Libation can download a 128/44 xHE-AAC file for many books that previously only had 64/22 AAX files available. Unfortunately, Audiobookshelf won't recognize these new xHE-AAC files that Libation produces. Can support be added so we can add these newer, higher quality files to our libraries? Thank you!!! ### Future Implementation (Screenshot) Added support for xHE-AAC files. ### Audiobookshelf Server Version v2.20.0 ### Current Implementation (Screenshot) _No response_
adam added the enhancement label 2026-04-25 00:10:03 +02:00
Author
Owner

@nichwall commented on GitHub (Apr 29, 2025):

What is different about these files? Do they have a different extension so ABS does not recognize them? Can you share any logs from trying to add one of these files to the server?

@nichwall commented on GitHub (Apr 29, 2025): What is different about these files? Do they have a different extension so ABS does not recognize them? Can you share any logs from trying to add one of these files to the server?
Author
Owner

@simmias42 commented on GitHub (Apr 29, 2025):

It still downloads as an m4b file, but it uses the xHE-AAC codec instead of AAC-LC or HE-AAC. I guess xHE-AAC is the latest and greatest as far as AAC codecs go, and it isn't as well supported. It only has partial support in ffmpeg. My Android phone plays it fine, but I had to download a plug-in for foobar for it to play on my computer.

This is from one of the Libation crew: "Ffmpeg has partial support, but not enough support to play these files seamlessly. If you get a hold of the fdk AAC lib (or an ffmpeg built with fdk AAC, which is basically impossible without building it yourself), then it will play seamlessly. As of right now, I think fdk-aac is the only option for playing these. I use potplayer on my PC, and it has the fdk decoder built in."

This is all I get in my ABS log if I try to add one of these files:

2025-04-28 23:17:41.421 ERROR [LibraryItem] Library item not found

2025-04-28 23:17:41.426 ERROR [LibraryItem] Library item not found

2025-04-28 23:17:41.431 ERROR [LibraryItem] Library item not found

2025-04-28 23:17:41.555 ERROR [AudioFileScanner] SyntaxError: Expected property name or '}' in JSON at position 2 : "/audiobooks/Audiobooks/Vonnegut, Kurt/Breakfast of Champions 2/Breakfast of Champions.m4b"

@simmias42 commented on GitHub (Apr 29, 2025): It still downloads as an m4b file, but it uses the xHE-AAC codec instead of AAC-LC or HE-AAC. I guess xHE-AAC is the latest and greatest as far as AAC codecs go, and it isn't as well supported. It only has partial support in ffmpeg. My Android phone plays it fine, but I had to download a plug-in for foobar for it to play on my computer. This is from one of the Libation crew: "Ffmpeg has partial support, but not enough support to play these files seamlessly. If you get a hold of the fdk AAC lib (or an ffmpeg built with fdk AAC, which is basically impossible without building it yourself), then it will play seamlessly. As of right now, I think fdk-aac is the only option for playing these. I use potplayer on my PC, and it has the fdk decoder built in." This is all I get in my ABS log if I try to add one of these files: 2025-04-28 23:17:41.421 ERROR [LibraryItem] Library item not found 2025-04-28 23:17:41.426 ERROR [LibraryItem] Library item not found 2025-04-28 23:17:41.431 ERROR [LibraryItem] Library item not found 2025-04-28 23:17:41.555 ERROR [AudioFileScanner] SyntaxError: Expected property name or '}' in JSON at position 2 : "/audiobooks/Audiobooks/Vonnegut, Kurt/Breakfast of Champions 2/Breakfast of Champions.m4b"
Author
Owner

@Vito0912 commented on GitHub (Apr 29, 2025):

We are using a fairly outdated version of ffprobe; version 7.1 is the latest, but we are currently using 5.1 (at least what I saw from the code, maybe I spotted the version wrong).
I am not sure how much updating will help, since on Windows, I saw no crash with either version, only a warning on both. However, the file I tested was just an xHE-AAC sample I found attached to a bug report for ffmpeg, so I do not know if it is exactly the same format as the one mentioned above.

5.1:

[aac @ 000001e31d611980] Audio object type 42 is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001e31d5f69c0] Failed to open codec in avformat_find_stream_info
[aac @ 000001e31d611980] Audio object type 42 is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001e31d5f69c0] Could not find codec parameters for stream 0 (Audio: aac (mp4a / 0x6134706D), 44100 Hz, 0 channels, fltp, 66 kb/s): unspecified number of channels
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options

7.1:

[aac @ 000001b2527dbf40] AAC USAC Mps212 is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.

Edit: ok, nvm. For me, on dev branch on Windows, it does not crash with the file, so ig, it's the wrong format I have

@Vito0912 commented on GitHub (Apr 29, 2025): We are using a fairly outdated version of ffprobe; version 7.1 is the latest, but we are currently using 5.1 (at least what I saw from the code, maybe I spotted the version wrong). I am not sure how much updating will help, since on Windows, I saw no crash with either version, only a warning on both. However, the file I tested was just an xHE-AAC sample I found attached to a bug report for ffmpeg, so I do not know if it is exactly the same format as the one mentioned above. 5.1: ```bash [aac @ 000001e31d611980] Audio object type 42 is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented. [mov,mp4,m4a,3gp,3g2,mj2 @ 000001e31d5f69c0] Failed to open codec in avformat_find_stream_info [aac @ 000001e31d611980] Audio object type 42 is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented. [mov,mp4,m4a,3gp,3g2,mj2 @ 000001e31d5f69c0] Could not find codec parameters for stream 0 (Audio: aac (mp4a / 0x6134706D), 44100 Hz, 0 channels, fltp, 66 kb/s): unspecified number of channels Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options ``` 7.1: ```bash [aac @ 000001b2527dbf40] AAC USAC Mps212 is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented. ``` Edit: ok, nvm. For me, on dev branch on Windows, it does not crash with the file, so ig, it's the wrong format I have
Author
Owner

@acidRain-burns commented on GitHub (Apr 29, 2025):

If it helps, an ongoing discussion about using the format is still happening in the Libation issue, https://github.com/rmcrackan/Libation/issues/996

@acidRain-burns commented on GitHub (Apr 29, 2025): If it helps, an ongoing discussion about using the format is still happening in the Libation issue, https://github.com/rmcrackan/Libation/issues/996
Author
Owner

@Vito0912 commented on GitHub (Apr 29, 2025):

Version 7.1 does appear to fix the issue. I have almost no time over the next week, so I won't be able to look into this topic further right now.

I noticed that we use https://ffbinaries.com/downloads for ffprobe. Only version 6.1 is available there. I tested it, and it failed.

So, at the moment, I don't think there is a quick fix, since we need another source for the prebuilt ffmpeg files. I'm not very familiar with ffmpeg-builts, but maybe there is another source (preferably GitHub-Repo) that provides these builds. Ik there are other, but I am not sure how.

As a temporary, but very impractical fix, you can download ffprobe 7.1 and replace the executable. However, it gets overwritten every time abs restarts (for example, after a crash).

Edit: https://github.com/BtbN/FFmpeg-Builds/releases seems to exist. Idk if these are the newest as they do not have a version tag assigned.


Thanks to Simmias for bringing this up. As you said, it could have led (or lead, depending on the time it takes) to confusion for some users.

@Vito0912 commented on GitHub (Apr 29, 2025): Version 7.1 does appear to fix the issue. I have almost no time over the next week, so I won't be able to look into this topic further right now. I noticed that we use <https://ffbinaries.com/downloads> for ffprobe. Only version 6.1 is available there. I tested it, and it failed. So, at the moment, I don't think there is a quick fix, since we need another source for the prebuilt ffmpeg files. I'm not very familiar with ffmpeg-builts, but maybe there is another source (preferably GitHub-Repo) that provides these builds. Ik there are other, but I am not sure how. As a temporary, but very impractical fix, you can download ffprobe 7.1 and replace the executable. However, it gets overwritten every time abs restarts (for example, after a crash). Edit: <https://github.com/BtbN/FFmpeg-Builds/releases> seems to exist. Idk if these are the newest as they do not have a version tag assigned. --- Thanks to Simmias for bringing this up. As you said, it could have led (or lead, depending on the time it takes) to confusion for some users.
Author
Owner

@Mbucari commented on GitHub (Apr 29, 2025):

@Vito0912 The ffmpeg website has links to several build services. This is the one I tend to use when I a need pre-compiled binaries.

I'm not familiar with your project, but I am familiar with compiling ffmpeg and what is required to decode audiobooks from audible. I'm the AAXClean author, and I just recently had to update the native libraries to enable decoding of these xhe-AAC audio books. Version 7.1 will correctly identify the codec, but it will still not be able to decode it. These audiobooks are encoded with USAC, which is still unsupported by the latest ffmpeg release. If you compile your own ffmpeg with fdk-AAC lib, your build will be able to decode USAC. libxaac May also decode USAC, but as far as I'm aware, nobody has written an ffmpeg interface for that library. So at this point in time, I think the only way you can use ffmpeg to decode USAC is with fdk-AAC.

@Mbucari commented on GitHub (Apr 29, 2025): @Vito0912 The ffmpeg website has links to several build services. [This is the one I tend to use](https://github.com/BtbN/FFmpeg-Builds/releases) when I a need pre-compiled binaries. I'm not familiar with your project, but I am familiar with compiling ffmpeg and what is required to decode audiobooks from audible. I'm the AAXClean author, and I just recently had to update the native libraries to enable decoding of these xhe-AAC audio books. Version 7.1 will correctly identify the codec, but it will still not be able to decode it. These audiobooks are encoded with [USAC](https://en.wikipedia.org/wiki/Unified_Speech_and_Audio_Coding), which is still unsupported by the latest ffmpeg release. If you compile your own ffmpeg with fdk-AAC lib, your build will be able to decode USAC. libxaac May also decode USAC, but as far as I'm aware, nobody has written an ffmpeg interface for that library. So at this point in time, I think the only way you can use ffmpeg to decode USAC is with fdk-AAC.
Author
Owner

@ebb-earl-co commented on GitHub (Apr 30, 2025):

FWIW, the Jellyfin has been using their own custom FFmpeg for some time now, and have version 7.1.1-1 available.

It purports to include libfdk_aac somehow if I can read the ffmpeg -decoders (on Debian 13) output correctly:

ffmpeg version 7.1.1-Jellyfin Copyright (c) 2000-2025 the FFmpeg developers
  built with gcc 14.2.0 (crosstool-NG 1.27.0.18_7458341)
  configuration: --prefix=/ffbuild/prefix --pkg-config=pkg-config --pkg-config-flags=--static --cross-prefix=x86_64-ffbuild-linux-gnu- --arch=x86_64 --target-os=linux --extra-version=Jellyfin --extra-cflags= --extra-cxxflags= --extra-ldflags= --extra-ldexeflags=-pie --extra-libs=-ldl --enable-gpl --enable-version3 --disable-ffplay --disable-debug --disable-doc --disable-sdl2 --disable-libxcb --disable-xlib --enable-lto=auto --enable-iconv --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-libxml2 --enable-openssl --enable-lzma --enable-fontconfig --enable-libharfbuzz --enable-libvorbis --enable-opencl --enable-amf --enable-chromaprint --enable-libdav1d --enable-libfdk-aac --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpl --enable-libvpx --enable-libwebp --enable-libopenmpt --enable-libsrt --enable-libsvtav1 --enable-libdrm --enable-vaapi --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libzimg --enable-libzvbi
  libavutil      59. 39.100 / 59. 39.100
  libavcodec     61. 19.101 / 61. 19.101
  libavformat    61.  7.100 / 61.  7.100
  libavdevice    61.  3.100 / 61.  3.100
  libavfilter    10.  4.100 / 10.  4.100
  libswscale      8.  3.100 /  8.  3.100
  libswresample   5.  3.100 /  5.  3.100
  libpostproc    58.  3.100 / 58.  3.100
 A....D aac                  AAC (Advanced Audio Coding)
 A....D libfdk_aac           Fraunhofer FDK AAC (codec aac)

However, trying to use this binary to transcode a .mp4 container with a single xHE-AAC audio stream fails.

@ebb-earl-co commented on GitHub (Apr 30, 2025): FWIW, the [Jellyfin](https://jellyfin.org) has been using their own custom FFmpeg for some time now, and have version [7.1.1-1](https://github.com/jellyfin/jellyfin-ffmpeg/releases/tag/v7.1.1-1) available. It purports to include `libfdk_aac` _somehow_ if I can read the `ffmpeg -decoders` (on Debian 13) output correctly: ```bash ffmpeg version 7.1.1-Jellyfin Copyright (c) 2000-2025 the FFmpeg developers built with gcc 14.2.0 (crosstool-NG 1.27.0.18_7458341) configuration: --prefix=/ffbuild/prefix --pkg-config=pkg-config --pkg-config-flags=--static --cross-prefix=x86_64-ffbuild-linux-gnu- --arch=x86_64 --target-os=linux --extra-version=Jellyfin --extra-cflags= --extra-cxxflags= --extra-ldflags= --extra-ldexeflags=-pie --extra-libs=-ldl --enable-gpl --enable-version3 --disable-ffplay --disable-debug --disable-doc --disable-sdl2 --disable-libxcb --disable-xlib --enable-lto=auto --enable-iconv --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-libxml2 --enable-openssl --enable-lzma --enable-fontconfig --enable-libharfbuzz --enable-libvorbis --enable-opencl --enable-amf --enable-chromaprint --enable-libdav1d --enable-libfdk-aac --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpl --enable-libvpx --enable-libwebp --enable-libopenmpt --enable-libsrt --enable-libsvtav1 --enable-libdrm --enable-vaapi --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libzimg --enable-libzvbi libavutil 59. 39.100 / 59. 39.100 libavcodec 61. 19.101 / 61. 19.101 libavformat 61. 7.100 / 61. 7.100 libavdevice 61. 3.100 / 61. 3.100 libavfilter 10. 4.100 / 10. 4.100 libswscale 8. 3.100 / 8. 3.100 libswresample 5. 3.100 / 5. 3.100 libpostproc 58. 3.100 / 58. 3.100 A....D aac AAC (Advanced Audio Coding) A....D libfdk_aac Fraunhofer FDK AAC (codec aac) ``` However, trying to use this binary to transcode a `.mp4` container with a single xHE-AAC audio stream fails.
Author
Owner

@Mbucari commented on GitHub (Apr 30, 2025):

@ebb-earl-co try specifying the decoder like so:

ffmpeg -c:a libfdk_aac -i "xHE-AAC.m4b" "out.m4a"

@Mbucari commented on GitHub (Apr 30, 2025): @ebb-earl-co try specifying the decoder like so: `ffmpeg -c:a libfdk_aac -i "xHE-AAC.m4b" "out.m4a"`
Author
Owner

@ebb-earl-co commented on GitHub (Apr 30, 2025):

@ebb-earl-co try specifying the decoder like so:

ffmpeg -c:a libfdk_aac -i "xHE-AAC.m4b" "out.m4a"

@Mbucari I had done a slightly different invocation, but executing this results in

$ /opt/jellyfin/ffmpeg -loglevel verbose -c:a libfdk_aac -i B0DXLGMMK9.mp4a.40.42.mp4 B0DXLGMMK9.m4a
ffmpeg version 7.1.1-Jellyfin Copyright (c) 2000-2025 the FFmpeg developers
  built with gcc 14.2.0 (crosstool-NG 1.27.0.18_7458341)
  configuration: --prefix=/ffbuild/prefix --pkg-config=pkg-config --pkg-config-flags=--static --cross-prefix=x86_64-ffbuild-linux-gnu- --arch=x86_64 --target-os=linux --extra-version=Jellyfin --extra-cflags= --extra-cxxflags= --extra-ldflags= --extra-ldexeflags=-pie --extra-libs=-ldl --enable-gpl --enable-version3 --disable-ffplay --disable-debug --disable-doc --disable-sdl2 --disable-libxcb --disable-xlib --enable-lto=auto --enable-iconv --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-libxml2 --enable-openssl --enable-lzma --enable-fontconfig --enable-libharfbuzz --enable-libvorbis --enable-opencl --enable-amf --enable-chromaprint --enable-libdav1d --enable-libfdk-aac --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpl --enable-libvpx --enable-libwebp --enable-libopenmpt --enable-libsrt --enable-libsvtav1 --enable-libdrm --enable-vaapi --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libzimg --enable-libzvbi
  libavutil      59. 39.100 / 59. 39.100
  libavcodec     61. 19.101 / 61. 19.101
  libavformat    61.  7.100 / 61.  7.100
  libavdevice    61.  3.100 / 61.  3.100
  libavfilter    10.  4.100 / 10.  4.100
  libswscale      8.  3.100 /  8.  3.100
  libswresample   5.  3.100 /  5.  3.100
  libpostproc    58.  3.100 / 58.  3.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55a2f65b4b40] advanced_editlist does not work with fragmented MP4. disabling.
Segmentation fault
@ebb-earl-co commented on GitHub (Apr 30, 2025): > [@ebb-earl-co](https://github.com/ebb-earl-co) try specifying the decoder like so: > > `ffmpeg -c:a libfdk_aac -i "xHE-AAC.m4b" "out.m4a"` @Mbucari I had done a slightly different invocation, but executing this results in ```bash $ /opt/jellyfin/ffmpeg -loglevel verbose -c:a libfdk_aac -i B0DXLGMMK9.mp4a.40.42.mp4 B0DXLGMMK9.m4a ffmpeg version 7.1.1-Jellyfin Copyright (c) 2000-2025 the FFmpeg developers built with gcc 14.2.0 (crosstool-NG 1.27.0.18_7458341) configuration: --prefix=/ffbuild/prefix --pkg-config=pkg-config --pkg-config-flags=--static --cross-prefix=x86_64-ffbuild-linux-gnu- --arch=x86_64 --target-os=linux --extra-version=Jellyfin --extra-cflags= --extra-cxxflags= --extra-ldflags= --extra-ldexeflags=-pie --extra-libs=-ldl --enable-gpl --enable-version3 --disable-ffplay --disable-debug --disable-doc --disable-sdl2 --disable-libxcb --disable-xlib --enable-lto=auto --enable-iconv --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-libxml2 --enable-openssl --enable-lzma --enable-fontconfig --enable-libharfbuzz --enable-libvorbis --enable-opencl --enable-amf --enable-chromaprint --enable-libdav1d --enable-libfdk-aac --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpl --enable-libvpx --enable-libwebp --enable-libopenmpt --enable-libsrt --enable-libsvtav1 --enable-libdrm --enable-vaapi --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libzimg --enable-libzvbi libavutil 59. 39.100 / 59. 39.100 libavcodec 61. 19.101 / 61. 19.101 libavformat 61. 7.100 / 61. 7.100 libavdevice 61. 3.100 / 61. 3.100 libavfilter 10. 4.100 / 10. 4.100 libswscale 8. 3.100 / 8. 3.100 libswresample 5. 3.100 / 5. 3.100 libpostproc 58. 3.100 / 58. 3.100 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x55a2f65b4b40] advanced_editlist does not work with fragmented MP4. disabling. Segmentation fault ```
Author
Owner

@Mbucari commented on GitHub (Apr 30, 2025):

@ebb-earl-co Yeah, I tested Jellyfin and it doesn't look like they actually have fdk-aac built in. I tried building ffmpeg with their claimed configuration, and it won't even allow me to configure it with both --enable-gpl and --enable-libfdk-aac options.

It doesn't look like you're running windows, but if you have access to a win64 machine, you can use this build I just made. Configuration options are:

--disable-shared --enable-static --disable-debug --disable-doc --enable-bzlib --enable-libmp3lame --enable-nonfree --enable-libfdk_aac --enable-decoder=libfdk_aac --enable-encoder=libfdk_aac --disable-encoder=aac --disable-encoder=aac_mf --disable-decoder=aac --disable-decoder=aac_fixed --disable-decoder=aac_latm --enable-zlib --extra-ldflags=-static

ffmpeg-fdk-aac.zip

@Mbucari commented on GitHub (Apr 30, 2025): @ebb-earl-co Yeah, I tested Jellyfin and it doesn't look like they actually have fdk-aac built in. I tried building ffmpeg with their claimed configuration, and it won't even allow me to configure it with both `--enable-gpl` and `--enable-libfdk-aac` options. It doesn't look like you're running windows, but if you have access to a win64 machine, you can use this build I just made. Configuration options are: ``` --disable-shared --enable-static --disable-debug --disable-doc --enable-bzlib --enable-libmp3lame --enable-nonfree --enable-libfdk_aac --enable-decoder=libfdk_aac --enable-encoder=libfdk_aac --disable-encoder=aac --disable-encoder=aac_mf --disable-decoder=aac --disable-decoder=aac_fixed --disable-decoder=aac_latm --enable-zlib --extra-ldflags=-static ``` [ffmpeg-fdk-aac.zip](https://github.com/user-attachments/files/19970689/ffmpeg-fdk-aac.zip)
Author
Owner

@ebb-earl-co commented on GitHub (Apr 30, 2025):

@Mbucari thank you!

I'm the author of tidal-wave, so I have some experience with make a purpose-built FFmpeg: thank you for the config guide!

@ebb-earl-co commented on GitHub (Apr 30, 2025): @Mbucari thank you! I'm the author of [`tidal-wave`](https://github.com/ebb-earl-co/tidal-wave), so I have some experience with make a [purpose-built FFmpeg](https://github.com/ebb-earl-co/tidal-wave/blob/trunk/.github/workflows/pyinstaller-ubuntu_20_04.yml#L36): thank you for the config guide!
Author
Owner

@dymk commented on GitHub (May 1, 2025):

Here's a Dockerfile based off of the official audiobookshelf image, which builds ffmpeg and fdk-aac from source.

I can re-encode with a command like so - ffmpeg -loglevel verbose -i "Red Rising [B00I2VWW5U].m4b" -c:a libfdk_aac -c:v copy "red-rising.m4a"

This appears to "just work" when using it as abs setup. Audiobooks stream, both new and old m4b.

@dymk commented on GitHub (May 1, 2025): [Here's a Dockerfile](https://gist.github.com/dymk/7a6c9e4237335dcb73a0833522668bbf) based off of the official audiobookshelf image, which builds `ffmpeg` and `fdk-aac` from source. I can re-encode with a command like so - `ffmpeg -loglevel verbose -i "Red Rising [B00I2VWW5U].m4b" -c:a libfdk_aac -c:v copy "red-rising.m4a"` This appears to "just work" when using it as abs setup. Audiobooks stream, both new and old m4b.
Author
Owner

@Vito0912 commented on GitHub (May 1, 2025):

Edit2: With the new version of Libation, you can turn off "widevine." This will give you audio files that work, but the quality will be lower for books that only have high-quality widevine.
You can turn off "use widevine DRM" option in the settings of Libation or follow the steps below to make abs recognize these files again.
Please note that these steps below have not been tested and might cause problems with other files or clients. For example, plappa does not seem to work with this workaround.

Please note that this is not an issue with ABS, but with the format Libation returns which is not supported with the newest ffmpeg version

If you need xHE-AAC support (required for some files in Libation), you can use a custom Dockerfile based on dymk’s work. This version adds a setting for the AUDIOBOOKSHELF_TAG (ABS tag). Note: The build process will take some time.

Steps

1. Download the Dockerfile

Make sure you are in your docker-compose folder, then run:

curl -o Dockerfile "https://gist.githubusercontent.com/Vito0912/55851304c3dc271dbfc3961a628fd495/raw/128338f7fa303cbcbe395b05a97eb5f2907162d7/Dockerfile"

or

wget -O Dockerfile "https://gist.githubusercontent.com/Vito0912/55851304c3dc271dbfc3961a628fd495/raw/128338f7fa303cbcbe395b05a97eb5f2907162d7/Dockerfile"

Please check the downloaded file to ensure it looks correct.


2. Update your docker-compose.yml

  • Remove the image: line from your service definition.
  • Add the following build: section:
build:
  context: .
  dockerfile: Dockerfile
  args:
    AUDIOBOOKSHELF_TAG: ${AUDIOBOOKSHELF_TAG_VAR:-latest}

You can set AUDIOBOOKSHELF_TAG to a specific version (e.g., 2.21.0), edge, or leave it as latest (the default).


3. Build and Run

docker compose up -d

To update when a new ABS version is released, run:

docker compose build
docker compose up -d

Note:
docker compose pull will no longer update the image with this setup, since you are building locally.


Additional Notes

  • I have not tested playback with xHE-AAC files, as I do not have any. The build process completes successfully, and dymk reports that his builds seemed to work. So I assume it will also work for this.

Distributing an ffmpeg build with fdk-aac may violate licensing terms. Sharing a pre-built image could be problematic. - So that's why I do not provide a finsihed image

The license of libfdk_aac is not compatible with GPL, so the GPL does not permit distribution of binaries containing incompatible code when GPL-licensed code is also included. Therefore this encoder have been designated as "non-free", and you cannot download a pre-built ffmpeg that supports it.
Source: https://trac.ffmpeg.org/wiki/Encode/AAC

Make backups. I am not liable if you loose anything. Make sure you have setup mountpoints correctly!


Credit:
Thanks to dymk for the original Dockerfile.


Example

Example Compose

services:
  audiobookshelf:
    build:
      context: .
      dockerfile: Dockerfile
      args:
        AUDIOBOOKSHELF_TAG: latest

    # ABS runs on port 13378 by default. If you want to change
    # the port, only change the external port, not the internal port
    ports:
      - 13378:80
    volumes:
      # These volumes are needed to keep your library persistent
      # and allow media to be accessed by the ABS server.
      # The path to the left of the colon is the path on your computer,
      # and the path to the right of the colon is where the data is
      # available to ABS in Docker.
      # You can change these media directories or add as many as you want
      - ./audiobooks:/audiobooks
      - ./podcasts:/podcasts
      # The metadata directory can be stored anywhere on your computer
      - ./metadata:/metadata
      # The config directory needs to be on the same physical machine
      # you are running ABS on
      - ./config:/config
    restart: unless-stopped
    # You can use the following user directive to run the ABS
    # docker container as a specific user. You will need to change
    # the UID and GID to the correct values for your user.
    # user: 1000:1000

@Vito0912 commented on GitHub (May 1, 2025): Edit2: With the new version of Libation, you can turn off "widevine." This will give you audio files that work, but the quality will be lower for books that only have high-quality widevine. You can turn off "`use widevine DRM`" option in the settings of Libation or follow the steps below to make abs recognize these files again. Please note that these steps below have not been tested and might cause problems with other files or clients. For example, plappa does not seem to work with this workaround. #### Please note that this is not an issue with ABS, but with the format Libation returns which is not supported with the newest ffmpeg version If you need xHE-AAC support (required for some files in [Libation](https://github.com/rmcrackan/Libation/issues/1228)), you can use a custom Dockerfile based on [dymk’s work](https://github.com/dymk). This version adds a setting for the `AUDIOBOOKSHELF_TAG` (ABS tag). **Note:** The build process will take some time. ### Steps **1. Download the Dockerfile** Make sure you are in your `docker-compose` folder, then run: ```sh curl -o Dockerfile "https://gist.githubusercontent.com/Vito0912/55851304c3dc271dbfc3961a628fd495/raw/128338f7fa303cbcbe395b05a97eb5f2907162d7/Dockerfile" ``` or ```sh wget -O Dockerfile "https://gist.githubusercontent.com/Vito0912/55851304c3dc271dbfc3961a628fd495/raw/128338f7fa303cbcbe395b05a97eb5f2907162d7/Dockerfile" ``` *Please check the downloaded file to ensure it looks correct.* --- **2. Update your `docker-compose.yml`** - **Remove** the `image:` line from your service definition. - **Add** the following `build:` section: ```yaml build: context: . dockerfile: Dockerfile args: AUDIOBOOKSHELF_TAG: ${AUDIOBOOKSHELF_TAG_VAR:-latest} ``` You can set `AUDIOBOOKSHELF_TAG` to a specific version (e.g., `2.21.0`), `edge`, or leave it as `latest` (the default). --- **3. Build and Run** ```sh docker compose up -d ``` To update when a new ABS version is released, run: ```sh docker compose build docker compose up -d ``` > **Note:** > `docker compose pull` will no longer update the image with this setup, since you are building locally. --- ### Additional Notes - I have not tested playback with xHE-AAC files, as I do not have any. The build process completes successfully, and [dymk](https://github.com/dymk) reports that his builds seemed to work. So I assume it will also work for this. *Distributing an ffmpeg build with fdk-aac may violate licensing terms. Sharing a pre-built image could be problematic.* - So that's why I do not provide a finsihed image > The license of libfdk_aac is not compatible with GPL, so the GPL does not permit distribution of binaries containing incompatible code when GPL-licensed code is also included. Therefore this encoder have been designated as "non-free", and you cannot download a pre-built ffmpeg that supports it. Source: https://trac.ffmpeg.org/wiki/Encode/AAC Make backups. I am not liable if you loose anything. Make sure you have setup mountpoints correctly! --- **Credit:** Thanks to [dymk](https://github.com/dymk) for the original Dockerfile. --- ### Example <details><summary>Example Compose</summary> <p> ```yaml services: audiobookshelf: build: context: . dockerfile: Dockerfile args: AUDIOBOOKSHELF_TAG: latest # ABS runs on port 13378 by default. If you want to change # the port, only change the external port, not the internal port ports: - 13378:80 volumes: # These volumes are needed to keep your library persistent # and allow media to be accessed by the ABS server. # The path to the left of the colon is the path on your computer, # and the path to the right of the colon is where the data is # available to ABS in Docker. # You can change these media directories or add as many as you want - ./audiobooks:/audiobooks - ./podcasts:/podcasts # The metadata directory can be stored anywhere on your computer - ./metadata:/metadata # The config directory needs to be on the same physical machine # you are running ABS on - ./config:/config restart: unless-stopped # You can use the following user directive to run the ABS # docker container as a specific user. You will need to change # the UID and GID to the correct values for your user. # user: 1000:1000 ``` </p> </details>
Author
Owner

@jostyee commented on GitHub (May 4, 2025):

If you need xHE-AAC support (required for some files in Libation), you can use a custom Dockerfile based on dymk’s work. This version adds a setting for the AUDIOBOOKSHELF_TAG (ABS tag). Note: The build process will take some time.

Steps

1. Download the Dockerfile

Make sure you are in your docker-compose folder, then run:

curl -o Dockerfile "https://gist.githubusercontent.com/Vito0912/55851304c3dc271dbfc3961a628fd495/raw/128338f7fa303cbcbe395b05a97eb5f2907162d7/Dockerfile"

or

wget -O Dockerfile "https://gist.githubusercontent.com/Vito0912/55851304c3dc271dbfc3961a628fd495/raw/128338f7fa303cbcbe395b05a97eb5f2907162d7/Dockerfile"

Please check the downloaded file to ensure it looks correct.

2. Update your docker-compose.yml

* **Remove** the `image:` line from your service definition.

* **Add** the following `build:` section:

build:
context: .
dockerfile: Dockerfile
args:
AUDIOBOOKSHELF_TAG: ${AUDIOBOOKSHELF_TAG_VAR:-latest}

You can set AUDIOBOOKSHELF_TAG to a specific version (e.g., 2.21.0), edge, or leave it as latest (the default).

3. Build and Run

docker compose up -d

To update when a new ABS version is released, run:

docker compose build
docker compose up -d

Note:
docker compose pull will no longer update the image with this setup, since you are building locally.

Additional Notes

* I have not tested playback with xHE-AAC files, as I do not have any. The build process completes successfully, and [dymk](https://github.com/dymk) reports that his builds seemed to work. So I assume it will also work for this.

Distributing an ffmpeg build with fdk-aac may violate licensing terms. Sharing a pre-built image could be problematic. - So that's why I do not provide a finsihed image

The license of libfdk_aac is not compatible with GPL, so the GPL does not permit distribution of binaries containing incompatible code when GPL-licensed code is also included. Therefore this encoder have been designated as "non-free", and you cannot download a pre-built ffmpeg that supports it.
Source: https://trac.ffmpeg.org/wiki/Encode/AAC

Make backups. I am not liable if you loose anything. Make sure you have setup mountpoints correctly!

Credit: Thanks to dymk for the original Dockerfile.

Example

Example Compose

services:
audiobookshelf:
build:
context: .
dockerfile: Dockerfile
args:
AUDIOBOOKSHELF_TAG: latest

# ABS runs on port 13378 by default. If you want to change
# the port, only change the external port, not the internal port
ports:
  - 13378:80
volumes:
  # These volumes are needed to keep your library persistent
  # and allow media to be accessed by the ABS server.
  # The path to the left of the colon is the path on your computer,
  # and the path to the right of the colon is where the data is
  # available to ABS in Docker.
  # You can change these media directories or add as many as you want
  - ./audiobooks:/audiobooks
  - ./podcasts:/podcasts
  # The metadata directory can be stored anywhere on your computer
  - ./metadata:/metadata
  # The config directory needs to be on the same physical machine
  # you are running ABS on
  - ./config:/config
restart: unless-stopped
# You can use the following user directive to run the ABS
# docker container as a specific user. You will need to change
# the UID and GID to the correct values for your user.
# user: 1000:1000

With this build I can successfully stream playing my audible rips, only issue is audiobookshelf keeps outputting the below error:

audiobookshelf  | [2025-05-04 16:02:31.679] ERROR: [LibraryItemController] Failed to download file "/audible/foo.m4b" Error: write EPIPE
audiobookshelf  |     at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:95:16) {
audiobookshelf  |   errno: -32,
audiobookshelf  |   code: 'EPIPE',
audiobookshelf  |   syscall: 'write'
audiobookshelf  | }

Updated: Apparently it's an incompatibility issue with the Plappa iOS client.

@jostyee commented on GitHub (May 4, 2025): > If you need xHE-AAC support (required for some files in [Libation](https://github.com/rmcrackan/Libation/issues/1228)), you can use a custom Dockerfile based on [dymk’s work](https://github.com/dymk). This version adds a setting for the `AUDIOBOOKSHELF_TAG` (ABS tag). **Note:** The build process will take some time. > ### Steps > > **1. Download the Dockerfile** > > Make sure you are in your `docker-compose` folder, then run: > > curl -o Dockerfile "https://gist.githubusercontent.com/Vito0912/55851304c3dc271dbfc3961a628fd495/raw/128338f7fa303cbcbe395b05a97eb5f2907162d7/Dockerfile" > > or > > wget -O Dockerfile "https://gist.githubusercontent.com/Vito0912/55851304c3dc271dbfc3961a628fd495/raw/128338f7fa303cbcbe395b05a97eb5f2907162d7/Dockerfile" > > _Please check the downloaded file to ensure it looks correct._ > > **2. Update your `docker-compose.yml`** > > * **Remove** the `image:` line from your service definition. > > * **Add** the following `build:` section: > > > build: > context: . > dockerfile: Dockerfile > args: > AUDIOBOOKSHELF_TAG: ${AUDIOBOOKSHELF_TAG_VAR:-latest} > > You can set `AUDIOBOOKSHELF_TAG` to a specific version (e.g., `2.21.0`), `edge`, or leave it as `latest` (the default). > > **3. Build and Run** > > docker compose up -d > > To update when a new ABS version is released, run: > > docker compose build > docker compose up -d > > > **Note:** > > `docker compose pull` will no longer update the image with this setup, since you are building locally. > > ### Additional Notes > > * I have not tested playback with xHE-AAC files, as I do not have any. The build process completes successfully, and [dymk](https://github.com/dymk) reports that his builds seemed to work. So I assume it will also work for this. > > > _Distributing an ffmpeg build with fdk-aac may violate licensing terms. Sharing a pre-built image could be problematic._ - So that's why I do not provide a finsihed image > > > The license of libfdk_aac is not compatible with GPL, so the GPL does not permit distribution of binaries containing incompatible code when GPL-licensed code is also included. Therefore this encoder have been designated as "non-free", and you cannot download a pre-built ffmpeg that supports it. > > Source: https://trac.ffmpeg.org/wiki/Encode/AAC > > Make backups. I am not liable if you loose anything. Make sure you have setup mountpoints correctly! > > **Credit:** Thanks to [dymk](https://github.com/dymk) for the original Dockerfile. > ### Example > Example Compose > > services: > audiobookshelf: > build: > context: . > dockerfile: Dockerfile > args: > AUDIOBOOKSHELF_TAG: latest > > # ABS runs on port 13378 by default. If you want to change > # the port, only change the external port, not the internal port > ports: > - 13378:80 > volumes: > # These volumes are needed to keep your library persistent > # and allow media to be accessed by the ABS server. > # The path to the left of the colon is the path on your computer, > # and the path to the right of the colon is where the data is > # available to ABS in Docker. > # You can change these media directories or add as many as you want > - ./audiobooks:/audiobooks > - ./podcasts:/podcasts > # The metadata directory can be stored anywhere on your computer > - ./metadata:/metadata > # The config directory needs to be on the same physical machine > # you are running ABS on > - ./config:/config > restart: unless-stopped > # You can use the following user directive to run the ABS > # docker container as a specific user. You will need to change > # the UID and GID to the correct values for your user. > # user: 1000:1000 With this build I can successfully stream playing my audible rips, only issue is audiobookshelf keeps outputting the below error: ``` audiobookshelf | [2025-05-04 16:02:31.679] ERROR: [LibraryItemController] Failed to download file "/audible/foo.m4b" Error: write EPIPE audiobookshelf | at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:95:16) { audiobookshelf | errno: -32, audiobookshelf | code: 'EPIPE', audiobookshelf | syscall: 'write' audiobookshelf | } ``` Updated: Apparently it's an incompatibility issue with the Plappa iOS client.
Author
Owner

@Vito0912 commented on GitHub (May 4, 2025):

I started a discussion here: https://github.com/advplyr/audiobookshelf/discussions/4258
Could you please post the issue as a new thread? This will make it easier to follow and will avoid sending unwanted notifications to people in the current issue.

PS: Do you use plappa? (Would be nice to know in the new thread)

@Vito0912 commented on GitHub (May 4, 2025): I started a discussion here: https://github.com/advplyr/audiobookshelf/discussions/4258 Could you please post the issue as a new thread? This will make it easier to follow and will avoid sending unwanted notifications to people in the current issue. PS: Do you use plappa? (Would be nice to know in the new thread)
Author
Owner

@jostyee commented on GitHub (May 4, 2025):

I started a discussion here: #4258 Could you please post the issue as a new thread? This will make it easier to follow and will avoid sending unwanted notifications to people in the current issue.

Ok will do, thanks.

PS: Do you use plappa? (Would be nice to know in the new thread)

Haha just updated my comment. ShelfPlayer doesn't have this issue.

@jostyee commented on GitHub (May 4, 2025): > I started a discussion here: [#4258](https://github.com/advplyr/audiobookshelf/discussions/4258) Could you please post the issue as a new thread? This will make it easier to follow and will avoid sending unwanted notifications to people in the current issue. Ok will do, thanks. > PS: Do you use plappa? (Would be nice to know in the new thread) Haha just updated my comment. ShelfPlayer doesn't have this issue.
Author
Owner

@praetorxyn commented on GitHub (May 22, 2025):

I'm not sure if updating a few weeks old thread is the best thing to do or not, but I stumbled upon this due to a cue issue, ironically, and it does seem related.
For Knife of Dreams, Wheel of Time book 11, if Widevine DRM is checked, the cuesheet Libtation generates is perfect. If Widevine DRM is unchecked, the cuesheet is wrong, so while the file is perfectly playable in Audiobookshelf, it has the wrong chapter information, and the Opening Credits and Epigraph chapters are merged into the Prologue, so I don't think it's possible to fix the chapter metadata in the Audiobookshelf lookup UI as there are missing chapters.

I don't know why the cuesheet generated would be different whether Widevine was used or not, but that seems to be the case.

I could download all the books with widevine just as an extra copy to have better cuesheets apparently, then overwrite cuesheets if I find another bad one, but that's not particularly scalable.

@praetorxyn commented on GitHub (May 22, 2025): I'm not sure if updating a few weeks old thread is the best thing to do or not, but I stumbled upon this due to a cue issue, ironically, and it does seem related. For Knife of Dreams, Wheel of Time book 11, if Widevine DRM is checked, the cuesheet Libtation generates is perfect. If Widevine DRM is unchecked, the cuesheet is wrong, so while the file is perfectly playable in Audiobookshelf, it has the wrong chapter information, and the Opening Credits and Epigraph chapters are merged into the Prologue, so I don't think it's possible to fix the chapter metadata in the Audiobookshelf lookup UI as there are missing chapters. I don't know why the cuesheet generated would be different whether Widevine was used or not, but that seems to be the case. I could download all the books with widevine just as an extra copy to have better cuesheets apparently, then overwrite cuesheets if I find another bad one, but that's not particularly scalable.
Author
Owner

@ebb-earl-co commented on GitHub (May 22, 2025):

I'm not sure if updating a few weeks old thread is the best thing to do or not, but I stumbled upon this due to a cue issue, ironically, and it does seem related. For Knife of Dreams, Wheel of Time book 11, if Widevine DRM is checked, the cuesheet Libtation generates is perfect. If Widevine DRM is unchecked, the cuesheet is wrong, so while the file is perfectly playable in Audiobookshelf, it has the wrong chapter information, and the Opening Credits and Epigraph chapters are merged into the Prologue, so I don't think it's possible to fix the chapter metadata in the Audiobookshelf lookup UI as there are missing chapters.

I don't know why the cuesheet generated would be different whether Widevine was used or not, but that seems to be the case.

I could download all the books with widevine just as an extra copy to have better cuesheets apparently, then overwrite cuesheets if I find another bad one, but that's not particularly scalable.

Now that you say this, I was wondering why Words of Radiance by Brandon Sanderson wasn’t lining up with the chapter timestamps, but I bet it’s this same issue.

@ebb-earl-co commented on GitHub (May 22, 2025): > I'm not sure if updating a few weeks old thread is the best thing to do or not, but I stumbled upon this due to a cue issue, ironically, and it does seem related. For Knife of Dreams, Wheel of Time book 11, if Widevine DRM is checked, the cuesheet Libtation generates is perfect. If Widevine DRM is unchecked, the cuesheet is wrong, so while the file is perfectly playable in Audiobookshelf, it has the wrong chapter information, and the Opening Credits and Epigraph chapters are merged into the Prologue, so I don't think it's possible to fix the chapter metadata in the Audiobookshelf lookup UI as there are missing chapters. > > I don't know why the cuesheet generated would be different whether Widevine was used or not, but that seems to be the case. > > I could download all the books with widevine just as an extra copy to have better cuesheets apparently, then overwrite cuesheets if I find another bad one, but that's not particularly scalable. Now that you say this, I was wondering why _Words of Radiance_ by Brandon Sanderson wasn’t lining up with the chapter timestamps, but I bet it’s this same issue.
Author
Owner

@praetorxyn commented on GitHub (May 22, 2025):

I'm not sure if updating a few weeks old thread is the best thing to do or not, but I stumbled upon this due to a cue issue, ironically, and it does seem related. For Knife of Dreams, Wheel of Time book 11, if Widevine DRM is checked, the cuesheet Libtation generates is perfect. If Widevine DRM is unchecked, the cuesheet is wrong, so while the file is perfectly playable in Audiobookshelf, it has the wrong chapter information, and the Opening Credits and Epigraph chapters are merged into the Prologue, so I don't think it's possible to fix the chapter metadata in the Audiobookshelf lookup UI as there are missing chapters.
I don't know why the cuesheet generated would be different whether Widevine was used or not, but that seems to be the case.
I could download all the books with widevine just as an extra copy to have better cuesheets apparently, then overwrite cuesheets if I find another bad one, but that's not particularly scalable.

Now that you say this, I was wondering why Words of Radiance by Brandon Sanderson wasn’t lining up with the chapter timestamps, but I bet it’s this same issue.

I can at least confirm that the cue sheet seems irrelevant. I would posit that the problem is Libation downloading a book that has bad chapters in it or misreading chapter markers in the download / decryption / conversion process, then generating a bad cuesheet form that. I did the following test:

  1. Delete library in Audiobookshelf.
  2. Download all books as Widevine and use GNU find to recursively copy the folder structure with only the cue files being kept to another folder.
  3. Delete all books, disable Widevine in Libation, and mark all as Not Downloaded so it would download again.
  4. Use rsync to copy the backed up cue sheets over the ones Libation generated.
  5. Re-create library in Audiobookshhelf and scan.
  6. Audiobookshelf still showed the bad chapters.
    Next:
  7. I deleted and redownloaded the books again, then after scanning in Audiobookshelf, I went to the book, Edit > Chapters > Edit Chapters > Lookup > Search to lookup the chapter info.
  8. At this point, I'd previously tried Match Chapter Titles, which didn't work as I was missing chapters, but Apply Chapters DOES seem to fix them properly. I'm not sure if Libation will pack that up as a change and "fix" it again later, so I may have to have it download to a staging folder to avoid it doing that, we'll see.

So that's on me for misunderstanding the chapter edit UI I think.

@praetorxyn commented on GitHub (May 22, 2025): > > I'm not sure if updating a few weeks old thread is the best thing to do or not, but I stumbled upon this due to a cue issue, ironically, and it does seem related. For Knife of Dreams, Wheel of Time book 11, if Widevine DRM is checked, the cuesheet Libtation generates is perfect. If Widevine DRM is unchecked, the cuesheet is wrong, so while the file is perfectly playable in Audiobookshelf, it has the wrong chapter information, and the Opening Credits and Epigraph chapters are merged into the Prologue, so I don't think it's possible to fix the chapter metadata in the Audiobookshelf lookup UI as there are missing chapters. > > I don't know why the cuesheet generated would be different whether Widevine was used or not, but that seems to be the case. > > I could download all the books with widevine just as an extra copy to have better cuesheets apparently, then overwrite cuesheets if I find another bad one, but that's not particularly scalable. > > Now that you say this, I was wondering why _Words of Radiance_ by Brandon Sanderson wasn’t lining up with the chapter timestamps, but I bet it’s this same issue. I can at least confirm that the cue sheet seems irrelevant. I would posit that the problem is Libation downloading a book that has bad chapters in it or misreading chapter markers in the download / decryption / conversion process, then generating a bad cuesheet form that. I did the following test: 1. Delete library in Audiobookshelf. 2. Download all books as Widevine and use GNU find to recursively copy the folder structure with only the cue files being kept to another folder. 3. Delete all books, disable Widevine in Libation, and mark all as Not Downloaded so it would download again. 4. Use rsync to copy the backed up cue sheets over the ones Libation generated. 5. Re-create library in Audiobookshhelf and scan. 6. Audiobookshelf still showed the bad chapters. Next: 1. I deleted and redownloaded the books again, then after scanning in Audiobookshelf, I went to the book, Edit > Chapters > Edit Chapters > Lookup > Search to lookup the chapter info. 2. At this point, I'd previously tried Match Chapter Titles, which didn't work as I was missing chapters, but Apply Chapters DOES seem to fix them properly. I'm not sure if Libation will pack that up as a change and "fix" it again later, so I may have to have it download to a staging folder to avoid it doing that, we'll see. So that's on me for misunderstanding the chapter edit UI I think.
Author
Owner

@Vito0912 commented on GitHub (May 22, 2025):

Hey,

Could we please keep issues related to their specific topic?

It makes things difficult for everyone because everyone gets a notification. Also, people who have the same issue later will have a hard time finding relevant information.

If this is an issue with ABS, please open a new issue to keep things organized.


But this does not look like an error with ABS at all. As far as I know, Libation embeds chapter information into the file. Thus, the cue file is only that helpful

Also just a note: Updating the chapters in abs does not touch the file unless you embed the data manually via the settings, so you should be fine.

I suspect that either Libation does not use the chapter information for normal licenses (because chapter positions for Widevine (or generally insert any) and "normal" licenses differ) or that Audible made a mistake for the chapters with no widevine.

I can check if you send me an ASIN for a book that has this issue, but please do not send it in this thread. Send it via Discord or email instead.

Either way that sounds like an issue from Libation/Audible

@Vito0912 commented on GitHub (May 22, 2025): Hey, Could we please keep issues related to their specific topic? It makes things difficult for everyone because everyone gets a notification. Also, people who have the same issue later will have a hard time finding relevant information. If this is an issue with ABS, please open a new issue to keep things organized. --- But this does not look like an error with ABS at all. As far as I know, Libation embeds chapter information into the file. Thus, the cue file is only that helpful Also just a note: Updating the chapters in abs does not touch the file unless you embed the data manually via the settings, so you should be fine. I suspect that either Libation does not use the chapter information for normal licenses (because chapter positions for Widevine (or generally insert any) and "normal" licenses differ) or that Audible made a mistake for the chapters with no widevine. I can check if you send me an ASIN for a book that has this issue, but please do not send it in this thread. Send it via Discord or email instead. Either way that sounds like an issue from Libation/Audible
Author
Owner

@jostyee commented on GitHub (May 22, 2025):

@praetorxyn does it have sth to do with this? https://github.com/rmcrackan/Libation/issues/1246#issuecomment-2861824791

@jostyee commented on GitHub (May 22, 2025): @praetorxyn does it have sth to do with this? https://github.com/rmcrackan/Libation/issues/1246#issuecomment-2861824791
Author
Owner

@extesy commented on GitHub (Dec 27, 2025):

I think this works now. I don't know which exact commit fixed it, but the latest release seems to recognize xHE-AAC audiobooks.

@extesy commented on GitHub (Dec 27, 2025): I think this works now. I don't know which exact commit fixed it, but the latest release seems to recognize `xHE-AAC` audiobooks.
Author
Owner

@nichwall commented on GitHub (Dec 27, 2025):

I think this works now. I don't know which exact commit fixed it, but the latest release seems to recognize xHE-AAC audiobooks.

There has been no change to codec support. As mentioned in the previous comments, this is still not supported by the server for transcoding.

Correction: this may now be supported by the ABS docker container due to Alpine now using ffmpeg 8.0.1 instead of the older ffmpeg 5/6 (more details in https://github.com/advplyr/audiobookshelf/discussions/4258#discussioncomment-15350404). I can't test this because I don't have any xHE-AAC files, but if more people can verify we may be able to close this as fixed in server 2.32.1.

@nichwall commented on GitHub (Dec 27, 2025): > I think this works now. I don't know which exact commit fixed it, but the latest release seems to recognize `xHE-AAC` audiobooks. ~~There has been no change to codec support. As mentioned in the previous comments, this is still not supported by the server for transcoding.~~ Correction: this may now be supported by the ABS docker container due to Alpine now using ffmpeg 8.0.1 instead of the older ffmpeg 5/6 (more details in https://github.com/advplyr/audiobookshelf/discussions/4258#discussioncomment-15350404). I can't test this because I don't have any xHE-AAC files, but if more people can verify we may be able to close this as fixed in server 2.32.1.
Author
Owner

@elevul commented on GitHub (Dec 27, 2025):

I think this works now. I don't know which exact commit fixed it, but the latest release seems to recognize xHE-AAC audiobooks.

There has been no change to codec support. As mentioned in the previous comments, this is still not supported by the server for transcoding.

Correction: this may now be supported by the ABS docker container due to Alpine now using ffmpeg 8.0.1 instead of the older ffmpeg 5/6 (more details in #4258 (reply in thread)). I can't test this because I don't have any xHE-AAC files, but if more people can verify we may be able to close this as fixed in server 2.32.1.

Yeah, it has been mentioned by a user on reddit as well: https://old.reddit.com/r/audiobookshelf/comments/1pwjhtv/psa_audiobookshelf_abs_seems_to_play_xheaac_usac/

That said, if I understand the code correctly, this would only apply to Docker, as the code specifically skips the binaries check if running in docker:

    /**
     * Docker container ffmpeg/ffprobe binaries are included in the image.
     * Docker is currently using ffmpeg/ffprobe v6.1 instead of v5.1 so skipping the check
     * TODO: Support binary check for all sources
     */
    if (global.Source !== 'docker') {
      await this.binaryManager.init()
    }

But not if directly installed (Windows/Linux):

class BinaryManager {
  defaultRequiredBinaries = [
    new Binary('ffmpeg', 'executable', 'FFMPEG_PATH', ['5.1'], ffbinaries), // ffmpeg executable
    new Binary('ffprobe', 'executable', 'FFPROBE_PATH', ['5.1'], ffbinaries), // ffprobe executable
    new Binary('libnusqlite3', 'library', 'NUSQLITE3_PATH', ['1.2'], nunicode, false) // nunicode sqlite3 extension
  ]

So arguably it wouldn't really be fixed for anything other than Docker unless the next releases stop forcing the check for the ancient version of ffmpeg and just use the ffmpeg binaries from environmental variables on either OS.

It's something I worked around on Windows by forcing SKIP_BINARIES_CHECK, but I honestly think that Audiobookshelf should just check ENVs and use binaries from there by default if present:
https://github.com/mikiher/audiobookshelf-windows/issues/57#issuecomment-3691832084

Or perhaps it would be time to remove the version check entirely from the code and update the source from which it's downloading ffmpeg with the one that has the latest version?

@elevul commented on GitHub (Dec 27, 2025): > > I think this works now. I don't know which exact commit fixed it, but the latest release seems to recognize `xHE-AAC` audiobooks. > > ~There has been no change to codec support. As mentioned in the previous comments, this is still not supported by the server for transcoding.~ > > Correction: this may now be supported by the ABS docker container due to Alpine now using ffmpeg 8.0.1 instead of the older ffmpeg 5/6 (more details in [#4258 (reply in thread)](https://github.com/advplyr/audiobookshelf/discussions/4258#discussioncomment-15350404)). I can't test this because I don't have any xHE-AAC files, but if more people can verify we may be able to close this as fixed in server 2.32.1. Yeah, it has been mentioned by a user on reddit as well: https://old.reddit.com/r/audiobookshelf/comments/1pwjhtv/psa_audiobookshelf_abs_seems_to_play_xheaac_usac/ That said, if I understand the code correctly, this would only apply to Docker, as the code specifically skips the binaries check if running in docker: ``` /** * Docker container ffmpeg/ffprobe binaries are included in the image. * Docker is currently using ffmpeg/ffprobe v6.1 instead of v5.1 so skipping the check * TODO: Support binary check for all sources */ if (global.Source !== 'docker') { await this.binaryManager.init() } ``` But not if directly installed (Windows/Linux): ``` class BinaryManager { defaultRequiredBinaries = [ new Binary('ffmpeg', 'executable', 'FFMPEG_PATH', ['5.1'], ffbinaries), // ffmpeg executable new Binary('ffprobe', 'executable', 'FFPROBE_PATH', ['5.1'], ffbinaries), // ffprobe executable new Binary('libnusqlite3', 'library', 'NUSQLITE3_PATH', ['1.2'], nunicode, false) // nunicode sqlite3 extension ] ``` So arguably it wouldn't really be fixed for anything other than Docker unless the next releases stop forcing the check for the ancient version of ffmpeg and just use the ffmpeg binaries from environmental variables on either OS. It's something I worked around on Windows by forcing SKIP_BINARIES_CHECK, but I honestly think that Audiobookshelf should just check ENVs and use binaries from there by default if present: https://github.com/mikiher/audiobookshelf-windows/issues/57#issuecomment-3691832084 Or perhaps it would be time to remove the version check entirely from the code and update the source from which it's downloading ffmpeg with the one that has the latest version?
Author
Owner

@nichwall commented on GitHub (Dec 27, 2025):

Yeah, it has been mentioned by a user on reddit as well: https://old.reddit.com/r/audiobookshelf/comments/1pwjhtv/psa_audiobookshelf_abs_seems_to_play_xheaac_usac/

Yeah. I was copying and pasting my explanation into 4 different threads, so probably see some duplicate information.

That said, if I understand the code correctly, this would only apply to Docker, as the code specifically skips the binaries check if running in docker:

    /**
     * Docker container ffmpeg/ffprobe binaries are included in the image.
     * Docker is currently using ffmpeg/ffprobe v6.1 instead of v5.1 so skipping the check
     * TODO: Support binary check for all sources
     */
    if (global.Source !== 'docker') {
      await this.binaryManager.init()
    }

But not if directly installed (Windows/Linux):

class BinaryManager {
  defaultRequiredBinaries = [
    new Binary('ffmpeg', 'executable', 'FFMPEG_PATH', ['5.1'], ffbinaries), // ffmpeg executable
    new Binary('ffprobe', 'executable', 'FFPROBE_PATH', ['5.1'], ffbinaries), // ffprobe executable
    new Binary('libnusqlite3', 'library', 'NUSQLITE3_PATH', ['1.2'], nunicode, false) // nunicode sqlite3 extension
  ]

So arguably it wouldn't really be fixed for anything other than Docker unless the next releases stop forcing the check for the ancient version of ffmpeg and just use the ffmpeg binaries from environmental variables on either OS.

Yes, that is correct. We specifically used 5.1 because there were issues with ffmpeg 6 that reported so we stuck with the old version so we stopped getting bug reports of issues caused by the ffmpeg version updating. I believe someone had done some testing with ffmpeg 7/8 a few months ago but ran into issues as well, but I'm not seeing where that was right now.

It's something I worked around on Windows by forcing SKIP_BINARIES_CHECK, but I honestly thing that Audiobookshelf should just check ENVs and use binaries from there by default if present:
https://github.com/mikiher/audiobookshelf-windows/issues/57#issuecomment-3691832084

Or perhaps it would be time to remove the version check entirely from the code and update the source from which it's downloading ffmpeg with the latest versions?

Probably, depends on if other issues are found with ffmpeg 8.0.1

@nichwall commented on GitHub (Dec 27, 2025): > Yeah, it has been mentioned by a user on reddit as well: https://old.reddit.com/r/audiobookshelf/comments/1pwjhtv/psa_audiobookshelf_abs_seems_to_play_xheaac_usac/ Yeah. I was copying and pasting my explanation into 4 different threads, so probably see some duplicate information. > That said, if I understand the code correctly, this would only apply to Docker, as the code specifically skips the binaries check if running in docker: > > ``` > /** > * Docker container ffmpeg/ffprobe binaries are included in the image. > * Docker is currently using ffmpeg/ffprobe v6.1 instead of v5.1 so skipping the check > * TODO: Support binary check for all sources > */ > if (global.Source !== 'docker') { > await this.binaryManager.init() > } > ``` > > But not if directly installed (Windows/Linux): > > ``` > class BinaryManager { > defaultRequiredBinaries = [ > new Binary('ffmpeg', 'executable', 'FFMPEG_PATH', ['5.1'], ffbinaries), // ffmpeg executable > new Binary('ffprobe', 'executable', 'FFPROBE_PATH', ['5.1'], ffbinaries), // ffprobe executable > new Binary('libnusqlite3', 'library', 'NUSQLITE3_PATH', ['1.2'], nunicode, false) // nunicode sqlite3 extension > ] > ``` > > So arguably it wouldn't really be fixed for anything other than Docker unless the next releases stop forcing the check for the ancient version of ffmpeg and just use the ffmpeg binaries from environmental variables on either OS. Yes, that is correct. We specifically used 5.1 because there were issues with ffmpeg 6 that reported so we stuck with the old version so we stopped getting bug reports of issues caused by the ffmpeg version updating. I believe someone had done some testing with ffmpeg 7/8 a few months ago but ran into issues as well, but I'm not seeing where that was right now. > It's something I worked around on Windows by forcing SKIP_BINARIES_CHECK, but I honestly thing that Audiobookshelf should just check ENVs and use binaries from there by default if present: > https://github.com/mikiher/audiobookshelf-windows/issues/57#issuecomment-3691832084 > > Or perhaps it would be time to remove the version check entirely from the code and update the source from which it's downloading ffmpeg with the latest versions? Probably, depends on if other issues are found with ffmpeg 8.0.1
Author
Owner

@elevul commented on GitHub (Dec 27, 2025):

Yes, that is correct. We specifically used 5.1 because there were issues with ffmpeg 6 that reported so we stuck with the old version so we stopped getting bug reports of issues caused by the ffmpeg version updating. I believe someone had done some testing with ffmpeg 7/8 a few months ago but ran into issues as well, but I'm not seeing where that was right now.

Probably, depends on if other issues are found with ffmpeg 8.0.1

While the reasoning is understandable, it would be perhaps a good idea then to provide a clear explanation of the issue in the docs and then provide an easy way for users (who accept that specific issue) to force the usage of a newer version (Perhaps by only specifying FFMPEG_PATH and FFPROBE_PATH in the environmental variables?) if they require support for xHE-AAC.

@elevul commented on GitHub (Dec 27, 2025): > Yes, that is correct. We specifically used 5.1 because there were issues with ffmpeg 6 that reported so we stuck with the old version so we stopped getting bug reports of issues caused by the ffmpeg version updating. I believe someone had done some testing with ffmpeg 7/8 a few months ago but ran into issues as well, but I'm not seeing where that was right now. > > Probably, depends on if other issues are found with ffmpeg 8.0.1 While the reasoning is understandable, it would be perhaps a good idea then to provide a clear explanation of the issue in the docs and then provide an easy way for users (who accept that specific issue) to force the usage of a newer version (Perhaps by only specifying FFMPEG_PATH and FFPROBE_PATH in the environmental variables?) if they require support for xHE-AAC.
Author
Owner

@Vito0912 commented on GitHub (Dec 27, 2025):

I just think we should try upgrading ffmpeg.
The used source does not provide any new ffmpeg versions, which I believe contributes that newer versions never where tried.

I had noone contact me that the proposed unofficial workaround did not work and it would also be weird for ffmpeg to break something.
Maybe to be super careful we could add an ENV that reverts back for few if they have issues.
Idk in which thread I wrote it, but it bothers me a bit anyway that we use an that outdated ffmpeg version. (But I am just a contributer).

I will check later today if a test xHE file will work and report back then.


I don't remember the issues with newer versions, so if that is true that's another topic then. But I for myself, daily drive ABS and ran the workaround myself for some time and had no issues. (but that ofc is a very little sampling rate xD)

@Vito0912 commented on GitHub (Dec 27, 2025): I just think we should try upgrading ffmpeg. The used source does not provide any new ffmpeg versions, which I believe contributes that newer versions never where tried. I had noone contact me that the proposed unofficial workaround did not work and it would also be weird for ffmpeg to break something. Maybe to be super careful we could add an ENV that reverts back for few if they have issues. Idk in which thread I wrote it, but it bothers me a bit anyway that we use an that outdated ffmpeg version. (But I am just a contributer). I will check later today if a test xHE file will work and report back then. --- I don't remember the issues with newer versions, so if that is true that's another topic then. But I for myself, daily drive ABS and ran the workaround myself for some time and had no issues. (but that ofc is a very little sampling rate xD)
Author
Owner

@Ansem93 commented on GitHub (Dec 28, 2025):

Just update ABS to the latest release and I can confirm! Now it recognize the books I have with xHE-AAC!
The Android app also seems perfectly capable to open them :)

@Ansem93 commented on GitHub (Dec 28, 2025): Just update ABS to the latest release and I can confirm! Now it recognize the books I have with xHE-AAC! The Android app also seems perfectly capable to open them :)
Author
Owner

@elevul commented on GitHub (Dec 28, 2025):

Just update ABS to the latest release and I can confirm! Now it recognize the books I have with xHE-AAC! The Android app also seems perfectly capable to open them :)

Android and iOS have supported xHE-AAC for many years now, and Windows as well since 22h2. That's why it was so frustrating that the limiting factor wasn't playback, but rather Audiobookshelf not being able to add those books to the library for download/play on client devices.

@elevul commented on GitHub (Dec 28, 2025): > Just update ABS to the latest release and I can confirm! Now it recognize the books I have with xHE-AAC! The Android app also seems perfectly capable to open them :) Android and iOS have supported xHE-AAC for many years now, and Windows as well since 22h2. That's why it was so frustrating that the limiting factor wasn't playback, but rather Audiobookshelf not being able to add those books to the library for download/play on client devices.
Author
Owner

@advplyr commented on GitHub (Dec 28, 2025):

There was an issue with ffprobe 6.1 where it failed to probe some mp3 files. I can't remember the specific details but I was able to reproduce it at the time. That was over 18 months ago so we should look at updating to ffmpeg 8 now.
https://github.com/advplyr/audiobookshelf/issues/2689#issuecomment-1998534247

@advplyr commented on GitHub (Dec 28, 2025): There was an issue with ffprobe 6.1 where it failed to probe some mp3 files. I can't remember the specific details but I was able to reproduce it at the time. That was over 18 months ago so we should look at updating to ffmpeg 8 now. https://github.com/advplyr/audiobookshelf/issues/2689#issuecomment-1998534247
Author
Owner

@elevul commented on GitHub (Feb 6, 2026):

There was an issue with ffprobe 6.1 where it failed to probe some mp3 files. I can't remember the specific details but I was able to reproduce it at the time. That was over 18 months ago so we should look at updating to ffmpeg 8 now. #2689 (comment)

Hi, are there any news on this change? Is there an ETA on when the ffmpeg version in audiobookshelf will be uncapped or increased to version 8?

@elevul commented on GitHub (Feb 6, 2026): > There was an issue with ffprobe 6.1 where it failed to probe some mp3 files. I can't remember the specific details but I was able to reproduce it at the time. That was over 18 months ago so we should look at updating to ffmpeg 8 now. [#2689 (comment)](https://github.com/advplyr/audiobookshelf/issues/2689#issuecomment-1998534247) Hi, are there any news on this change? Is there an ETA on when the ffmpeg version in audiobookshelf will be uncapped or increased to version 8?
Author
Owner

@H2OKing89 commented on GitHub (Feb 6, 2026):

Their docker image is shipping with V8

https://github.com/advplyr/audiobookshelf/discussions/4258#discussioncomment-15350296

There was an issue with ffprobe 6.1 where it failed to probe some mp3 files. I can't remember the specific details but I was able to reproduce it at the time. That was over 18 months ago so we should look at updating to ffmpeg 8 now. #2689 (comment)

Hi, are there any news on this change? Is there an ETA on when the ffmpeg version in audiobookshelf will be uncapped or increased to version 8?

@H2OKing89 commented on GitHub (Feb 6, 2026): Their docker image is shipping with V8 https://github.com/advplyr/audiobookshelf/discussions/4258#discussioncomment-15350296 > > There was an issue with ffprobe 6.1 where it failed to probe some mp3 files. I can't remember the specific details but I was able to reproduce it at the time. That was over 18 months ago so we should look at updating to ffmpeg 8 now. [#2689 (comment)](https://github.com/advplyr/audiobookshelf/issues/2689#issuecomment-1998534247) > > Hi, are there any news on this change? Is there an ETA on when the ffmpeg version in audiobookshelf will be uncapped or increased to version 8?
Author
Owner

@elevul commented on GitHub (Feb 19, 2026):

Their docker image is shipping with V8

#4258 (comment)

There was an issue with ffprobe 6.1 where it failed to probe some mp3 files. I can't remember the specific details but I was able to reproduce it at the time. That was over 18 months ago so we should look at updating to ffmpeg 8 now. #2689 (comment)

Hi, are there any news on this change? Is there an ETA on when the ffmpeg version in audiobookshelf will be uncapped or increased to version 8?

That does not address not-docker installs, and is tangential regardless as it's dependent on the Alpine image rather than any change/decision on the part of ABS.

@elevul commented on GitHub (Feb 19, 2026): > Their docker image is shipping with V8 > > [#4258 (comment)](https://github.com/advplyr/audiobookshelf/discussions/4258#discussioncomment-15350296) > > > > There was an issue with ffprobe 6.1 where it failed to probe some mp3 files. I can't remember the specific details but I was able to reproduce it at the time. That was over 18 months ago so we should look at updating to ffmpeg 8 now. [#2689 (comment)](https://github.com/advplyr/audiobookshelf/issues/2689#issuecomment-1998534247) > > > > > > Hi, are there any news on this change? Is there an ETA on when the ffmpeg version in audiobookshelf will be uncapped or increased to version 8? That does not address not-docker installs, and is tangential regardless as it's dependent on the Alpine image rather than any change/decision on the part of ABS.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#2738