N8N with FFMPEG
olitroli
FREEOP

a year 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!

Solved

152 Replies

olitroli
FREEOP

a year ago

I've seen @Medim made video on how to do it but i need to know if my n8n won't get demaged


a year ago

continuing from #🎤|chit-chat

RAILPACK_PACKAGES=ffmpeg

is 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


olitroli
FREEOP

a year ago

I suppose im on the railpack, thats cool, so i need to edit only variable to install ffmpeg

1423959976749301953

1423959977172930632


olitroli
FREEOP

a year ago

nooo im using the image registry, how to move it to railpack without losing my n8n instance?


a year ago

no, it seems youre deploying from an image registry


a year ago

you cant move to railpack


a year ago

you'll need to edit the start command to install ffmpeg


olitroli
FREEOP

a year ago

When i was installing n8n i just press few buttons and click deploy and thats all, sorry for being little slow


a year ago

its okay


a year ago

apt update && apt install ffmpeg && n8n start

maybe try this for the start command


olitroli
FREEOP

a year ago

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


a year ago

assuming the template you deployed is set up correctly, it shouldnt cause data loss


a year ago

^^^ this is very dependent on whether the template you deployed is correctly built


olitroli
FREEOP

a year ago

Should i use this command in the worker section or on the other one?


a year ago

or actually set your start command to this instead:

apt update && apt install -y ffmpeg && n8n start

just in case apt install has any prompts


a year ago

the n8n one, not the worker


olitroli
FREEOP

a year ago

ok cool


a year 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


a year ago

maybe its not necassery


olitroli
FREEOP

a year ago

so i just do this and it should work?

1423961406222499891


a year ago

yup that looks good


a year ago

lets hope it works


olitroli
FREEOP

a year ago

okay i deplyed


olitroli
FREEOP

a year ago

and it flopped after 7 sec


a year ago

if it doesnt work then its going to be a real pain installing ffmpeg


a year ago

can you tell what error you got?


olitroli
FREEOP

a year ago

1423961833932460132


a year ago

i had a feeling


a year ago

<:imgPepeCry:1203771089117904916>


olitroli
FREEOP

a year ago

damn


olitroli
FREEOP

a year ago

🙏


a year ago

okay lets try apk instead of apt


a year ago

and if apk isnt there either then we'll just need to use curl


a year ago

try this command

apk add --no-cache ffmpeg && n8n start

olitroli
FREEOP

a year ago

ok, deployed, now waiting


olitroli
FREEOP

a year ago

it is deploying for 60 sec right now, maybe it would work


a year ago

yea hopefully


a year ago

i guess n8n is alpine based


olitroli
FREEOP

a year ago

idk what does it even means tbh, but i hope it will work


olitroli
FREEOP

a year ago

1423962971574636584


a year ago

ooh nice


a year ago

so far so good


olitroli
FREEOP

a year ago

yup already 3+ mins and not a single error in sight, i might just chill and hope for the best


olitroli
FREEOP

a year ago

1423963555706834965


olitroli
FREEOP

a year ago

ouch


olitroli
FREEOP

a year ago

failed


a year ago

<:PurgatoryDepressed:1134368817879994442>


a year ago

alr my assumption is that it installed ffmpeg but never moved onto n8n start for some reason


olitroli
FREEOP

a year ago

damn just let me use ffmpeg node to connect videos 🙏


olitroli
FREEOP

a year ago

so whats right now chief?


olitroli
FREEOP

a year ago

Thanks btw for helping, you are saving my life rn


a year ago

no worries


a year ago

I can't figure why n8n start wouldnt run after


a year ago

maybe I should make an n8n template that has ffmpeg and a bunch of other stuff preinstalled


a year 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"

olitroli
FREEOP

a year ago

okay, now we wait

1423964682217197629


olitroli
FREEOP

a year ago


a year ago

good to know


olitroli
FREEOP

a year ago

1423965897361723452


olitroli
FREEOP

a year ago

ehh...


olitroli
FREEOP

a year ago

no good news


a year ago

<:pepeEyeRoll:763297232207216640>


a year ago

what the sigma


a year ago

can you check the logs and tell me what you see


a year ago

deploy logs specifically


olitroli
FREEOP

a year ago

1423966973393371157


a year ago

HMMMM okay that makes sense


a year ago

in your service variables, try adding RAILWAY_RUN_UID=0, just a shot in the dark


a year ago

and if this doesnt work we can just try via curl


a year ago

and if that doesnt work then im out of ideas


olitroli
FREEOP

a year ago

1423967619702067231


olitroli
FREEOP

a year ago

liker this?


a year ago

yup, perfect


olitroli
FREEOP

a year ago

and now deploy yes?


a year ago

yea click "Add" and then "Deploy"


olitroli
FREEOP

a year ago

love the energy


olitroli
FREEOP

a year ago

1423967905879691325


olitroli
FREEOP

a year ago

lets see


olitroli
FREEOP

a year ago

i see that the n8n got updated


olitroli
FREEOP

a year ago

now lets check ffmpg


olitroli
FREEOP

a year ago

everything is left as it was when looking at the workflows


a year ago

that's good to know


olitroli
FREEOP

a year ago

if i did everything right the ffmpeg is not installed

1423969677390119054


a year ago

<:whatthefuck:1309293173927055410>


a year ago

whar


a year ago

how is that even remotely possible


a year ago

we literally installed ffmpeg


olitroli
FREEOP

a year ago

maybe i should try to redeploy


a year ago

nah that isnt the issue


a year ago

can you check logs again?


a year ago

the issue is if the install failed then the deployment shouldve failed


a year ago

unless it failed but with a success exit code


a year ago

or && doesnt work the way I think it does


a year ago

okay actually let me just deploy the template myself


olitroli
FREEOP

a year ago

1423970524832202836


olitroli
FREEOP

a year ago

1423970795507417119

1423970795947823227


a year ago

yea the logs shows that ffmpeg was installed succesfully


olitroli
FREEOP

a year ago

i see that there is something ffmpeg related, maybe im doing something wronhg


a year ago

yea I just followed the steps you took and ffmpeg is definitely present in the container

1423971330604138536


olitroli
FREEOP

a year ago

damn so something is wrong i guees


olitroli
FREEOP

a year ago

maybe something is wrong here

1423971851687956641


olitroli
FREEOP

a year ago

maybe i pasted something wrong


a year ago

nah its all good


a year ago

<:PepeThink:585531518701797401>


a year 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


a year ago

can you try /usr/bin/ffmpeg --version instead of ffmpeg --version


olitroli
FREEOP

a year ago

maybe i should try it the other way, maybe the same way that was mentioned above


a year ago

the RAILPACK_PACKAGES method ?


olitroli
FREEOP

a year ago

okay



olitroli
FREEOP

a year ago

this method


olitroli
FREEOP

a year ago

Still not found

1423973108053835857


a year ago

oh i see what he does


a year ago

OOH you know what


a year ago

it's probably trying to find ffmpeg in the worker


a year ago

okay nah that's easy fix


a year 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"

a year ago

I'm 10 billion percent sure this will work


olitroli
FREEOP

a year ago

okay give me a sec


olitroli
FREEOP

a year ago

witch one i should choose?

1423973721592303647


a year ago

neither


a year ago

just add 0 on the value side


olitroli
FREEOP

a year ago

okay


olitroli
FREEOP

a year ago

succes

1423974138376360035


a year ago

nice!


olitroli
FREEOP

a year ago

1423974221922701344


olitroli
FREEOP

a year ago

god bless!


olitroli
FREEOP

a year ago

that works!


a year ago

NICE!!!


olitroli
FREEOP

a year ago

AND COMPLETELY NO DATA LOSS


a year ago

sorry for taking so long with the solution, i just dont know the workflow of n8n


olitroli
FREEOP

a year ago

no problem, love the work


olitroli
FREEOP

a year ago

i want to return the fawor


olitroli
FREEOP

a year ago

you have Paypal or crypto account by any chance?


olitroli
FREEOP

a year ago

or maybe revolut, that would be the best option i think


a year ago

Ahww thank you, I do have a paypal at paypal.me/FragsPaypal or buy me a coffee at


a year ago

you dont have to though, im happy to help either way


olitroli
FREEOP

a year ago

Oh no way you r from africa! cheers brother, my dad is from ghana! I live in poland but love to see the homeland!


a year ago

that's awesome! love it when I see a fellow african on discord; rare seeing other africans ngl 😔


olitroli
FREEOP

a year ago

I live in poland unfortunetely there is not much africans eaither hah


a year ago

oh makes sense yea


olitroli
FREEOP

a year ago

thank you for the help, "coffe" should reached you at,


olitroli
FREEOP

a year ago

didnt use paypal becouse fee for sending 5$ is 5$ hahah


a year ago

thanks a ton 🙏 i really appreciate it


a year ago

wow, that is definitely not worth it 😭


a year ago

thank you


olitroli
FREEOP

a year ago

the pleasure is mine


a year 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.


a year ago

Fork the repo and change your service image 😉


a year ago

!s


Status changed to Solved medim 11 months ago


a year ago

bro stole my kill


a year ago

<:pepeEyeRoll:763297232207216640>


Welcome!

Sign in to your Railway account to join the conversation.

Loading...