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
Project ID:
c6b9e3b3-6071-4fe9-b676-cac1c0f3c7ad
You might find these helpful:
- Does FFMPEG not work?
- Python server
- Chrome / Chrome Driver paths
β οΈ experimental feature
try just
ffmpeg
you'll also want to change that array to be an extending array just for good measuredoes not work π¦
wanna send me your nixpacks file?
of course
show me the table at the top of your build logs?
ββββββββββββββββββββββββββββββββ 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
thought so
bro, sorry if I'm taking up too much of your time, I'm critically glad of your help β€οΈ
no no no you're good
I just wasnt at my computer
I am a student and my profile is computer security, so sorry for the stupid questionsπ
how can we organize this?
here you go
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 !
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!!
π₯Ίβ€