framework icon indicating copy to clipboard operation
framework copied to clipboard

Could not load file or assembly 'Accord.Video.FFMPEG.x64' or one of its dependencies

Open mehulgohelonetech opened this issue 7 years ago • 6 comments

What would you like to submit? (put an 'x' inside the bracket that applies)

  • [ ] question
  • [x] bug report
  • [ ] feature request

Issue description I am trying to use Accord.Video.FFMPEG lib. I have added it from nuget package but after package installation done and I run project I am getting this error. I tried with both 32 - 64 bit version. both are giving error.

error while using 64 bit version is like below.

Could not load file or assembly 'Accord.Video.FFMPEG.x64' or one of its dependencies. An attempt was made to load a program with an incorrect format.

How to solve this?

screenshot-2017-12-30 could not load file or assembly accord video ffmpeg x64 or one of its dependencies an attempt was m

mehulgohelonetech avatar Dec 30 '17 06:12 mehulgohelonetech

Are you building your project as x86/x64 specifically, or Any CPU?

elipriaulx avatar Jan 23 '18 21:01 elipriaulx

For me it gives the same error as above on any of those.

brain5ide avatar Jun 20 '18 05:06 brain5ide

I am seeing this same issue. Is there a solution?

mattlaltman avatar Jul 18 '18 18:07 mattlaltman

Hi , I had this problem and after 2 days I found this solution that maybe help others,

1- Add Library Project to solution

2- 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)

3-Change copy local of these references to false Accord ,Accord.Video , Accord.Video.ffmpeg

4-Copy all the files in packages\Accord.Video.FFMPEG.3.8.0\build + Accord ,Accord.Video , Accord.Video.ffmpeg to asp.net output folder like bin\ffmpeg

5-put these line in Application_Start var path = Thread.GetDomain().BaseDirectory + "bin\ffmpeg\"; var dllDirectory = path; Environment.SetEnvironmentVariable("PATH", Environment.GetEnvironmentVariable("PATH") + ";" + dllDirectory); AppDomain.CurrentDomain.AppendPrivatePath(path);

It should work now!!

Arazesh avatar Jul 22 '18 06:07 Arazesh

I have tried the same with the above given things, but the only change occurred was that previously other things weren't loading but now it is a Runtime experience, i.e. When we actually call the given code at that point of time it is giving the similar error. What to do? I have tried re-installing the VC++ redistributables, and a lot of trials with the dll copies directly. I created a console application and that works super smooth with the same dlls. But I am not able to get the problem is that what is happening for this in the case of a Web project.

mangemohan avatar Oct 20 '18 12:10 mangemohan

I'm having the exact same issue. Did you happen to find a solution @mangemohan ? Please let me know, thanks

solatali avatar Aug 14 '20 21:08 solatali