R
Railway•13mo ago
ironclad0643

ffprobe error: `ffprobe was killed with signal SIGSEGV`

I'm trying to use ffmpeg on my railway app and i've got ffmpeg itself installed and working correctly. However i'm using @ffprobe-installer/ffprobe and it's not happy on my production server. It works locally without an issue. I've tried debugging for nearly an hour now and can't find any solid leads on how to fix, has anyone else ran into this or know a solution? Thanks in advance!
11 Replies
Percy
Percy•13mo ago
Project ID: 032691a9-579d-4d39-803c-9d1cd5ab1b9f
ironclad0643
ironclad0643•13mo ago
032691a9-579d-4d39-803c-9d1cd5ab1b9f
Brody
Brody•13mo ago
might be an out of memory issue, might be an issue with how that package is installing ffmpeg, let's try to get ffmpeg installed correctly first. first, remove that package completely, then use this a nixpacks.toml file
[phases.setup]
nixPkgs = ["...", "ffmpeg"]
[phases.setup]
nixPkgs = ["...", "ffmpeg"]
and then let me know how that goes
ironclad0643
ironclad0643•13mo ago
ffmpeg is installed correctly, i've got 1 endpoint on the server that does not user ffprobe and it works well. only ffprobe is causing issues also, I do have the nixpacks.toml setup like you mentioned
Brody
Brody•13mo ago
well then I'm back to my first guess lol
ironclad0643
ironclad0643•13mo ago
when it comes to memory on the server, where do I even debug something like that? This app is my first exposure to railway btw
Brody
Brody•13mo ago
I still think you should remove the ffprobe-installer package, because if you are installing ffmpeg from the nix package, it comes with ffprobe
ironclad0643
ironclad0643•13mo ago
i'll see what happens with that i guess some more context fwiw -- i'm also using fluent-ffmpeg so i used that package per instructions for it
Brody
Brody•13mo ago
gotcha, well let me know how removing that package goes if no difference, then we move onto memory
ironclad0643
ironclad0643•13mo ago
hmm, strange -- it works. 🤣 however now it is broken locally because I assume my local ffmpeg was not installed with ffprobe so i need to use the additional package. I suppose I can just wrap that portion in an env conditional.
if (process.env.NODE_ENV !== 'production') {
const ffprobe = require('@ffprobe-installer/ffprobe');
ffmpeg.setFfprobePath(ffprobe.path);
}
if (process.env.NODE_ENV !== 'production') {
const ffprobe = require('@ffprobe-installer/ffprobe');
ffmpeg.setFfprobePath(ffprobe.path);
}
should be good to go now, I don't know that I would have known to just remove the package. thank you!
Brody
Brody•13mo ago
it's usually the simple little things, glad I could help