FFMpegCore is not working in azure web app

See original GitHub issue

I have a .net core web api application that try to convert 3gp to mp3. Its work fine locally but when i publish it to my azure web app i get this error : FFMpegCore.Exceptions.FFMpegException: ffmpeg was not found on your system at FFMpegCore.Helpers.FFMpegHelper.VerifyFFMpegExists(FFOptions ffMpegOptions) at FFMpegCore.FFMpegArgumentProcessor.PrepareInstance(FFOptions ffMpegOptions, CancellationTokenSource& cancellationTokenSource) at FFMpegCore.FFMpegArgumentProcessor.ProcessAsynchronously(Boolean throwOnError, FFOptions ffMpegOptions)

my code is :

using (MemoryStream m = new())
                        {
                            await FFMpegArguments.FromFileInput(tempFile)
                                                     .OutputToPipe(new StreamPipeSink(m), options =>
                                                            options.WithAudioCodec("mp3").ForceFormat("mp3"))
                                                     .ProcessAsynchronously(true, new FFOptions() { BinaryFolder = $"{AppDomain.CurrentDomain.BaseDirectory}ffmpeg" });

                            m.Position = 0;

                            await blob.UploadAsync(m);
                        }

and i have my ffmpeg folder with all ffmpeg files copied in azure

thanks for your help

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
sparrowhawk26commented, Aug 15, 2021

hi,

I solved the issue, in fact I don’t know why but in the azure web app when I deploy the ffmpeg folder into d:\home\site\wwwroot\ffmpeg it’s not working, seems to be an azure restriction. So i moved the ffmpeg folder in the d:\home which is outside the application folder

Regards

‫בתאריך יום ו׳, 13 באוג׳ 2021 ב-12:35 מאת משה חייט <‪ @.***‬‏>:‬

Yes {AppDomain.CurrentDomain.BaseDirectory}ffmpeg is the path to the folder i also tried with separator it s the same.

בתאריך יום ו׳, 13 באוג׳ 2021, 12:24, מאת Malte Rosenbjerg ‏< @.***>:

Hadn’t noticed you specified FFOptions in your example. Are your ffmpeg executables placed in a folder with the path {AppDomain.CurrentDomain.BaseDirectory}ffmpeg? Looks like you are either missing the directory separator just before the ffmpeg folder in the path, or have specified the path to the executable instead of the path to the folder containing the executable.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rosenbjerg/FFMpegCore/issues/244#issuecomment-898316455, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJJXJ7N74YBDYIJFASAFVJTT4TQGNANCNFSM5CBHHCXQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

0reactions
sparrowhawk26commented, Aug 13, 2021

Yes {AppDomain.CurrentDomain.BaseDirectory}ffmpeg is the path to the folder i also tried with separator it s the same.

בתאריך יום ו׳, 13 באוג׳ 2021, 12:24, מאת Malte Rosenbjerg ‏< @.***>:

Hadn’t noticed you specified FFOptions in your example. Are your ffmpeg executables placed in a folder with the path {AppDomain.CurrentDomain.BaseDirectory}ffmpeg? Looks like you are either missing the directory separator just before the ffmpeg folder in the path, or have specified the path to the executable instead of the path to the folder containing the executable.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rosenbjerg/FFMpegCore/issues/244#issuecomment-898316455, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJJXJ7N74YBDYIJFASAFVJTT4TQGNANCNFSM5CBHHCXQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

Read more comments on GitHub >

github_iconTop Results From Across the Web

ffmpeg was not found on your system in Azure service ...
I have a stateless service fabric application, which uses ffmpeg.exe to convert video files. ffmpeg.exe is added to the project and it's ...
Read more >
FFMpegCore 5.1.0
A .NET Standard FFMpeg/FFProbe wrapper for easily integrating media analysis and conversion into your .NET applications.
Read more >
How to convert audio to different formats using C# and ...
Learn how to use FFmpeg with the FFMpegCore library to convert audio files from one format to another using .NET.
Read more >
[Solved]-Setup FFMpegCore in Visual Studio 2019-C#
First you must download and install ffmpeg on your machine, (to test that it is working correctly, open a CMD and execute "ffmpeg",...
Read more >
Use ffmpeg in a azure linux appservice : r/dotnet
I have a project that uses the FFMediaToolkit to wrap ffmpeg, in a windows appservice it works without any problem, but in a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found