linuxserver / docker-mods

Documentation and Examples of base container modifications
GNU General Public License v3.0
1.03k stars 272 forks source link

[Error] flac2mp3.sh: Error|/usr/bin/ffmpeg is required by this script #813

Closed Uuugh closed 7 months ago

Uuugh commented 8 months ago

Upon adding the script via Lidarr "Add Connection - Custom Script" I receive the following error [Error] flac2mp3.sh: Error|/usr/bin/ffmpeg is required by this script

It is resolved by entering the Lidarr console and running apk add ffmpeg

I'd suggested either incorporating it in either lidarr-flac2mp3, flac2mp3.sh, or the installation instructions.

Thanks!

My (editted for length) docker compose file:

version: '3.3'
services:
  gluetun:
    image: qmcgaw/gluetun
... 
      - 8686:8686       # Lidarr Music
...
lidarr:
    image: linuxserver/lidarr
    container_name: lidarr
    depends_on:
      gluetun:
        condition: service_healthy
    network_mode: service:gluetun
    environment:
      - PUID=1030
      - PGID=100
      - TZ=America/New_York
      - DOCKER_MODS=linuxserver/mods:lidarr-flac2mp3 # https://github.com/linuxserver/docker-mods/tree/lidarr-flac2mp3
    volumes:
      - /mnt/docker/config/lidarr:/config
      - /mnt/docker/data:/data
      #- /mnt/DSMLUN/config/lidarr:/config
      - /mnt/DSMLUN/data:/data/DSMLUN
      - /mnt/media:/data/NAS
    restart: always
TheCaptain989 commented 8 months ago

I'm not sure what's going on with your install, but this is already included via the Docker Mods dependency functionality that uses S6-rc service manager.

See for yourself: https://github.com/linuxserver/docker-mods/blob/lidarr-flac2mp3/root/etc/s6-overlay/s6-rc.d/init-mod-lidarr-flac2mp3-add-package/run

Check your container logs. There should be lines similar to this:

[mod-init] Adding linuxserver/mods:lidarr-flac2mp3 to container
[mod-init] Downloading linuxserver/mods:lidarr-flac2mp3 from lscr.io
[mod-init] Installing linuxserver/mods:lidarr-flac2mp3
[mod-init] linuxserver/mods:lidarr-flac2mp3 applied to container
[migrations] started
[migrations] no migrations found
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support the app dev(s) visit:
Lidarr: https://opencollective.com/lidarr

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    100
User GID:    100
───────────────────────────────────────

----------------
>>> Flac2MP3 Mod by TheCaptain989 <<<
Repos:
  Dev/test: https://github.com/TheCaptain989/lidarr-flac2mp3
  Prod: https://github.com/linuxserver/docker-mods/tree/lidarr-flac2mp3

Version: 8b21e00
----------------
**** Adding ffmpeg to package install list ****
Changing ownership on /usr/local/bin/flac2mp3-debug-2.sh script.
Changing ownership on /usr/local/bin/flac2mp3-debug.sh script.
Changing ownership on /usr/local/bin/flac2mp3-tags.sh script.
Changing ownership on /usr/local/bin/flac2mp3-vbr.sh script.
Changing ownership on /usr/local/bin/flac2mp3.sh script.
[mod-init] **** Installing all mod packages ****
fetch http://dl-cdn.alpinelinux.org/alpine/v3.18/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.18/community/x86_64/APKINDEX.tar.gz
(1/38) Installing sdl2 (2.26.5-r0)
(2/38) Installing alsa-lib (1.2.9-r1)
(3/38) Installing libexpat (2.5.0-r1)
(4/38) Installing libpng (1.6.39-r3)
(5/38) Installing freetype (2.13.0-r5)
(6/38) Installing fontconfig (2.14.2-r3)
(7/38) Installing fribidi (1.0.13-r0)
(8/38) Installing libblkid (2.38.1-r8)
(9/38) Installing libmount (2.38.1-r8)
(10/38) Installing pcre2 (10.42-r1)
(11/38) Installing glib (2.76.4-r0)
(12/38) Installing graphite2 (1.3.14-r5)
(13/38) Installing harfbuzz (7.3.0-r0)
(14/38) Installing libunibreak (5.1-r0)
(15/38) Installing libass (0.17.1-r0)
(16/38) Installing glslang-libs (1.3.243.0-r1)
(17/38) Installing spirv-tools (1.3.243.0-r1)
(18/38) Installing shaderc (2023.3-r1)
(19/38) Installing vulkan-loader (1.3.243.0-r1)
(20/38) Installing libplacebo (5.264.1-r1)
(21/38) Installing ffmpeg-libpostproc (6.0.1-r0)
(22/38) Installing ffmpeg-libswscale (6.0.1-r0)
(23/38) Installing vidstab (1.1.1-r0)
(24/38) Installing zimg (3.0.5-r0)
(25/38) Installing ffmpeg-libavfilter (6.0.1-r0)
(26/38) Installing libasyncns (0.8-r1)
(27/38) Installing dbus-libs (1.14.8-r0)
(28/38) Installing libltdl (2.4.7-r2)
(29/38) Installing orc (0.4.34-r0)
(30/38) Installing flac-libs (1.4.3-r0)
(31/38) Installing libsndfile (1.2.0-r2)
(32/38) Installing speexdsp (1.2.1-r1)
(33/38) Installing tdb-libs (1.4.8-r1)
(34/38) Installing libpulse (16.1-r10)
(35/38) Installing libjpeg-turbo (2.1.5.1-r3)
(36/38) Installing v4l-utils-libs (1.24.1-r0)
(37/38) Installing ffmpeg-libavdevice (6.0.1-r0)
(38/38) Installing ffmpeg (6.0.1-r0)
Uuugh commented 8 months ago

I see what you mean. But it didn't work for me.

ASRock X570 Taichi | Ryzen 3700x | Kingston KSM32ED8/16HD-DDR4-16 GB (x2) | Kingston KSM26ED8/16ME-DDR4-16 GB (x2)
MSI Radeon RX 560 4GT LP OC GPU | Hauppauge 1229 WinTV-HVR-2255 | LSI SAS9207-8e 8-Port External HBA | Lenovo SA120
-----------
OS: Proxmox VE 8.1.3 x86_64
Host: X570 Taichi
Kernel: 6.5.11-7-pve
Shell: bash 5.2.15
CPU: AMD Ryzen 7 3700X (16) @ 3.600GHz
GPU: AMD ATI Radeon RX 550 640SP / RX 560/560X
Memory:  64214MiB
-----------
OS: Debian GNU/Linux 12 (bookworm) x86_64
Host: KVM/QEMU (Standard PC (i440FX + PIIX, 1996) pc-i440fx-8.1)
Kernel: 6.1.0-17-amd64
CPU: AMD Ryzen 7 3700X (2) @ 3.599GHz
GPU: 00:02.0 Vendor 1234 Device 1111
Memory:  7941MiB
-----------
Client: Docker Engine - Community
 Version:           24.0.7
 API version:       1.43
 Go version:        go1.20.10
 Git commit:        afdd53b
 Built:             Thu Oct 26 09:08:02 2023
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          24.0.7
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.10
  Git commit:       311b9ff
  Built:            Thu Oct 26 09:08:02 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.26
  GitCommit:        3dd1e886e55dd695541fdcd67420c2888645a495
 runc:
  Version:          1.1.10
  GitCommit:        v1.1.10-0-g18a0cb0
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
-----------
version: '3.3'
services:
  gluetun:
    image: qmcgaw/gluetun
    container_name: gluetun
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun:/dev/net/tun
    ports:
      - 8888:8888/tcp   # HTTP proxy
      - 8388:8388/tcp   # Shadowsocks
      - 8388:8388/udp   # Shadowsocks
      - 5800:5800       # firefox
      - 6881:6881       # qbittorrent
      - 6881:6881/udp   # qbittorrent
      - 8080:8080       # qbittorrent console
      - 5055:5055       # Jellyseerr
      - 9696:9696       # Prowlarr
      - 7878:7878       # Radarr Movies
      - 8989:8989       # Sonarr TV
      - 8686:8686       # Lidarr Music
      - 8787:8787       # Readarr Books
      - 8082:8082       # Calibre desktop gui
      - 8081:8081       # Calibre webserver gui
      - 8181:8181       # Calibre desktop gui HTTPS
    volumes:
      - /mnt/docker/config/gluetun:/gluetun
      - /mnt/docker/config/gluetun/wireguard/wg0.conf:/gluetun/wireguard/wg0.conf
    environment:        # ProtonVPN Wireguard
      - TZ=America/New_York
      - VPN_PORT_FORWARDING_PROVIDER=protonvpn
      - VPN_PORT_FORWARDING=on
      - VPN_SERVICE_PROVIDER=custom
      - VPN_TYPE=wireguard
      - UPDATER_PERIOD=48h
      - UPDATER_VPN_SERVICE_PROVIDERS=protonvpn
      - HEALTH_VPN_DURATION_ADDITION=30s
      - HEALTH_SUCCESS_WAIT_DURATION=180s
    restart: always
... 
  qbittorrent:
    image: linuxserver/qbittorrent      #4.3.9 # preferred by myanonamouse
    container_name: qbittorrent
    depends_on:
      gluetun:
        condition: service_healthy
    network_mode: service:gluetun
    environment:
      - PUID=1030
      - PGID=100
      - TZ=America/New_York
      - WEBUI_PORT=8080
      #- DOCKER_MODS=linuxserver/mods:universal-cron
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /mnt/docker/config/qbittorrent:/config
      - /mnt/docker/data:/data
      - /mnt/backups:/data/backups
      - /mnt/DSMLUN/data:/data/DSMLUN
      - /mnt/media:/data/NAS
    #command: bash -c "nginx -t && nginx -g 'daemon off;'"
    restart: always
  qbittorrent-natmap:
    # https://github.com/soxfor/qbittorrent-natmap
    image: ghcr.io/soxfor/qbittorrent-natmap
    container_name: qbittorrent-natmap
    depends_on:
      qbittorrent:
        condition: service_started
      gluetun:
        condition: service_healthy
    network_mode: service:gluetun
    environment:
      - TZ=America/New_York
      - QBITTORRENT_SERVER=localhost
      - QBITTORRENT_PORT=8080
      - QBITTORRENT_USER=
      - QBITTORRENT_PASS=
      #- VPN_GATEWAY=
      - VPN_CT_NAME=gluetun
      #- VPN_IF_NAME=tun0
      #- CHECK_INTERVAL=300
      #- NAT_LEASE_LIFETIME=300
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    restart: always
...
  prowlarr:
    image: linuxserver/prowlarr:develop  
    container_name: prowlarr
    depends_on:
      gluetun:
        condition: service_healthy
    network_mode: service:gluetun
    environment:
      - PUID=1030
      - PGID=100
      - TZ=America/New_York
    volumes:
      - /mnt/docker/config/prowlarr:/config
      - /mnt/docker/data:/data
      - /mnt/backups:/data/backups
      - /mnt/DSMLUN/data:/data/DSMLUN
      - /mnt/media:/data/NAS
    restart: always
...
  lidarr:
    image: linuxserver/lidarr
    container_name: lidarr
    depends_on:
      gluetun:
        condition: service_healthy
    network_mode: service:gluetun
    environment:
      - PUID=1030
      - PGID=100
      - TZ=America/New_York
      - DOCKER_MODS=linuxserver/mods:lidarr-flac2mp3 # https://github.com/linuxserver/docker-mods/tree/lidarr-flac2mp3
    volumes:
      - /mnt/docker/config/lidarr:/config
      - /mnt/docker/data:/data
      - /mnt/backups:/data/backups
      - /mnt/DSMLUN/data:/data/DSMLUN
      - /mnt/media:/data/NAS
    restart: always
...
TheCaptain989 commented 8 months ago

Your YAML looks okay to me. I mean, the networking if a bit more complicated with gluetun, but none of that affects my script behavior. I'm not an expert on the S6 stuff by any means, but you'll have to check the container logs to see what is going on.

What do the logs look like on a freshly upped container? (i.e. output from docker logs lidarr)

Uuugh commented 8 months ago

Very odd. I can clearly see that ffmpeg is installing (as you said). I have no idea why I had to manually add it. I'd say you can safely close my error report. There must have just been something weird on my end during the initial install (network error at the wrong moment?) But you've got my info if someone else reports the same issue. Thanks!

docker logs lidarr
[mod-init] Attempting to run Docker Modification Logic
[mod-init] Adding linuxserver/mods:lidarr-flac2mp3 to container
[mod-init] Downloading linuxserver/mods:lidarr-flac2mp3 from lscr.io
[mod-init] Installing linuxserver/mods:lidarr-flac2mp3
[mod-init] linuxserver/mods:lidarr-flac2mp3 applied to container
[migrations] started
[migrations] no migrations found
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support the app dev(s) visit:
Lidarr: https://opencollective.com/lidarr

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1030
User GID:    100
───────────────────────────────────────

----------------
>>> Flac2MP3 Mod by TheCaptain989 <<<
Repos:
  Dev/test: https://github.com/TheCaptain989/lidarr-flac2mp3
  Prod: https://github.com/linuxserver/docker-mods/tree/lidarr-flac2mp3

Version: 8b21e00
----------------
**** Adding ffmpeg to package install list ****
Changing ownership on /usr/local/bin/flac2mp3-debug-2.sh script.
Changing ownership on /usr/local/bin/flac2mp3-debug.sh script.
Changing ownership on /usr/local/bin/flac2mp3-tags.sh script.
Changing ownership on /usr/local/bin/flac2mp3-vbr.sh script.
Changing ownership on /usr/local/bin/flac2mp3.sh script.
[mod-init] **** Installing all mod packages ****
fetch http://dl-cdn.alpinelinux.org/alpine/v3.18/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.18/community/x86_64/APKINDEX.tar.gz
(1/38) Installing sdl2 (2.26.5-r0)
(2/38) Installing alsa-lib (1.2.9-r1)
(3/38) Installing libexpat (2.5.0-r1)
(4/38) Installing libpng (1.6.39-r3)
(5/38) Installing freetype (2.13.0-r5)
(6/38) Installing fontconfig (2.14.2-r3)
(7/38) Installing fribidi (1.0.13-r0)
(8/38) Installing libblkid (2.38.1-r8)
(9/38) Installing libmount (2.38.1-r8)
(10/38) Installing pcre2 (10.42-r1)
(11/38) Installing glib (2.76.4-r0)
(12/38) Installing graphite2 (1.3.14-r5)
(13/38) Installing harfbuzz (7.3.0-r0)
(14/38) Installing libunibreak (5.1-r0)
(15/38) Installing libass (0.17.1-r0)
(16/38) Installing glslang-libs (1.3.243.0-r1)
(17/38) Installing spirv-tools (1.3.243.0-r1)
(18/38) Installing shaderc (2023.3-r1)
(19/38) Installing vulkan-loader (1.3.243.0-r1)
(20/38) Installing libplacebo (5.264.1-r1)
(21/38) Installing ffmpeg-libpostproc (6.0.1-r0)
(22/38) Installing ffmpeg-libswscale (6.0.1-r0)
(23/38) Installing vidstab (1.1.1-r0)
(24/38) Installing zimg (3.0.5-r0)
(25/38) Installing ffmpeg-libavfilter (6.0.1-r0)
(26/38) Installing libasyncns (0.8-r1)
(27/38) Installing dbus-libs (1.14.8-r0)
(28/38) Installing libltdl (2.4.7-r2)
(29/38) Installing orc (0.4.34-r0)
(30/38) Installing flac-libs (1.4.3-r0)
(31/38) Installing libsndfile (1.2.0-r2)
(32/38) Installing speexdsp (1.2.1-r1)
(33/38) Installing tdb-libs (1.4.8-r1)
(34/38) Installing libpulse (16.1-r10)
(35/38) Installing libjpeg-turbo (2.1.5.1-r3)
(36/38) Installing v4l-utils-libs (1.24.1-r0)
(37/38) Installing ffmpeg-libavdevice (6.0.1-r0)
(38/38) Installing ffmpeg (6.0.1-r0)
Executing busybox-1.36.1-r5.trigger
Executing glib-2.76.4-r0.trigger
OK: 151 MiB in 147 packages
[custom-init] No custom files found, skipping...
TheCaptain989 commented 8 months ago

Good deal.

One last note; if you want to try to further debug what might be going on, you can set DOCKER_MODS_DEBUG=true environment variable to get more details in the log.

Uuugh commented 8 months ago

I'm happy to continue further debugging if you're interested. As it is right now, your docker-mod is working fantastically and it's much appreciated.

My only reason for debugging any further is if it helps you... which I'm more than happy to do. But otherwise I'm personally content that there was a glitch in connecting to the repo during installation.

TheCaptain989 commented 8 months ago

In that case, just let it be. I'm not going any further with it either.

LinuxServer-CI commented 7 months ago

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 6 months ago

This issue is locked due to inactivity