我使用Apache Commons FTPClient上传大文件,但传输速度只是使用WinSCP通过FTP传输速度的一小部分.我怎样才能加快转移?
public boolean upload(String host, String user, String password, String directory,
String sourcePath, String filename) throws IOException{
FTPClient client = new FTPClient();
FileInputStream fis = null;
try {
client.connect(host);
client.login(user, password);
client.setControlKeepAliveTimeout(500);
logger.info("Uploading " + sourcePath);
fis = new FileInputStream(sourcePath);
//
// Store file to server
//
client.changeWorkingDirectory(directory);
client.setFileType(FTP.BINARY_FILE_TYPE);
client.storeFile(filename, fis);
client.logout();
return true;
} catch (IOException e) {
logger.error( "Error uploading " + filename, e );
throw e;
} finally {
try {
if (fis != null) …Run Code Online (Sandbox Code Playgroud) 我一直在使用FFmpeg来查找h264视频文件的中间帧,并提取jpg缩略图以便在流媒体门户网站上使用.这是针对每个上传的视频自动完成的.
有时框架恰好是黑色框架或者只是语义上不好,即背景或模糊镜头与视频内容无关.
我想知道我是否可以使用openCV或其他方法/库通过面部识别或帧分析以编程方式找到更好的缩略图.