szx-1283 修改依赖

This commit is contained in:
Caojr
2025-11-03 11:45:32 +08:00
parent 20e3b001d5
commit eaab48607d
2 changed files with 11 additions and 5 deletions

View File

@@ -82,12 +82,17 @@
<version>5.8.16</version>
</dependency>
<dependency>
<!--<dependency>
<groupId>it.sauronsoftware</groupId>
<artifactId>jave</artifactId>
<version>1.0.2</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/libs/jave-1.0.2.jar</systemPath>
</dependency>-->
<dependency>
<groupId>ws.schild</groupId>
<artifactId>jave-core</artifactId>
<version>3.3.1</version>
</dependency>
<dependency>
<groupId>com.auth0</groupId>

View File

@@ -46,9 +46,11 @@ import com.xboe.module.scorm.SCORMParser;
import com.xboe.standard.BaseConstant;
import com.xboe.standard.enums.BoedxCourseFileType;
import it.sauronsoftware.jave.Encoder;
import it.sauronsoftware.jave.MultimediaInfo;
import lombok.extern.slf4j.Slf4j;
import ws.schild.jave.Encoder;
import ws.schild.jave.MultimediaObject;
import ws.schild.jave.info.MultimediaInfo;
import ws.schild.jave.process.ffmpeg.FFMPEGProcess;
/**
* 课件资源表,课程的相关文件内容
@@ -257,10 +259,9 @@ public class CourseFileApi extends ApiBaseController {
String fileFullPath = SysConstant.getConfigValue(BaseConstant.CONFIG_UPLOAD_FILES_SAVEPATH) + file.getFilePath();
if ("mp3,mp4".indexOf(file.getFileType()) > -1){
log.info("上传 "+file.getFileType()+"文件:"+file.getFilePath());
Encoder encoder = new Encoder();
try {
//System.out.println(fileFullPath);
MultimediaInfo m = encoder.getInfo(new File(fileFullPath));
MultimediaInfo m = new MultimediaObject(new File(fileFullPath)).getInfo();
Long ls = m.getDuration() / 1000;//秒
log.info("文件时长 "+ls);
//System.out.print("视频时长:" + ls + "秒");