|
@@ -25,6 +25,7 @@ import org.dromara.system.service.ITblDeviceService;
|
|
|
import org.dromara.system.service.ITblEventService;
|
|
|
import org.dromara.system.utils.Utils;
|
|
|
import org.slf4j.Logger;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
@@ -44,6 +45,8 @@ public class KafkaMessageConsumer {
|
|
|
private String finalEventChangeTime = "400";
|
|
|
|
|
|
|
|
|
+ @Value("${user.ffmpegpath}")
|
|
|
+ private String ffmpegFilePath = "/usr/local/bin/ffmpeg";
|
|
|
@Scheduled(cron = "*/1 * * * * *")
|
|
|
public void doChange() {
|
|
|
// System.out.println("事件判断");
|
|
@@ -191,7 +194,7 @@ public class KafkaMessageConsumer {
|
|
|
File file = HttpUtil.downloadFileFromUrl(path, FileUtil.file("./temp/"));
|
|
|
try{
|
|
|
String pathfile = "./"+ UUID.fastUUID()+".mp4";
|
|
|
- Utils.exchangeToMp4("/Users/wenhongquan/miniforge3/bin/ffmpeg",file.toPath().toString(),pathfile);
|
|
|
+ Utils.exchangeToMp4(ffmpegFilePath,file.toPath().toString(),pathfile);
|
|
|
FileUtil.del(file);
|
|
|
file = new File(pathfile);;
|
|
|
}catch (Exception e){
|