2 months ago
im reffering to this thread: https://discord.com/channels/713503345364697088/1382322356814614628
Hey, I've been using Railway for a few months now, but I'm not quite sure how to install FFMPEG. Are there any new solutions? From what I've seen in the documentation, it seems that you just need to add a environment Variable. What's the best and quickest way to do this now, for someone who vibecodes a lot but doesn't deal much with the code itself? Is it safe? Will I not lose my data from N8n? Because I want to add FFmpeg to N8n. Thank you and best regards!
0 Replies
I've seen @Medim made video on how to do it but i need to know if my n8n won't get demaged
2 months ago
continuing from #🎤|chit-chat
RAILPACK_PACKAGES=ffmpegis probs your best bet if youre using railpack
how do you know if youre using railpack?
go to your service settings, then scroll down to the build section, if the build section is empty or the builder is nixpacks then you're not using railpack, otherwise if it says railpack is the builder then youre using railpack
if youre using nixpacks then you should stop using nixpacks
and if the build section is empty then youre deploying from an image registry, in which case installing ffmpeg will be a lot more difficult
I suppose im on the railpack, thats cool, so i need to edit only variable to install ffmpeg


nooo im using the image registry, how to move it to railpack without losing my n8n instance?
2 months ago
no, it seems youre deploying from an image registry
2 months ago
you cant move to railpack
2 months ago
you'll need to edit the start command to install ffmpeg
When i was installing n8n i just press few buttons and click deploy and thats all, sorry for being little slow
2 months ago
its okay
2 months ago
apt update && apt install ffmpeg && n8n startmaybe try this for the start command
Will my n8n be safe? Im affraid i can loose some of the workflows, eventhough i made a backup but it still can be very painfull
2 months ago
assuming the template you deployed is set up correctly, it shouldnt cause data loss
2 months ago
^^^ this is very dependent on whether the template you deployed is correctly built
2 months ago
or actually set your start command to this instead:
apt update && apt install -y ffmpeg && n8n startjust in case apt install has any prompts
2 months ago
the n8n one, not the worker
2 months ago
if the worker needs it too then you might need to add the apt update && apt install -y ffmpeg && part to that one as well but lets see
2 months ago
maybe its not necassery
2 months ago
yup that looks good
2 months ago
lets hope it works
2 months ago
if it doesnt work then its going to be a real pain installing ffmpeg
2 months ago
can you tell what error you got?
2 months ago
i had a feeling
2 months ago
<:imgPepeCry:1203771089117904916>
2 months ago
okay lets try apk instead of apt
2 months ago
and if apk isnt there either then we'll just need to use curl
2 months ago
try this command
apk add --no-cache ffmpeg && n8n start2 months ago
yea hopefully
2 months ago
i guess n8n is alpine based
2 months ago
ooh nice
2 months ago
so far so good
yup already 3+ mins and not a single error in sight, i might just chill and hope for the best
2 months ago
<:PurgatoryDepressed:1134368817879994442>
2 months ago
alr my assumption is that it installed ffmpeg but never moved onto n8n start for some reason
2 months ago
no worries
2 months ago
I can't figure why n8n start wouldnt run after
2 months ago
maybe I should make an n8n template that has ffmpeg and a bunch of other stuff preinstalled
2 months ago
anyway, let's try one last thing
try setting the start command like so:
/bin/sh -c "apk add --no-cache ffmpeg && n8n start"BTW i used this template :https://railway.com/deploy/n8n-with-workers
2 months ago
good to know
2 months ago
<:pepeEyeRoll:763297232207216640>
2 months ago
what the sigma
2 months ago
can you check the logs and tell me what you see
2 months ago
deploy logs specifically
2 months ago
HMMMM okay that makes sense
2 months ago
in your service variables, try adding RAILWAY_RUN_UID=0, just a shot in the dark
2 months ago
and if this doesnt work we can just try via curl
2 months ago
and if that doesnt work then im out of ideas
2 months ago
yup, perfect
2 months ago
yea click "Add" and then "Deploy"
2 months ago
that's good to know
2 months ago
<:whatthefuck:1309293173927055410>
2 months ago
whar
2 months ago
how is that even remotely possible
2 months ago
we literally installed ffmpeg
2 months ago
nah that isnt the issue
2 months ago
can you check logs again?
2 months ago
the issue is if the install failed then the deployment shouldve failed
2 months ago
unless it failed but with a success exit code
2 months ago
or && doesnt work the way I think it does
2 months ago
okay actually let me just deploy the template myself
2 months ago
yea the logs shows that ffmpeg was installed succesfully
i see that there is something ffmpeg related, maybe im doing something wronhg
2 months ago
yea I just followed the steps you took and ffmpeg is definitely present in the container

2 months ago
nah its all good
2 months ago
<:PepeThink:585531518701797401>
2 months ago
the only possibility I can think of is that n8n only checks for binaries in specific locations but that wouldn't make any sense tbh
2 months ago
can you try /usr/bin/ffmpeg --version instead of ffmpeg --version
maybe i should try it the other way, maybe the same way that was mentioned above
2 months ago
the RAILPACK_PACKAGES method ?
2 months ago
oh i see what he does
2 months ago
OOH you know what
2 months ago
it's probably trying to find ffmpeg in the worker
2 months ago
okay nah that's easy fix
2 months ago
just add the RAILWAY_RUN_UID=0 variable to the worker and set the worker's start command as
/bin/sh -c "apk add --no-cache ffmpeg && n8n worker"2 months ago
I'm 10 billion percent sure this will work
2 months ago
neither
2 months ago
just add 0 on the value side
2 months ago
nice!
2 months ago
NICE!!!
2 months ago
sorry for taking so long with the solution, i just dont know the workflow of n8n
2 months ago
Ahww thank you, I do have a paypal at [paypal.me/FragsPaypal](paypal.me/FragsPaypal) or buy me a coffee at
2 months ago
you dont have to though, im happy to help either way
Oh no way you r from africa! cheers brother, my dad is from ghana! I live in poland but love to see the homeland!
2 months ago
that's awesome! love it when I see a fellow african on discord; rare seeing other africans ngl 😔
2 months ago
oh makes sense yea
2 months ago
thanks a ton 🙏 i really appreciate it
2 months ago
wow, that is definitely not worth it 😭
2 months ago
thank you
2 months ago
Hey! just saw this thread, gonna link this for future reference: https://github.com/kadumedim/n8n-ffmpeg
You can just swap service images, you won’t lose your saved workflows.
2 months ago
Fork the repo and change your service image 😉
2 months ago
!s
Status changed to Solved medim • 2 months ago
2 months ago
bro stole my kill
2 months ago
<:pepeEyeRoll:763297232207216640>

















