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)