fix: probe issues

This commit is contained in:
Rogee
2025-03-31 15:09:12 +08:00
parent 2c7a873953
commit f52eab00b0
4 changed files with 21 additions and 4 deletions

View File

@@ -33,3 +33,19 @@ func Test_compressVideo(t *testing.T) {
})
})
}
func Test_runCommand(t *testing.T) {
Convey("runCommand", t, func() {
Convey("test ffprobe", func() {
file := "/mnt/yangpingliang/publish/原唱《义烈女》庄兄你一席话义重情长(杨红霞).mp4"
if _, err := os.Stat(file); os.IsNotExist(err) {
t.Fatalf("File does not exist: %s", file)
}
width, height, err := getVideoSize(file)
So(err, ShouldBeNil)
So(width, ShouldNotBeZeroValue)
So(height, ShouldNotBeZeroValue)
})
})
}