package com.lxw.test3d.FFM;
|
|
|
/**
|
* @ClassName ConverVideoTest
|
* @Desecription TODO
|
* @Author tkk
|
* @Date 2019/11/13 9:43
|
**/
|
public class ConverVideoTest {
|
|
/**
|
* @Description:(1.转码功能调用)
|
* @param:@param yuanPATH
|
* @return:void
|
* @author:Zoutao
|
* @date:2018-6-23
|
* @version:V1.0
|
*/
|
/*本地测试专用--zoutao*/
|
public static void main(String[] args) {
|
//System.out.println(DateUtils.getCurrentDateTime());
|
ConverVideoTest c = new ConverVideoTest();
|
//String yuanPATH = "D:/file/IMG_4141.MP4"; //本地源视频
|
String yuanPATH = "E:\\ffmpeg\\2.avi"; //本地源视频
|
c.run(yuanPATH);
|
//System.out.println(DateUtils.getCurrentDateTime());
|
}
|
|
//web调用
|
public void run(String yuanPATH) {
|
try {
|
// 转码开始
|
|
//String filePath = "D:/testfile/video/rmTest.rm"; //本地源视频测试
|
|
String filePath = yuanPATH; //web传入的源视频
|
System.out.println("ConverVideoTest说:传入工具类的源视频为:"+filePath);
|
|
ConverVideoUtils zout = new ConverVideoUtils(filePath); //传入path
|
String targetExtension = ".mp4"; //设置转换的格式
|
boolean isDelSourseFile = true; //删除源文件
|
|
boolean beginConver = zout.beginConver(targetExtension,isDelSourseFile);
|
System.out.println(beginConver);
|
|
} catch (Exception e) {
|
e.printStackTrace();
|
}
|
}
|
}
|