|
@@ -13,6 +13,7 @@ import com.ylx.massage.domain.TbFile;
|
|
|
import com.ylx.massage.mapper.TbFileMapper;
|
|
import com.ylx.massage.mapper.TbFileMapper;
|
|
|
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.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
import com.ylx.massage.service.TbFileService;
|
|
import com.ylx.massage.service.TbFileService;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
@@ -45,10 +46,9 @@ import java.util.concurrent.TimeUnit;
|
|
|
@Slf4j
|
|
@Slf4j
|
|
|
public class TbFileServiceImpl extends ServiceImpl<TbFileMapper, TbFile> implements TbFileService {
|
|
public class TbFileServiceImpl extends ServiceImpl<TbFileMapper, TbFile> implements TbFileService {
|
|
|
|
|
|
|
|
- // 封面图片存储路径
|
|
|
|
|
- private static final String THUMBNAIL_SAVE_PATH = "E:/tmp/thumbnails/";
|
|
|
|
|
- // FFmpeg 命令路径(Windows 下需要使用 .exe 扩展名)
|
|
|
|
|
- private static final String FFMPEG_PATH = "E:\\ffmpeg-8.0.1-essentials_build\\bin\\ffmpeg.exe";
|
|
|
|
|
|
|
+ // FFmpeg 命令路径(从配置文件读取)
|
|
|
|
|
+ @Value("${ffmpeg.path}")
|
|
|
|
|
+ private String FFMPEG_PATH;
|
|
|
// 截取时间点(秒)
|
|
// 截取时间点(秒)
|
|
|
private static final int CAPTURE_TIME_SECOND = 1;
|
|
private static final int CAPTURE_TIME_SECOND = 1;
|
|
|
// 命令执行超时时间(秒)
|
|
// 命令执行超时时间(秒)
|