C
C#5mo ago
Papillon

FFmpeg.NET / FFmpeg

I've a platform that was deployed on windows now it's on linux however the convert part for the audio doesn't work anymore since the deployment for linux I figured the problem I found a hard coded path for ffmpeg.exe file which was working fine bcs the platform was on windows now it's on linux so it doesn't make sense all I wanna try to do is to try to change it to be compatible with linux but I wanna know the way from linux bcs I haven't used it before so I'm trying to understand the way the file should be passed so it can use it correctly
10 Replies
Papillon
Papillon5mo ago
@TeBeCo so first part of your question is how I found it It's existed already in the code and it's old in my company's platform it's being used to convert .weba / .mp4 to WAV I found this part
string enginePath = Path.Combine(Environment.CurrentDirectory, "Content", "TTSContent", $"ffmpeg.exe");
string enginePath = Path.Combine(Environment.CurrentDirectory, "Content", "TTSContent", $"ffmpeg.exe");
so it's .exe which won't work on windows now I'm trying to understand how should it be set to be compatible with linux
var inputFile = new InputFile(savedFilePath);
var outputFile = new OutputFile(fileFullPath);
var ffmpeg = new Engine(enginePath);
await ffmpeg.ConvertAsync(inputFile, outputFile, conversionOptions, default);
var inputFile = new InputFile(savedFilePath);
var outputFile = new OutputFile(fileFullPath);
var ffmpeg = new Engine(enginePath);
await ffmpeg.ConvertAsync(inputFile, outputFile, conversionOptions, default);
InputFile / OutputFile are FFmpeg.NET the package is installed already all the samples that I found was for windows
WEIRD FLEX
WEIRD FLEX5mo ago
linux executables don't have extensions it's just ffmpeg
Papillon
Papillon5mo ago
the real question is does linux identify ffmpeg ?
Unknown User
Unknown User5mo ago
Message Not Public
Sign In & Join Server To View
WEIRD FLEX
WEIRD FLEX5mo ago
i don't know what linux you are using, if it's a recent or almost recent veresion you should have no troubles using package manage to install it (depending if you require a certain version or not) for an older distro you could have to take a more manual approach but once it's installed it's either in the /bin folder of the system or in the directory you chose, so it should work
Unknown User
Unknown User5mo ago
Message Not Public
Sign In & Join Server To View
Papillon
Papillon5mo ago
sorry for not clarifying my question enough @TeBeCo @dont what I understood that the "ffmpeg,exe" should be ran so I can convert the format from one to another so I want the alternative for linux like the file that should be ran during the convert in linux
Unknown User
Unknown User5mo ago
Message Not Public
Sign In & Join Server To View
Papillon
Papillon5mo ago
I've tried to check but I couldn't find I've found the compiled version for linux @TeBeCo I've placed the file within the same path for the .exe file but in the code I've removed .exe so rn I've 2 files ffmpeg.exe and ffmpeg which one will linux try to run or it will make a conflict ? because rn the issue still the same
WEIRD FLEX
WEIRD FLEX5mo ago
i mean, you have literally the exeutable name in enginePath that's what the program will try to start
Want results from more Discord servers?
Add your server
More Posts