|
@@ -28,6 +28,7 @@ import com.fdkankan.scene.entity.*;
|
|
|
import com.fdkankan.scene.mapper.ISceneEditInfoMapper;
|
|
|
import com.fdkankan.scene.oss.OssUtil;
|
|
|
import com.fdkankan.scene.service.*;
|
|
|
+import com.fdkankan.scene.util.MergeVideoUtil;
|
|
|
import com.fdkankan.scene.vo.*;
|
|
|
import com.fdkankan.web.response.ResultData;
|
|
|
import com.google.common.collect.Lists;
|
|
@@ -2423,9 +2424,12 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
|
|
|
}
|
|
|
|
|
|
private void transferToFlv(String num, String fileName, String bucket) throws Exception {
|
|
|
+ ScenePlus scenePlus = scenePlusService.getScenePlusByNum(num);
|
|
|
+
|
|
|
+ ScenePlusExt scenePlusExt = scenePlusExtService.getScenePlusExtByPlusId(scenePlus.getId());
|
|
|
|
|
|
String userEditPath = String.format(UploadFilePath.USER_EDIT_PATH, num);
|
|
|
- String localImagesPath = String.format(ConstantFilePath.SCENE_USER_PATH_V4, num);
|
|
|
+ String localImagesPath = String.format(scenePlusExt.getDataSource()+ConstantFileLocPath.SCENE_DATA_PATH_V4, num);
|
|
|
String localFilePath = localImagesPath + fileName;
|
|
|
|
|
|
File targetFile = new File(localImagesPath);
|
|
@@ -2443,11 +2447,12 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
|
|
|
ossUtil.downloadFile(filePath, localImagesPath + fileName);
|
|
|
|
|
|
//视频格式转换
|
|
|
- CreateObjUtil.mp4ToFlv(localFilePath, localFilePath.replace("mp4", "flv"));
|
|
|
+ MergeVideoUtil.ffmpegFormatFlv(localFilePath, localFilePath.replace("mp4", "flv"));
|
|
|
|
|
|
//上传
|
|
|
String flvFileName = fileName.replace("mp4", "flv");
|
|
|
ossUtil.uploadFile(userEditPath+flvFileName, localFilePath.replace("mp4", "flv"), false);
|
|
|
+ FileUtil.del(localFilePath);
|
|
|
}
|
|
|
|
|
|
@Override
|