|
|
@ -28,10 +28,15 @@ func Cut(source string) {
|
|
|
|
//2、获取文件后缀
|
|
|
|
//2、获取文件后缀
|
|
|
|
extension := path.Ext(source)
|
|
|
|
extension := path.Ext(source)
|
|
|
|
//3、输出的文件通配名称
|
|
|
|
//3、输出的文件通配名称
|
|
|
|
workingPath := runDir + `/Target/` + source[0:32] + "/"
|
|
|
|
workingPath := runDir + `/Working/` + source[0:2] + "/"
|
|
|
|
if !FileUtil.Exists(workingPath) {
|
|
|
|
if !FileUtil.Exists(workingPath) {
|
|
|
|
os.Mkdir(workingPath, os.ModePerm)
|
|
|
|
os.Mkdir(workingPath, os.ModePerm)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
workingPath = workingPath + source[0:36] + "/"
|
|
|
|
|
|
|
|
if !FileUtil.Exists(workingPath) {
|
|
|
|
|
|
|
|
os.Mkdir(workingPath, os.ModePerm)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
targetPath := workingPath + source[0:36] + `_%03d` + extension
|
|
|
|
targetPath := workingPath + source[0:36] + `_%03d` + extension
|
|
|
|
//尝试删除已存在的视频
|
|
|
|
//尝试删除已存在的视频
|
|
|
|
var i = 0
|
|
|
|
var i = 0
|
|
|
@ -55,7 +60,10 @@ func Cut(source string) {
|
|
|
|
时间:2020-07-08
|
|
|
|
时间:2020-07-08
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
func GetAllCutChild(source string) []string {
|
|
|
|
func GetAllCutChild(source string) []string {
|
|
|
|
filepathNames, _ := filepath.Glob(filepath.Join(runDir+`/Target/`+source[0:2]+"/"+source[0:36]+"/", "*"))
|
|
|
|
filepathNames, err := filepath.Glob(filepath.Join(runDir+`/Working/`+source[0:2]+"/"+source[0:36]+"/", "*"))
|
|
|
|
|
|
|
|
if err!=nil{
|
|
|
|
|
|
|
|
fmt.Println(err.Error())
|
|
|
|
|
|
|
|
}
|
|
|
|
return filepathNames
|
|
|
|
return filepathNames
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|