remove temporary files.txt after ffmpeg run
This commit is contained in:
parent
45db651388
commit
4752e4bf4c
1 changed files with 6 additions and 0 deletions
|
|
@ -3,6 +3,7 @@ package video
|
|||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"path"
|
||||
"strconv"
|
||||
|
|
@ -64,6 +65,11 @@ func ConcatVideo(video *youtube.Video, vodFiles []string, verbose bool) (int64,
|
|||
return 0, fmt.Errorf("ffmpeg error: %v", err)
|
||||
}
|
||||
|
||||
if err = os.Remove(fileListPath); err != nil {
|
||||
log.Fatalf("Failed to remove temporary file list: %v", err)
|
||||
// not the end of the world; move along
|
||||
}
|
||||
|
||||
fileInfo, err := os.Stat(video.Filename)
|
||||
if err != nil { return 0, fmt.Errorf("failed to read output file: %v", err) }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue