Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ffmpeg.net on Ubuntu #34

Open
Excalib88 opened this issue Dec 9, 2019 · 3 comments
Open

Use ffmpeg.net on Ubuntu #34

Excalib88 opened this issue Dec 9, 2019 · 3 comments
Labels
needs documentation The feature is not properly descirbed in the readme

Comments

@Excalib88
Copy link

Hello! I want to deploy my app on Ubuntu, but i need to set engine path to Engine type. How i can use this in ubuntu? Can you help me, please

@codematrix
Copy link

codematrix commented Dec 30, 2019

Looking for the same thing but on Debian. I notice the commands for ffmpeg are the same regardless of OS. I'm assuming that when executing a command in either Windows or Linux, should be the same. The only difference is the binaries are different. I'm experimenting with it now and see I can create a PR if successful.

@codematrix
Copy link

codematrix commented Dec 30, 2019

I got a workaround. However, it requires that you install ffmpeg along with your docker image. It takes about a min to install but once installs it works as perusal.

In my docker file I have the following. I use Debian 10. You can get a list of .NET runtimes here.
https://hub.docker.com/_/microsoft-dotnet-core-aspnet

FROM mcr.microsoft.com/dotnet/core/runtime:3.1-buster-slim AS base
RUN ["apt-get", "--assume-yes", "update"]
RUN ["apt-get", "--assume-yes", "install", "ffmpeg"] 

… other stuff

Then in your code base to pass the ffmpeg file, you have to do this.

   var ffmpegPath = RuntimeInformation.IsOSPlatform(OSPlatform.Linux)
                    ? $"/usr/bin/ffmpeg"
                    : $"{AppDomain.CurrentDomain.BaseDirectory}ffmpeg.exe";

   var engine = new FFmpeg.NET.Engine(ffmpegPath);

Deployment will take a lot longer. I'm still exploring other options.

codematrix

@codematrix
Copy link

codematrix commented Dec 31, 2019

Hello,

I created a public image hubster/dotnet.core.runtime

You can use this as it has ffmpeg preinstalled installed on top of .net core 3.1.buster-slim as defined in https://hub.docker.com/_/microsoft-dotnet-core-aspnet

So in your Dockerfile, just change the first FROM like this.

FROM hubster/dotnet.core.runtime:3.1-buster-slim-ffmpeg AS base

You still need to do this in your code base:

   var ffmpegPath = RuntimeInformation.IsOSPlatform(OSPlatform.Linux)
                    ? $"/usr/bin/ffmpeg"
                    : $"{AppDomain.CurrentDomain.BaseDirectory}ffmpeg.exe";

   var engine = new FFmpeg.NET.Engine(ffmpegPath);

codematrix

@cmxl cmxl added the needs documentation The feature is not properly descirbed in the readme label Mar 15, 2021
@cmxl cmxl pinned this issue Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs documentation The feature is not properly descirbed in the readme
Projects
None yet
Development

No branches or pull requests

3 participants