accord-net / framework

Machine learning, computer vision, statistics and general scientific computing for .NET
http://accord-framework.net
GNU Lesser General Public License v2.1
4.49k stars 1.99k forks source link

Issue deploying project with FFMPEG.x64 #1489

Open mattlaltman opened 6 years ago

mattlaltman commented 6 years ago

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

I have a c# windows forms project that creates a video from images. This is working fine when running in debug or release mode within Visual Studios. However, when I deployed the ClickOnce application, it gave an error about dependencies.

"Could not load file or assembly 'accord.video.ffmpeg.x64.dll' or one of its dependencies"

I read several forums and came to the conclusion that I needed to manually add the dll's associated with ffmpeg and set them to copy always. Although one forum said this issue was resolve with Accord.

So I added: avcodec-57.dll avdevice-57.dll avfilter-6.dll avformat-57.dll avutil-55.dll postproc-54.dll swresample-2.dll swscale-4.dll

This got rid of my dependency error, but now I get this error:
A type initializer for 'Module' threw an exception

I've spent 2 days on this issue and starting to get really frustrated. Any help would be greatly appreciated.

More Info: Entire project is x64 .NET Framework 4.5.2 Accord.Video.FFMPEG.x64 version 3.8.0.0 C++ redistributable 2015 and 2017 Package installed with NuGet

jelsafa-dev commented 6 years ago

I'm having the same issue

lassebadass commented 4 years ago

I know i am late to the party - but I came across the same issue and this is what fixed it for me:

Try installing Microsoft Visual C++ Redistributable 2015-2019 for x86

Can be found here: https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads