R
Railwayβ€’2y ago
serverworm

help installing ffmpeg

Good afternoon! My id: c6b9e3b3-6071-4fe9-b676-cac1c0f3c7ad My telegram bot needs the FFmpeg library to work with voice messages. It works fine locally, but when deployed on the rails.app platform, it throws an error during execution " RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning) ". I looked at the build settings via Nix and created a nixpacks.toml file with the configuration [ Phases.setup ] aptPkgs = [ "ffmpeg-python" ]; [ start ] cmd = "python bot/main.py " , but it did not lead to success. I really love your service, but when this problem affected other users, they had to switch to another platform, which I absolutely do not want. Thank you for your time!
16 Replies
Percy
Percyβ€’2y ago
Project ID: c6b9e3b3-6071-4fe9-b676-cac1c0f3c7ad
Percy
Percyβ€’2y ago
⚠️ experimental feature
Brody
Brodyβ€’2y ago
try just ffmpeg you'll also want to change that array to be an extending array just for good measure
serverworm
serverwormOPβ€’2y ago
does not work 😦
Brody
Brodyβ€’2y ago
wanna send me your nixpacks file?
serverworm
serverwormOPβ€’2y ago
of course
Brody
Brodyβ€’2y ago
show me the table at the top of your build logs?
serverworm
serverwormOPβ€’2y ago
╔═══════════════════════════════ Nixpacks v1.5.1 ══════════════════════════════╗ β•‘ setup β”‚ python311, gcc β•‘ ║──────────────────────────────────────────────────────────────────────────────║ β•‘ install β”‚ python -m venv /opt/venv && . /opt/venv/bin/activate && pip β•‘ β•‘ β”‚ install -r requirements.txt β•‘ ║──────────────────────────────────────────────────────────────────────────────║ β•‘ start β”‚ python bot/main.py β•‘ β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β• #1 [internal] load .dockerignore #1 transferring context: 2B done #1 DONE 0.0s #2 [internal] load build definition from Dockerfile #2 transferring dockerfile: 1.80kB done #2 DONE 0.0s #3 [internal] load metadata for ghcr.io/railwayapp/nixpacks:ubuntu-1678752204 #3 DONE 0.2s #4 [ 1/10] FROM ghcr.io/railwayapp/nixpacks:ubuntu-1678752204@sha256:fba77818e57bebd4e7a02f60d45554354d6ec5a3f7d98b4ee4f6b2a6e720191e #4 DONE 0.0s #5 [ 2/10] WORKDIR /app/ #5 CACHED #6 [internal] load build context #6 transferring context: 154.91kB done #6 DONE 0.0s #7 [stage-0 3/8] COPY .nixpacks/nixpkgs-293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847.nix .nixpacks/nixpkgs-293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847.nix #7 CACHED #8 [stage-0 4/8] RUN nix-env -if .nixpacks/nixpkgs-293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847.nix && nix-collect-garbage -d #8 CACHED #9 [stage-0 5/8] RUN printf '\nPATH=/opt/venv/bin:$PATH' >> /root/.profile #9 DONE 0.5s #10 [stage-0 6/8] COPY . /app/. #10 DONE 0.0s #11 [stage-0 7/8] RUN --mount=type=cache,id=s/c6b9e3b3-6071-4fe9-b676-cac1c0f3c7ad-/root/cache/pip,target=/root/.cache/pip python -m venv /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt #11 6.599 Collecting python-dotenv #11 6.603 Using cached python_dotenv-1.0.0-py3-none-any.whl (19 kB) #11 6.650 Collecting pydub
Brody
Brodyβ€’2y ago
thought so
serverworm
serverwormOPβ€’2y ago
bro, sorry if I'm taking up too much of your time, I'm critically glad of your help ❀️
Brody
Brodyβ€’2y ago
no no no you're good I just wasnt at my computer
serverworm
serverwormOPβ€’2y ago
I am a student and my profile is computer security, so sorry for the stupid questions😌 how can we organize this?
Brody
Brodyβ€’2y ago
here you go
serverworm
serverwormOPβ€’2y ago
bro, everything worked for me, for which I am insanely grateful to you! initially, I was very surprised by your decision because I had already tried this option, but it was not successful. Have a nice day !
Brody
Brodyβ€’2y ago
the secret was you had a capital on the word "phases" i could have told you that, i just wanted to fix the formatting of the nixpacks file so i just did it all in one go have a nice day to you too!!
serverworm
serverwormOPβ€’2y ago
πŸ₯Ίβ€
Want results from more Discord servers?
Add your server