Accord version 3.8.2
I am using Accord, Accord.video, Accord.video.FFMPEG Dll's for capturing the screen, my code is compiled to ANYCPU, everything works fine in 64 bit machine, but I am facing issue when it comes to 32 bit machine below is exception which I am getting.
Exception occurred while loading the assemblies Could not load file or assembly 'Accord.Video.FFMPEG.dll' or one of its dependencies. is not a valid Win32 application. (Exception from HRESULT: 0x800700C1), at System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence evidence)
at System.Reflection.Assembly.LoadFile(String path)
at ProHance.ProbeTray.Program.MPvcUlyJUg(Object , ResolveEventArgs )
Add Library Project to solution.
Add nuget package Accord.Video.ffmpeg (or x64) to Library project (do not change platform target , if your environment is x64 use x64 version otherwise use x86)
Change copy local of these references to false Accord ,Accord.Video , Accord.Video.ffmpeg
Copy all the files in packages\Accord.Video.FFMPEG.3.8.0\build + Accord ,Accord.Video , Accord.Video.ffmpeg to your output folder like bin\ffmpeg
put these line in Application_Start.
var path = Thread.GetDomain().BaseDirectory + "bin\ffmpeg\"; Environment.SetEnvironmentVariable("PATH", Environment.GetEnvironmentVariable("PATH") + ";"+ path); AppDomain.CurrentDomain.AppendPrivatePath(path);
User contributions licensed under CC BY-SA 3.0