我写了这个代码,但收到了这个消息"参数无效"
Stream outputS = Stream.Null;
(new NReco.VideoConverter.FFMpegConverter()).GetVideoThumbnail(arrayF[indexF].FullName, outputS);
outputS.Position = 0;
System.Drawing.Image thumb = new Bitmap(outputS);
res[0, 1] = "data:image/jpg;base64," + Convert.ToBase64String(ImageToByte2(thumb));
有人能帮我吗?!!
问题是因为您将Stream.Null作为GetVideoThumbnail方法的输出流(它总是空的)。尝试使用MemoryStream:
Stream outputS = new MemoryStream();