-1

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?

Community
  • 1
  • 1
  • @DarrenYoung If you omit the path, the result file should still be created in the program's working directory. That should not cause this exception. – Koby Douek Aug 16 '17 at 16:01
  • nowyplik.mp4 maybe it needs a fully qualified path or some odd? Also the last parameter is "type" so maybe should be like "mp4" GL! – rogerdpack Aug 17 '17 at 23:50

2 Answers2

1

This worked for me.

var ffMpeg = new NReco.VideoConverter.FFMpegConverter();
ffMpeg.GetVideoThumbnail(url, destinationThumbPath);
ffMpeg.ConvertMedia(url, destinationVidoePath, Format.mp4);
Rana Hamid
  • 53
  • 7
0

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.

Koby Douek
  • 16,156
  • 19
  • 74
  • 103