This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
package main
import (
"dsSupport/Utils/ConvertUtil"
)
func main() {
//源文件
source := "B7318F5D-46B8-4AA1-8811-1A9D65528E19.wmv"
//1、目录实始化
ConvertUtil.InitDir(source)
//2、对视频文件进行切片
ConvertUtil.Cut(source)
//2、切片完成后,尝试进行转码
var childMovie = ConvertUtil.GetAllCutChild(source)
for i := range childMovie {
ConvertUtil.ConvertToH264Mp4(childMovie[i])
}
//3、生成拼接的索引文件
ConvertUtil.GenerateIndexTxt(source, childMovie)
//4、合成MP4
ConvertUtil.Merge(source)
//5、清除垃圾
ConvertUtil.ClearRubbish(source)
//6、查看转换结果
ConvertUtil.ShowMovieInfo(source)
//7、转码为M3U8
ConvertUtil.ToM3u8(source)