0

I am able to use the FFMpegConverter() in an ASP.NET Core application in my local environment, but when I use the production server I get the error:

NReco.VideoConverter.FFMpegException: ' (exit code: -1073741515)'

I have tried a lot of stuff with no success. What could cause this issue?

etrupja
  • 2,710
  • 6
  • 22
  • 37
  • probably has something to do with the path of the file, but without nay code I can't tell you more... – Buda Gavril Nov 24 '20 at 20:11
  • var ffMpeg = new FFMpegConverter(); License.SetLicenseKey(_ffMpegKey, _ffMpegValue); ffMpeg.FFMpegToolPath = _hostingEnv.WebRootPath + "\\FfmpegExe"; ConcatSettings _concatSettings = new ConcatSettings(); var _fileNames = filesNames.ToArray(); _newFileName = $"{filesPath}{_keyFile}{_fileExtension}"; string _concatFormat = _fileExtension.Replace(".", "").ToLower(); ffMpeg.ConcatMedia(_fileNames, _newFileName, _concatFormat, _concatSettings); – etrupja Nov 24 '20 at 20:40
  • @BudaGavril _hostingEnv.WebRootPath points to wwwroot folder, where inside FfmpegExe folder I have ffmpeg.exe file. I works in dev, but in prod servers does not work, even though I am using visual studio just like in dev env. – etrupja Nov 24 '20 at 20:41
  • @BudaGavril also, the _newFileName is not just the file name, but the full path (including the name) of the file where the merged file will be stored. Example: D:\Ervis\TGSBilling\TGS.Web\temp-aws-upload-video-files\09b1f3cd4a51422b9af71b030637a4f7\0f4b96c6180b4e48b606b6e53c568933.mp4 – etrupja Nov 24 '20 at 20:44
  • and do you have the rights in the production environment to run the executable? – Buda Gavril Nov 24 '20 at 21:12
  • -1073741515 == 0xC0000135 == STATUS_DLL_NOT_FOUND, you forgot to copy a DLL. If you don't know which one and a utility like Process Monitor doesn't tell you either then ask the product owner for deployment instructions. – Hans Passant Nov 24 '20 at 21:35
  • @BudaGavril I have assinged all permissions to the user I am using – etrupja Nov 24 '20 at 21:46
  • @HansPassant I am actually using the ffmpeg.exe file as suggested in the documentation of https://www.nrecosite.com/. I am wondering what I should check to make sure that I can run executable files. – etrupja Nov 24 '20 at 21:47
  • @HansPassant I know which DLL might cause the issue. Where should I put the DLL in that case? – etrupja Nov 24 '20 at 21:48

1 Answers1

-1

Most likely you use NReco.VideoConverter.LT nuget package that does NOT include ffmpeg executable (it should be deployed / installed separately).

Exception with a message like "(exit code: -1073741515)" usually occurs when ffmpeg process cannot be started (or crushed) when executed with System.Diagnostics.Process API. Typical reason is wrong executable (say, 64-bit ffmpeg.exe on 32-bit Windows). To ensure that ffmpeg.exe works on your environment it is enough to run it in the command line.

Vitaliy Fedorchenko
  • 8,447
  • 3
  • 37
  • 34
  • I am using NReco.VideoConverter.LT nuget package. I have downloaded a ffmpeg.exe file which I use in my machine which is 64-bit windows. Is there any 32-bit executable available? – etrupja Nov 25 '20 at 09:43
  • My prod evnrionemtn seems to be a 64-bit Windows as well. Windows Server R2 2008 Datacenter – etrupja Nov 25 '20 at 09:45
  • You need to ensure that 'ffmpeg.exe' works on your server in the command line. Official ffmpeg binaries are here: https://ffmpeg.org/download.html – Vitaliy Fedorchenko Nov 25 '20 at 10:17