日期:2014-05-18 浏览次数:20712 次
package com.cemso.util;
import java.io.File;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
public class VideoConverter {
private final static String BASE_PATH = FileOperationTool.DEFAULT_VIDEO_DES_PATH;
private final static String FLV_PATH = FileOperationTool.DEFAULT_FLV_PATH;
private static String PATH = "";
private static String FILE_NAME = "";
private static final Log log = LogFactory.getLog(com.cemso.util.VideoConverter.class);
public static boolean convert(String fileName) {
PATH = BASE_PATH + fileName;
FILE_NAME = fileName;
if(log.isDebugEnabled()){
log.debug("start to convert video to flv format...");
log.debug("the file name is : " + FILE_NAME);
log.debug("the file path is : " + PATH);
}
if (!checkfile(PATH)) {
return false;
} else {
&n