mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-10 19:36:50 +08:00
szx-1283 修改依赖
This commit is contained in:
@@ -82,12 +82,17 @@
|
|||||||
<version>5.8.16</version>
|
<version>5.8.16</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<!--<dependency>
|
||||||
<groupId>it.sauronsoftware</groupId>
|
<groupId>it.sauronsoftware</groupId>
|
||||||
<artifactId>jave</artifactId>
|
<artifactId>jave</artifactId>
|
||||||
<version>1.0.2</version>
|
<version>1.0.2</version>
|
||||||
<scope>system</scope>
|
<scope>system</scope>
|
||||||
<systemPath>${project.basedir}/src/main/resources/libs/jave-1.0.2.jar</systemPath>
|
<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>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.auth0</groupId>
|
<groupId>com.auth0</groupId>
|
||||||
|
|||||||
@@ -46,9 +46,11 @@ import com.xboe.module.scorm.SCORMParser;
|
|||||||
import com.xboe.standard.BaseConstant;
|
import com.xboe.standard.BaseConstant;
|
||||||
import com.xboe.standard.enums.BoedxCourseFileType;
|
import com.xboe.standard.enums.BoedxCourseFileType;
|
||||||
|
|
||||||
import it.sauronsoftware.jave.Encoder;
|
|
||||||
import it.sauronsoftware.jave.MultimediaInfo;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
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();
|
String fileFullPath = SysConstant.getConfigValue(BaseConstant.CONFIG_UPLOAD_FILES_SAVEPATH) + file.getFilePath();
|
||||||
if ("mp3,mp4".indexOf(file.getFileType()) > -1){
|
if ("mp3,mp4".indexOf(file.getFileType()) > -1){
|
||||||
log.info("上传 "+file.getFileType()+"文件:"+file.getFilePath());
|
log.info("上传 "+file.getFileType()+"文件:"+file.getFilePath());
|
||||||
Encoder encoder = new Encoder();
|
|
||||||
try {
|
try {
|
||||||
//System.out.println(fileFullPath);
|
//System.out.println(fileFullPath);
|
||||||
MultimediaInfo m = encoder.getInfo(new File(fileFullPath));
|
MultimediaInfo m = new MultimediaObject(new File(fileFullPath)).getInfo();
|
||||||
Long ls = m.getDuration() / 1000;//秒
|
Long ls = m.getDuration() / 1000;//秒
|
||||||
log.info("文件时长 "+ls);
|
log.info("文件时长 "+ls);
|
||||||
//System.out.print("视频时长:" + ls + "秒");
|
//System.out.print("视频时长:" + ls + "秒");
|
||||||
|
|||||||
Reference in New Issue
Block a user