framework icon indicating copy to clipboard operation
framework copied to clipboard

Server Error in '/' Application. Could not load file or assembly 'Accord.Video.FFMPEG.x64.DLL' Web aplication

Open garlosccs opened this issue 7 years ago • 1 comments

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

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

I tried to compile the web application and it gives me error.

already set work x64. already installed redistributable c++ Already test in console application and if it worked but in web aplication always gives the error

image

If I see is that when compiling in web application it does not add avcodec-57.dll and the others.

I already tried to copy and paste them but it does not work either.

this is my code.

public ActionResult Index() { try {

            using (var videowrite = new VideoFileWriter())
            {
                var filePaths = Directory.GetFiles("c:\\frames", "*.jpg").ToList();
                videoresult.Width = 1280;
                videoresult.Height = 920;
                videoresult.DurationSecond = 5;
                videoresult.Frameforsec = filePaths.Count() / videoresult.DurationSecond;
                videoresult.Path = "c:\\frames\\video\\Video.mp4";
                videowrite.VideoCodec = VideoCodec.Mpeg4;
                videowrite.FrameRate = videoresult.Frameforsec;
                videowrite.BitRate = 3000000;
                videowrite.Width = (int)videoresult.Width;
                videowrite.Height = (int)videoresult.Height;
                videowrite.Open(videoresult.Path);
                var items = filePaths.OrderByDescending(a => a);


                foreach (var i in items)
                {
                    if (System.IO.File.Exists(i))
                    {
                        using (Bitmap photoframe = Bitmap.FromFile(i) as Bitmap)
                        {
                            videowrite.WriteVideoFrame(photoframe);
                        }
                    }
                }

                videowrite.Close();
            }
            ViewBag.menssage = "Video successful : " + videoresult.Path;
        }
        catch(Exception ex) {
            ViewBag.menssage = "Video error : "+ ex.Message;
        }

        return View();

    }

garlosccs avatar Apr 06 '18 13:04 garlosccs

Did you find any workaround for the same?

YagneshKhamar avatar Sep 30 '20 08:09 YagneshKhamar