|
@@ -595,6 +595,10 @@ public class FFmpegServiceImpl implements FFmpegService {
|
|
|
List<String> allLocalFilePathList = new ArrayList<>();
|
|
List<String> allLocalFilePathList = new ArrayList<>();
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
|
|
|
+ String inputFile = FFmpegUtil.pathCreate("./datalog/ffmpeg/command/input/" + param.getOutputFile());
|
|
|
|
|
+ allLocalFilePathList.add(inputFile);
|
|
|
|
|
+ downloadFile(CdnUtil.getOssHttpUrl(param.getInputFile()), inputFile);
|
|
|
|
|
+ ffmpegCommand = ffmpegCommand.replace(param.getInputFile(), inputFile);
|
|
|
String outputFile = FFmpegUtil.pathCreate("./datalog/ffmpeg/command/result/" + param.getOutputFile());
|
|
String outputFile = FFmpegUtil.pathCreate("./datalog/ffmpeg/command/result/" + param.getOutputFile());
|
|
|
allLocalFilePathList.add(outputFile);
|
|
allLocalFilePathList.add(outputFile);
|
|
|
ffmpegCommand = ffmpegCommand.replace(param.getOutputFile(), outputFile);
|
|
ffmpegCommand = ffmpegCommand.replace(param.getOutputFile(), outputFile);
|
|
@@ -624,7 +628,7 @@ public class FFmpegServiceImpl implements FFmpegService {
|
|
|
AliOssFileTool.saveInPublic(EnumPublicBuckets.PUBBUCKET.getBucketName(), ossKey, Files.newInputStream(Paths.get(outputFile)), "text/plain");
|
|
AliOssFileTool.saveInPublic(EnumPublicBuckets.PUBBUCKET.getBucketName(), ossKey, Files.newInputStream(Paths.get(outputFile)), "text/plain");
|
|
|
return CdnUtil.getOssHttpUrl(ossKey);
|
|
return CdnUtil.getOssHttpUrl(ossKey);
|
|
|
}
|
|
}
|
|
|
- } catch (IOException e) {
|
|
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
throw new RuntimeException(e);
|
|
throw new RuntimeException(e);
|
|
|
} finally {
|
|
} finally {
|
|
|
for (String s : allLocalFilePathList) {
|
|
for (String s : allLocalFilePathList) {
|