|
@@ -14,7 +14,7 @@ import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
-import it.sauronsoftware.jave.Encoder;
|
|
|
|
|
|
+ // import it.sauronsoftware.jave.Encoder;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
@@ -252,10 +252,10 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
|
|
@Autowired
|
|
@Autowired
|
|
private MaterialParameterMapper materialParameterMapper;
|
|
private MaterialParameterMapper materialParameterMapper;
|
|
|
|
|
|
- public void getFile(MaterialInfo materialInfo) {
|
|
|
|
- /* uploadExecutorService.submit(new Runnable() {
|
|
|
|
|
|
+ /* public void getFile(MaterialInfo materialInfo) {
|
|
|
|
+ *//* uploadExecutorService.submit(new Runnable() {
|
|
@Override
|
|
@Override
|
|
- public void run() {*/
|
|
|
|
|
|
+ public void run() {*//*
|
|
try {
|
|
try {
|
|
System.err.println("开始获取素材基本信息");
|
|
System.err.println("开始获取素材基本信息");
|
|
System.err.println(materialInfo);
|
|
System.err.println(materialInfo);
|
|
@@ -266,7 +266,7 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
|
|
String localUrl = LoadFileUtil.downLoadFromUrl(url, PropertiesUtils.getValue("kuaishou_config", "video_sava_path"));
|
|
String localUrl = LoadFileUtil.downLoadFromUrl(url, PropertiesUtils.getValue("kuaishou_config", "video_sava_path"));
|
|
File file = new File(localUrl);
|
|
File file = new File(localUrl);
|
|
it.sauronsoftware.jave.Encoder encoder = new Encoder();
|
|
it.sauronsoftware.jave.Encoder encoder = new Encoder();
|
|
- /*try {*/
|
|
|
|
|
|
+ *//*try {*//*
|
|
it.sauronsoftware.jave.MultimediaInfo m = encoder.getInfo(file);
|
|
it.sauronsoftware.jave.MultimediaInfo m = encoder.getInfo(file);
|
|
long duration = m.getDuration();
|
|
long duration = m.getDuration();
|
|
long secondDuration = duration / 1000;
|
|
long secondDuration = duration / 1000;
|
|
@@ -297,18 +297,18 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
|
|
|
|
|
|
}
|
|
}
|
|
System.err.println(2222222);
|
|
System.err.println(2222222);
|
|
- /* } catch (Exception e) {
|
|
|
|
|
|
+ *//* } catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- } *//*finally {
|
|
|
|
|
|
+ } *//**//*finally {
|
|
file.delete();
|
|
file.delete();
|
|
- }*/
|
|
|
|
|
|
+ }*//*
|
|
}
|
|
}
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
- /* }
|
|
|
|
- });*/
|
|
|
|
- }
|
|
|
|
|
|
+ *//* }
|
|
|
|
+ });*//*
|
|
|
|
+ }*/
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|