tomaszzmuda / Xabe.FFmpeg

.NET Standard wrapper for FFmpeg. It allows to process media without know how FFmpeg works, and can be used to pass customized arguments to FFmpeg from dotnet core application.
https://xabe.net/product/xabe_ffmpeg/
Other
710 stars 126 forks source link

Windows issue with "ffmpeg" file in PATH #223

Closed Damitrix closed 4 years ago

Damitrix commented 4 years ago

Having a file called "ffmpeg" (no extension) in your Windows PATH before the "ffmpeg.exe" will lead to an System.ComponentModel.Win32Exception: 'The specified executable is not a valid application for this OS platform.' exception when trying to run Conversion.Start().

Renaming it allowed the program to find the actual ffmpeg.exe Normal command line works with this setup, so I think it's a valid problem.

I set my PATH to the folder where the media autobuild suite created all files, that's why there was such a file in the first place

   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at Xabe.FFmpeg.FFmpeg.RunProcess(String args, String processPath, Nullable`1 priority, Boolean standardInput, Boolean standardOutput, Boolean standardError)
   at Xabe.FFmpeg.FFmpegWrapper.<>c__DisplayClass11_0.<RunProcess>b__0()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Xabe.FFmpeg.Conversion.<Start>d__48.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at VideoCompressor.Program.<MainAsync>d__10.MoveNext() in C:\Users\Chris\source\repos\VideoCompressor\VideoCompressor\Program.cs:line 95
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at VideoCompressor.Program.<Main>d__8.MoveNext() in C:\Users\someone\source\repos\VideoCompressor\VideoCompressor\Program.cs:line 15
tomaszzmuda commented 4 years ago

I'm going to handle that. Give me few days :)

tomaszzmuda commented 4 years ago

Unfortunately, I cannot reproduce this issue. In 4 of my PCs everything works fine. Anyone else having this problem too?

06needhamt commented 4 years ago

I cannot reproduce this issue on either of my 2 development machines both running the latest build of Windows 10 x64.

Winver screenshot for reference,

image