JoeSkurczysyn JoeSkurczysyn - 1 year ago 132
C# Question

How may I resolve 'NReco.VideoConverter.FFMpegException' error?

The following code:

string pathToVideoFile = "O:\\Byblioteka\\MAH01238.MP4";

var ffMpeg = new NReco.VideoConverter.FFMpegConverter();

ffMpeg.ConvertMedia(pathToVideoFile, "nowyplik.mp4", "Format.mp4");

Is resulting in the following error:

An unhandled exception of type 'NReco.VideoConverter.FFMpegException' occurred in NReco.VideoConverter.dll

Additional information: nowyplik.mp4: Invalid argument (exit code: 1)

How may I resolve this 'NReco.VideoConverter.FFMpegException' error?

Answer Source

I'm taking a risk answering this question since it's vague, and I don't know where you downloaded the DLL from.

But from what I know, the 3rd argument should be "mp4", not "Format.mp4":

ffMpeg.ConvertMedia(pathToVideoFile, "nowyplik.mp4", "mp4");

This could cause this exception.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download