diff --git a/.gitignore b/.gitignore index 7797b887..998f66d7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,39 +1,41 @@ - -/dsBaseRpc/.idea/ -/dsBaseRpc/build/ -/dsBaseRpc/WinBuild/ -/dsBaseRpc/Logs/ - -/dsAutoCode/Logs/ -/dsAutoCode/.idea/ -/dsAutoCode/build/ -/dsAutoCode/WinBuild/ -/dsAutoCode/lastupdate.log - -/dsBaseWeb/.idea/ -/dsBaseWeb/build/ -/dsBaseWeb/WinBuild/ -/dsBaseWeb/Logs/ -/dsBaseWeb/dsBaseRpc.log - -/dsData/.idea/ -/dsData/build/ -/dsData/WinBuild/ -/dsData/Logs/ - -/dsSso/.idea/ -/dsSso/build/ -/dsSso/WinBuild/ -/dsSso/Logs/ - -/dsTools/.idea/ -/dsTools/build/ -/dsTools/WinBuild/ - -/dsWatch/.idea/ -/dsWatch/build/ -/dsWatch/WinBuild/ -/dsBaseRpc/Java调用示例/JavaGRpc/target/ -/dsWatch/Logs/ - -/dsAutoCode/.idea/ + +/dsBaseRpc/.idea/ +/dsBaseRpc/build/ +/dsBaseRpc/WinBuild/ +/dsBaseRpc/Logs/ + +/dsAutoCode/Logs/ +/dsAutoCode/.idea/ +/dsAutoCode/build/ +/dsAutoCode/WinBuild/ +/dsAutoCode/lastupdate.log + +/dsBaseWeb/.idea/ +/dsBaseWeb/build/ +/dsBaseWeb/WinBuild/ +/dsBaseWeb/Logs/ +/dsBaseWeb/dsBaseRpc.log + +/dsData/.idea/ +/dsData/build/ +/dsData/WinBuild/ +/dsData/Logs/ + +/dsSso/.idea/ +/dsSso/build/ +/dsSso/WinBuild/ +/dsSso/Logs/ + +/dsTools/.idea/ +/dsTools/build/ +/dsTools/WinBuild/ + +/dsWatch/.idea/ +/dsWatch/build/ +/dsWatch/WinBuild/ +/dsBaseRpc/Java调用示例/JavaGRpc/target/ +/dsWatch/Logs/ + +/dsAutoCode/.idea/ +/dsSupport/Source/ +/dsSupport/Target/ diff --git a/dsSupport/.idea/.gitignore b/dsSupport/.idea/.gitignore new file mode 100644 index 00000000..4aa91ea5 --- /dev/null +++ b/dsSupport/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/dsSupport/.idea/dsSupport.iml b/dsSupport/.idea/dsSupport.iml new file mode 100644 index 00000000..338a2663 --- /dev/null +++ b/dsSupport/.idea/dsSupport.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/dsSupport/.idea/misc.xml b/dsSupport/.idea/misc.xml new file mode 100644 index 00000000..ef004d16 --- /dev/null +++ b/dsSupport/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/dsSupport/.idea/modules.xml b/dsSupport/.idea/modules.xml new file mode 100644 index 00000000..d8eaf8d9 --- /dev/null +++ b/dsSupport/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/dsSupport/.idea/vcs.xml b/dsSupport/.idea/vcs.xml new file mode 100644 index 00000000..2e3f6920 --- /dev/null +++ b/dsSupport/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/dsSupport/ConvertMovie/Convert.go b/dsSupport/ConvertMovie/Convert.go new file mode 100644 index 00000000..d86235f0 --- /dev/null +++ b/dsSupport/ConvertMovie/Convert.go @@ -0,0 +1,35 @@ +package main + +import ( + "fmt" + "os" + "os/exec" + "path/filepath" + "strings" +) + +func main(){ + dir, _ := os.Getwd() + + //1、视频文件名称 + movie:=dir+"/Source/1.wmv" + //2、输出的文件通配名称 + target:=dir+`/Target/piece_%03d.wmv` + + //3、对视频文件进行切片 + cmdLine:=dir+`\ffmpeg\ffmpeg.exe -fflags +genpts -i `+movie+` -acodec copy -vcodec copy -f segment -segment_time 300 -reset_timestamps 1 -map 0:0 -map 0:1 `+target + cmd := exec.Command("cmd.exe", "/c", "start " + cmdLine) + err := cmd.Run() + fmt.Printf("%s, error:%v \n", cmdLine, err) + + //4、切片完成后,尝试进行转码 + //获取当前目录下的文件或目录名(包含路径) + filepathNames,_ := filepath.Glob(filepath.Join(dir+`/Target`,"*")) + for i := range filepathNames { + cmdLine=dir+`\ffmpeg\ffmpeg.exe -i `+filepathNames[i]+` -c:v libx264 -strict -2 `+strings.Replace(filepathNames[i],".wmv",".mp4",-1) + cmd = exec.Command("cmd.exe", "/c", "start " + cmdLine) + err = cmd.Run() + fmt.Printf("%s, error:%v \n", cmdLine, err) + } +} + diff --git a/dsSupport/Source/1.wmv b/dsSupport/Source/1.wmv new file mode 100644 index 00000000..7c18a2a3 Binary files /dev/null and b/dsSupport/Source/1.wmv differ diff --git a/dsSupport/ffmpeg/ffmpeg.exe b/dsSupport/ffmpeg/ffmpeg.exe new file mode 100644 index 00000000..84b1819a Binary files /dev/null and b/dsSupport/ffmpeg/ffmpeg.exe differ