Open Zainmansour opened 2 years ago
What do you mean exactly? Run ffmpeg
on the server to convert media?
yes how can I initialize my server to use ffmpeg?
ffmpeg-static
just makes sure that you have an ffmpeg
binary suitable for your platform & architecture installed. The path to this ffmpeg
binary can be obtained by require('ffmpeg-static')
.
You can then execute ffmpeg
however you please:
fluent-ffmpeg
, which give you a JavaScript-friendly APIchild_process
(very bare-bones)child_process
wrappers like execs
Does that answer your question?
I am not sure that you understood my question focus with my please: to install ffmpeg on my machine I downloaded it manually and add the path of /bin folder to environment variables in win 10 I create a website and I use ffmpeg it works fine on my machine so if I wanna deploy my website to a web hosting server like ( heroku or vercel ) how I can initialize the environment to use ffmpeg because I can't install it manually?? hope you understand and sorry for my poor english
to install ffmpeg on my machine I downloaded it manually
This a valid way to install ffmpeg
!
This package (ffmpeg-static
) is intended for automatic usage: If you want your Node.js-based project to use ffmpeg
, you can use ffmpeg-static
as a dependency to obtain an ffmpeg
binary, instead of manually downloading one.
This only works in an environment where you can spawn child processes, not sure if this works on Vercel; But I know it works on a plain old Linux-based VM/VPS used for web hosting.
what I have to do to use this library in my website if I want to deploy it to a webhost like vercel