Moviepy Issue

charlie
PRO

3 months ago

Hi, I'm trying to work out if this is a Railway issue or not.

I'm using moviepy to process S3 videos. They work completely fine in development, but break in production (even thought they're the same file paths).

In the error, I don't think it's the files that are corrupt (because I can run the exact same path on local without any issue) so it makes me think it could a container issue with how I've got Railway set up (I've added ffmpeg to nixpacks.toml file but no luck). Interested if anyone else has experience this?

Project ID: c61c1785-a8d8-43d0-9d8b-6bd1f69aa3bf

Solved

0 Replies

3 months ago

have you checked the version of ffmpeg that is being installed?


charlie
PRO

3 months ago

It's version 7.1, which is the same on my local machine. Same moviepy library version as well


3 months ago

do you also perhaps have some pip package that will also try to install ffmpeg?


charlie
PRO

3 months ago

So moviepy installs as a dependency imageio_ffmpeg which stores ffmpeg-linux-x86_64-v7.0.2 (and I think uses) however when I ssh into the server and run ffmpeg -version I get 7.1 out


3 months ago

thats likely your issue, please make sure your dependencies arent trying to bring their own binaries


charlie
PRO

3 months ago

Great, that was the issue, thanks! For anyone stumbling across this thread I took the following actions:

  • Updated my FFMPEG_BINARY environment variable to the binary path in your Railway server (by default moviepy sets this as the ffmpeg-imageio path which works fine for MacOS but breaks for Linux)

  • I found my binary path for ffmpeg by ssh-ing into the server and just running which ffmpeg


3 months ago

what was the path?


charlie
PRO

3 months ago

/nix/var/nix/profiles/default/bin/ffmpeg


charlie
PRO

3 months ago

I'm also guessing this isn't installed by default and you'll have to add ffmpeg to the nixpacks.toml file (or whatever build file that's being used)


3 months ago

!s


Status changed to Solved brody 3 months ago