Unable to install ffmpeg

maximilianvbHOBBY

a year ago

Hi, I have set up a railway.toml file in the root of my repository.

it contains the following:

[phases.setup]
aptPkgs = ["…", "ffmpeg"]

However, in my deploy logs I get this:

/opt/venv/lib/python3.8/site-packages/pydub/utils.py:170: 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)

Not sure how I can install ffmpeg dependency if this doesn't work.

Solved

11 Replies

maximilianvbHOBBY

a year ago

It's also set up as my railway config file in the dashboard forgot to mention


a year ago

The config you provided is for a nixpacks.toml file, not a railway.toml file, rename the railway.toml file to nixpacks.toml


maximilianvbHOBBY

a year ago

Ok if I rename it do i need to change the config-as-code to nixplacks.toml or is it completely unrelated things? It's a bit confusing to me


a year ago

The config as code thing is railway.toml, the config you provided in your original message should be put into a nixpacks.toml file.


maximilianvbHOBBY

a year ago

Yeah but I'm asking if i need to name this file somewhere else , or if creating the file is enough? It's still not working


a year ago

It's a single file, I'm not sure what you mean by "somewhere else".

A nixpacks.toml with these contents should be placed at the root of the project -

[phases.setup]
    nixPkgs = ["...", "ffmpeg"]

Status changed to Solved railway[bot] 12 months ago


maximilianvbHOBBY

a year ago

yeah that's exactly what i have right now and it's not working. Where in the logs will it be shown if it's installing?


maximilianvbHOBBY

a year ago

nvm it's working, what I had to change for context:

My backend was deploying from a subfolder, nixpacks.toml needs to be in backend root not repo root


a year ago

Glad it's working!

Where in the logs will it be shown if it's installing?

In the build table at the top of the build logs


maximilianvbHOBBY

a year ago

Now I have a separate issue, it seems ffmpeg doesn't actually load in my application:

I run this:

try:
    [subprocess.run](subprocess.run)(["ffmpeg", "-version"], check=True)
except subprocess.CalledProcessError as e:
    raise HTTPException(
        status_code=500, detail="ffmpeg is not installed or not accessible" + str(e)
    )

It fails on this check, is this normal behavior or is there something wrong with my configuration?

More specifically i have this in my logs:

ffmpeg: /lib/x8664-linux-gnu/libc.so.6: version `GLIBC2.36' not found (required by /nix/store/xpxln7rqi3pq4m0xpnawhxb2gs0mn1s0-gcc-12.3.0-lib/lib/libstdc++.so.6)


maximilianvbHOBBY

a year ago

Ok again I fixed it, use this instead:

[phases.setup]
nixPkgs = ["…", "ffmpeg"]