caffco / get-audio-duration

Returns duration of an audio file via ffprobe
MIT License
68 stars 10 forks source link

issue on server #455

Open synhya1 opened 3 months ago

synhya1 commented 3 months ago

Error: Command failed with exit code 1: /app/node_modules/.pnpm/@ffprobe-installer+linux-x64@5.2.0/node_modules/@ffprobe-installer/linux-x64/ffprobe -v error -select_streams a:0 -show_format -show_streams https://cdn.test.kr/music/Til Until.mp3

it works well locally but when i build it in docker (server) it crashes with that error what can i do?

Sumolari commented 3 months ago

Could you provide a minimal Docker image reproducing the error?

synhya1 commented 2 months ago

FROM node:lts-alpine RUN apk update && \ apk add --no-cache ffmpeg

WORKDIR /app

RUN npm i -g pnpm

COPY package.json ./ COPY .npmrc ./ RUN pnpm i

COPY . . RUN npm run build

ENV BODY_SIZE_LIMIT=1003045462

ENTRYPOINT [ "npm", "start" ]

this is my dockerfile

TheTBO commented 1 month ago

I faced a similar issue on node alpine where ffprobe fails during DNS resolution.

Sumolari commented 1 month ago

It is indeed the same issue as @TheTBO mentions, also mentioned in this issue from a related package

danny-does-stuff commented 1 month ago

We were able to fix this issue by installing ffmpeg in our docker image. My full solution notes can be found here