Search code examples
c#visual-studioimportffmpegwrapper

Setup FFMpegCore in Visual Studio 2019


I am confused on the basics of using a library. I understand that there is a library called FFMpeg and a wrapper called FFMpegCore so we can use FFMpeg with C#, correct? I downloaded both FFMpeg and FFMpegCore and I have them in my project's folder. Although I didn't perceive any class named FFMpegOptions in either of the file's folders. I am stuck on how to actually set it up so I can use it in my little project, I never downloaded someone's library before. Can somebody please walk me though the motions of connecting the three of them together?

So far I experimented with:

  • Add a reference to my project, but there doesn't seem to be any .dll, .tlb, .olb, .ocx or .exe files to add
  • Add an existing project to my solution. There is a project called FFMpegCore.csproj but adding it raises a missing SDK error. Weirdly enough, opening the same project as a standalone doesn't raise any issues which makes me thing the operation I am trying is inadequate.

I am sure this is a silly and easy setup to perform but I just don't know enough to find a solution.


Solution

  • First you must download and install ffmpeg on your machine, (to test that it is working correctly, open a CMD and execute "ffmpeg", it will return the installed version.

    enter image description here

    Second, create a new project, (I recommend .NETFramework) once your project is created, it is necessary to install the package from NuGet, this function is found in tools> NuGet Package Manager> Manage packages for solutions...>

    enter image description here

    Then search for FFmpegCore and install it in your project,

    enter image description here

    The necessary dependencies will be added, now you can start programming with this Framework, enter image description here

    I recommend the FFMpeg.cs class as an example of the documentation, to start with.

    enter image description here Good Luck.