FFMpegCore not generating an output when using snapshot in C#

Viewed 207

I'm new to using FFMpeg, I've tried using FFMpeg in c# many different ways, and every time I get no output. I found the FFMpegCore package and installed it, the FFProbe stuff works but the Snapshot isn't doing anything. I'm getting neither errors nor any output files. I just want to get a single frame from a selected video.

                FFMpeg.Snapshot(frPath.SelectedPath + "/" + input, frPath.SelectedPath + '/' + input.Replace(".mp4", ".jpeg"), new Size(400, 400), TimeSpan.FromMinutes(1));

input is just the file name selected from a file dialog.

Am I doing something wrong, is there something that I have to install other than FFMpeg, or does FFMpeg.snapshot not work the way I think it does?

1 Answers

I was having the same problem when using TimeSpan.FromMinutes(1). I changed it to FromMilliseconds(1), and now it works!

                FFMpeg.Snapshot(frPath.SelectedPath + "/" + input, frPath.SelectedPath + '/' + input.Replace(".mp4", ".jpeg"), new Size(400, 400), TimeSpan.FromMilliseconds(1));
Related