
目前,我通过运行 3 个不同的命令从视频中获取/存储多个帧(作为位图):
String[] a = {"-ss", first, "-i", VideoPath, "-vframes", "1", directoryToStore + "/" + "thumb1.bmp"};
String[] b = {"-ss", second, "-i", VideoPath, "-vframes", "1", directoryToStore + "/" + "thumb2.bmp"};
String[] c = {"-ss", third, "-i", VideoPath, "-vframes", "1", directoryToStore + "/" + "thumb3.bmp"};
问题在于这需要花费太多时间。
是否可以通过一个命令完成上述操作,即给出 3 个不同的帧获取时间并为每个时间赋予唯一的名称?
或者我做错了什么导致它运行缓慢?