FFMPEG .NET Wrapper

For the developers that use FFmpeg in Windows software.
Post Reply
tpitman
Posts: 3
Joined: Fri Jul 01, 2016 4:43 am

FFMPEG .NET Wrapper

Post by tpitman » Fri Jul 01, 2016 4:54 am

I need to use FFMPEG in a .NET C# application.

I need some guideance. I found some NUGET packages. One is AForge and the other is Accord.AForge. There are 2 problems. The first is that both of them seem to not be active, therefore they use an older version of ffmpeg.

I need the new H.265 format that the latest ffmpeg has, but those libraries don't.

The other problem is that both of those packages don't seem to work when I try to build and run my application. I get errors about loading the DLL file.

I can't seem to find any information on fixing the DLL loading issues.

Can someone help me figure out how to use ffmpeg in my C# .NET application to do H.265 encoding?

My application gets input from a USB camera, shows it on the screen of the application and needs to encode it into an H.265 file.

The showing on the screen part of the AForge and Accord packages works and I am already using that.

If there is a way to do that part directly from ffmpeg library, then I could get rid of the Accord.AForge package.

Any help is greatly appreciated.

CraigN
Posts: 7
Joined: Wed Jul 06, 2016 5:24 pm

Re: FFMPEG .NET Wrapper

Post by CraigN » Wed Jul 06, 2016 5:27 pm

I encountered a similar problem. Most of the NuGet packages out there claim to support FFmpeg but actually just use FFmpeg.exe and redirect through stdin/stdout.

I stumbled across a cool project called FFmpeg.AutoGen which is a low-level wrapper for FFmpeg. I've got it working with 3.0.1 right now.

tpitman
Posts: 3
Joined: Fri Jul 01, 2016 4:43 am

Re: FFMPEG .NET Wrapper

Post by tpitman » Thu Jul 14, 2016 2:27 am

Thank you for telling me about this. I will take a look.

Did you have to do anything to get it to work? Can you just run it and it works or is there special config or install steps?

CraigN
Posts: 7
Joined: Wed Jul 06, 2016 5:24 pm

Re: FFMPEG .NET Wrapper

Post by CraigN » Tue Jul 19, 2016 7:17 pm

tpitman wrote:Did you have to do anything to get it to work? Can you just run it and it works or is there special config or install steps?
I don't recall doing anything special. I simply cloned the repo (I'd suggest going with tag 3.0 for starters), build the library using Visual Studio 2015 and then referenced the assembly in my C# project.

The C# example provided in the repo is a good start.

tpitman
Posts: 3
Joined: Fri Jul 01, 2016 4:43 am

Re: FFMPEG .NET Wrapper

Post by tpitman » Tue Jul 19, 2016 7:25 pm

Thank you!

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest