public Bitmap GetVideoFrame(string filePath, int second, TimeSpan timeSpan) { VideoFileReader VFR = new VideoFileReader(); try { VFR.Open(filePath); } catch (Exception e) { VFR.Close(); VFR.Dispose(); } var ret = VFR.GetFrameAtIndex(second, timeSpan); VFR.Close(); VFR.Dispose(); System.GC.Collect(); return(ret); }
public static Bitmap GetVideoFrame(string filePath, int index) { VFR.Open(filePath); return(VFR.GetFrameAtIndex(index)); }