|
@@ -19,6 +19,7 @@ import com.fdkankan.fusion.service.*;
|
|
|
import com.fdkankan.redis.util.RedisUtil;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.ibatis.annotations.Case;
|
|
|
+import org.bytedeco.javacv.FFmpegFrameGrabber;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -27,10 +28,7 @@ import sun.java2d.pipe.SpanIterator;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import javax.xml.transform.Result;
|
|
|
-import java.io.BufferedOutputStream;
|
|
|
-import java.io.IOException;
|
|
|
-import java.io.InputStream;
|
|
|
-import java.io.OutputStream;
|
|
|
+import java.io.*;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.concurrent.ThreadPoolExecutor;
|
|
@@ -114,4 +112,13 @@ public class TestController {
|
|
|
}
|
|
|
return ResultData.ok();
|
|
|
}
|
|
|
+
|
|
|
+ public static void main(String[] args) throws Exception{
|
|
|
+ String videoPath = "D:\\abc\\thread__30451767_20240914102646_57677_wz_transcode.mp4";
|
|
|
+ FFmpegFrameGrabber fFmpegFrameGrabber = new FFmpegFrameGrabber(videoPath);
|
|
|
+ fFmpegFrameGrabber.start();
|
|
|
+ int videoCodec = fFmpegFrameGrabber.getVideoCodec();
|
|
|
+ String videoCodecName = fFmpegFrameGrabber.getVideoCodecName();
|
|
|
+ System.out.println(videoCodec +":"+videoCodecName);
|
|
|
+ }
|
|
|
}
|