|
@@ -598,7 +598,7 @@ func Sha1(data string) string {
|
|
|
}
|
|
|
|
|
|
func GetVideoPlaySeconds(videoPath string) (playSeconds float64, err error) {
|
|
|
- cmd := `ffmpeg -i ` + videoPath + ` 2>&1 | grep 'Duration' | cut -d ' ' -f 4 | sed s/,//`
|
|
|
+ cmd := fmt.Sprintf(`ffmpeg -i %s 2>&1 | grep 'Duration' | cut -d ' ' -f 4 | sed s/,//`, videoPath)
|
|
|
out, err := exec.Command("bash", "-c", cmd).Output()
|
|
|
if err != nil {
|
|
|
return
|