JoeSkurczysyn JoeSkurczysyn -3 years ago 332
C# Question

FFMPEG C# video conver

I use code:

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

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

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

dont work:

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

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

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