ehlxr 1 éve
szülő
commit
45aed11f7a

+ 1 - 3
etl-core/src/main/java/com/tzld/crawler/etl/service/strategy/handler/TitleScoreHandler.java

@@ -93,9 +93,7 @@ public class TitleScoreHandler extends StrategyAbstractHandler {
             score += scoreWordMap.getOrDefault(word, 0.0);
         }
 
-        // TODO: test
-        // if (score <= 0.3) {
-        if (score <= -1) {
+        if (score <= 0.3) {
             log.warn("title score is less than 0.3 {}", param);
             slsService.log("mode", param.getStrategy(), "crawler", param.getPlatform(), "message", "权重分:" + score + "<=0.3");
             return null;

+ 12 - 0
etl-core/src/main/java/com/tzld/crawler/etl/util/VideoUtils.java

@@ -25,6 +25,7 @@
 package com.tzld.crawler.etl.util;
 
 import com.tzld.crawler.etl.model.dto.VideoInfoDto;
+import net.bramp.ffmpeg.FFmpeg;
 import net.bramp.ffmpeg.FFprobe;
 import net.bramp.ffmpeg.probe.FFmpegFormat;
 import net.bramp.ffmpeg.probe.FFmpegProbeResult;
@@ -32,6 +33,8 @@ import net.bramp.ffmpeg.probe.FFmpegStream;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.IOException;
+
 /**
  * @author ehlxr
  * @since 2023-06-26 18:01.
@@ -57,4 +60,13 @@ public class VideoUtils {
             return null;
         }
     }
+
+    public static void videoCompose(String videoPath, String audioPath, String outPath) {
+        try {
+            FFmpeg ffmpeg = new FFmpeg("ffmpeg");
+            // ffmpeg.
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
 }