node-ffmpeg-installer icon indicating copy to clipboard operation
node-ffmpeg-installer copied to clipboard

How do you recommend adding additional platforms like Linux even though working from Win or Mac?

Open mihaivarga opened this issue 4 years ago • 4 comments

I am developing on Windows, AWS lambda function for video processing. The thing is when deploying to lambda only the installed platform with for the current developer will be uploaded. How can I specify a certain platform that needs to be always present there? ex. Linux 64 in case of AWS lambda

The thing is I have colleagues that work on Mac and when they will install and deploy a new version of the Lambda function it will have only Mac platform for ffmpeg. We solved this by using Jenkins and Docker to deploy from same linux container, but this is not always ok as we don't have Jenkins for all projects.

mihaivarga avatar Feb 08 '20 10:02 mihaivarga

Not sure if there is an easy solution, the whole point of the project is to install a binary for the current platform, so if you are building images on one platform to then run on another it will not work. And it's not using any options or anything, rather using the environment to pull in the correct dependency.

There's a similar, older project (don't recall the name) that inspired this project, that pulled in all the binaries. I made this one because I didn't want to have 5 extra binaries. Could be one solution.

Otherwise, set up some simple way to build in a virtual environment? VirtualBox or something would work if you don't have Jenkins available. I don't think the NPM env variables can be overridden, otherwise that would also work.

It's just not the use case for the project, sadly. But if you come up with some good workaround I'll be happy to add it to the README or add pull requests.

kribblo avatar Feb 08 '20 11:02 kribblo

I suggest you not do that.

blogwy avatar May 11 '20 14:05 blogwy

I encountered same problem. Using a mac and trying to deploy a lambda function. It would be nice if you can implement some installation flags like npm install --arch=x64 --platform=linux @ffmpeg-installer/ffmpeg.

That way we can specify the actually binary we want to install.

@kribblo

yutongs-dmai avatar Jun 25 '20 23:06 yutongs-dmai

@kribblo I was struggling with this problem for a while, and just opened a PR adding my simple workaround to the README. Please let me know if I can add any more contextual information!

isaacpearl avatar Dec 02 '20 18:12 isaacpearl