From 076947ebf93e18f933fbd42d7bb01db695e959e5 Mon Sep 17 00:00:00 2001 From: Gregory Ballantine Date: Sat, 3 Sep 2022 19:55:50 -0400 Subject: [PATCH] Fixed the transcode job to rename the output file to the proper extension --- transcoder/transcoder.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/transcoder/transcoder.go b/transcoder/transcoder.go index e0a7568..d882da8 100644 --- a/transcoder/transcoder.go +++ b/transcoder/transcoder.go @@ -6,6 +6,7 @@ import ( "os" "os/exec" "path/filepath" + "strings" "time" "github.com/spf13/viper" @@ -58,7 +59,8 @@ func (t *Transcoder) Start() { func (t *Transcoder) Transcode(inFile string) { // create ingest and archive paths ingestPath := filepath.Join(t.repo.GetIngestPath(), inFile) - outputPath := filepath.Join(t.repo.GetOutputPath(), inFile) + outputName := strings.Join([]string{util.FilenameWithoutExtension(inFile), viper.GetString("transcoder.video_format")}, ".") + outputPath := filepath.Join(t.repo.GetOutputPath(), outputName) log.Printf("Transcoding video file %s.", ingestPath)