|
|
@@ -128,16 +128,21 @@ public class AdminVideoApiController extends CertifyApiController {
|
|
|
}
|
|
|
|
|
|
String filename = video.getUrl();
|
|
|
+
|
|
|
// 生成保存到数据库的url
|
|
|
String output = System.nanoTime() + ".mp4";
|
|
|
video.setUrl(createFileName() + "/" + output);
|
|
|
+
|
|
|
video.setTranscoding(1);
|
|
|
// 保存到数据库
|
|
|
+ System.out.println("//*/*/*/*");
|
|
|
result.setData(adminVideoService.insertVideo(video));
|
|
|
+ System.out.println("================//*/*/*/*");
|
|
|
|
|
|
// 压缩视频并将视频
|
|
|
videoChange(filename, output, video.getUrl());
|
|
|
-
|
|
|
+ System.out.println("2222222================//*/*/*/*");
|
|
|
+
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
@@ -189,6 +194,7 @@ public class AdminVideoApiController extends CertifyApiController {
|
|
|
FFmpegProbeResult in = ffprobe.probe(input);
|
|
|
|
|
|
FFmpegBuilder builder = new FFmpegBuilder();
|
|
|
+ System.out.println("333333333333asdagjdgajgdj");
|
|
|
builder.setInput(in) // 输入文件
|
|
|
.overrideOutputFiles(true) // 覆盖重复文件
|
|
|
.addOutput(output) // 输出文件
|
|
|
@@ -204,6 +210,7 @@ public class AdminVideoApiController extends CertifyApiController {
|
|
|
.setStrict(FFmpegBuilder.Strict.EXPERIMENTAL) // 严格形式
|
|
|
.done();
|
|
|
|
|
|
+ System.out.println("444444444444444444asdagjdgajgdj");
|
|
|
FFmpegExecutor executor = new FFmpegExecutor(ffmpeg, ffprobe);
|
|
|
ExecutorService service = Executors.newCachedThreadPool();
|
|
|
// 3.直接new一个FutureTask
|