[Enhancement]: Option to turn off backup of original audio file during metadata embed #868

Closed
opened 2026-04-24 23:24:43 +02:00 by adam · 2 comments
Owner

Originally created by @ceramicwhite on GitHub (Jan 6, 2023).

Describe the feature/enhancement

The request for this enhancement isn't due to laziness in remembering to purge items cache but rather one of my libraries is remote from where I host my ABS server.

I run ABS on my VPS but the storage capacity is limited, so rather than removing for example large series I know friends and family aren't currently listening to, I store them on my NAS at home and mount the drive to to my VPS using sshfs or rather the docker plugin for it.

Example:

$ docker plugin install vieux/sshfs
$ docker volume create -d vieux/sshfs -o sshcmd=user@my-nas-ip:/mnt/sda/audiobooks -o password=mypassword -o rw remote-books
$ docker volume ls
remote-books

Then docker-compose.yml:

version: "3.7"
services:
  audiobookshelf:
    image: ghcr.io/advplyr/audiobookshelf:2.2.11
    container_name: audiobookshelf
    init: true
    stop_grace_period: 1m
    restart: on-failure
    environment:
      - AUDIOBOOKSHELF_UID=1000
      - AUDIOBOOKSHELF_GID=1000
    ports:
      - 13378:80
    volumes:
      - ./audiobooks:/audiobooks/local
      - ./config:/config
      - ./metadata:/metadata
      - remote-books:/audiobooks/remote

volumes:
  remote-books:
    external: true

Then maybe you setup the libraries as one or separate doesn't matter.
Then when using tone through ABS (which btw I love this feature) to embed metadata on any of the remote books, ABS will first upload a backup of the book to /metadata/cache and then run tone on the original.
It's a lot of bandwidth being used for no reason (I'll take the risk the file becomes corrupt), I also find it fails a lot of the time and a lot of zombie processes are left behind needing to be reaped, hence why tini(init: true) should always be run with the ABS container.

I would add this option only for metadata embed, for the making of m4b's I'd leave the backup in place. I find ffmpeg doesn't play well with commas and apostrophe's and when it fails on ABS I think it may be due to the same reason so when making m4b books locally I use rename and run something like this:

rename "s/'|,//g" *.mp3 && \
ls | grep "mp3" | awk '{printf "file |%s|\n", $0}' | sed -e "s/|/\'/g" > files.txt && \
ffmpeg -safe 0 -f concat -i files.txt -y -map 0:a -c:a libfdk_aac -ac 1 -b:a 64k -f mp4 output.m4b
Originally created by @ceramicwhite on GitHub (Jan 6, 2023). ### Describe the feature/enhancement The request for this enhancement isn't due to laziness in remembering to purge items cache but rather one of my libraries is remote from where I host my ABS server. I run ABS on my VPS but the storage capacity is limited, so rather than removing for example large series I know friends and family aren't currently listening to, I store them on my NAS at home and mount the drive to to my VPS using sshfs or rather the docker plugin for it. Example: ``` $ docker plugin install vieux/sshfs $ docker volume create -d vieux/sshfs -o sshcmd=user@my-nas-ip:/mnt/sda/audiobooks -o password=mypassword -o rw remote-books $ docker volume ls remote-books ``` Then docker-compose.yml: ``` version: "3.7" services: audiobookshelf: image: ghcr.io/advplyr/audiobookshelf:2.2.11 container_name: audiobookshelf init: true stop_grace_period: 1m restart: on-failure environment: - AUDIOBOOKSHELF_UID=1000 - AUDIOBOOKSHELF_GID=1000 ports: - 13378:80 volumes: - ./audiobooks:/audiobooks/local - ./config:/config - ./metadata:/metadata - remote-books:/audiobooks/remote volumes: remote-books: external: true ``` Then maybe you setup the libraries as one or separate doesn't matter. Then when using tone through ABS (which btw I love this feature) to embed metadata on any of the remote books, ABS will first upload a backup of the book to `/metadata/cache` and then run tone on the original. It's a lot of bandwidth being used for no reason (I'll take the risk the file becomes corrupt), I also find it fails a lot of the time and a lot of zombie processes are left behind needing to be reaped, hence why tini(`init: true`) should always be run with the ABS container. I would add this option only for metadata embed, for the making of m4b's I'd leave the backup in place. I find ffmpeg doesn't play well with commas and apostrophe's and when it fails on ABS I think it may be due to the same reason so when making m4b books locally I use rename and run something like this: ``` rename "s/'|,//g" *.mp3 && \ ls | grep "mp3" | awk '{printf "file |%s|\n", $0}' | sed -e "s/|/\'/g" > files.txt && \ ffmpeg -safe 0 -f concat -i files.txt -y -map 0:a -c:a libfdk_aac -ac 1 -b:a 64k -f mp4 output.m4b ```
adam added the enhancement label 2026-04-24 23:24:43 +02:00
adam closed this issue 2026-04-24 23:24:44 +02:00
Author
Owner

@advplyr commented on GitHub (Jan 6, 2023):

I agree with this. When this was first launched not long ago I wanted to be extra cautious but now that it has shown itself to be fairly solid we can add this option.

@advplyr commented on GitHub (Jan 6, 2023): I agree with this. When this was first launched not long ago I wanted to be extra cautious but now that it has shown itself to be fairly solid we can add this option.
Author
Owner

@advplyr commented on GitHub (Jan 8, 2023):

Added in v2.2.12

@advplyr commented on GitHub (Jan 8, 2023): Added in [v2.2.12](https://github.com/advplyr/audiobookshelf/releases/tag/v2.2.12)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#868