Fixed the transcode job to rename the output file to the proper extension
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful

This commit is contained in:
Gregory Ballantine 2022-09-03 19:55:50 -04:00
parent 611d0dba9a
commit 076947ebf9

View File

@ -6,6 +6,7 @@ import (
"os" "os"
"os/exec" "os/exec"
"path/filepath" "path/filepath"
"strings"
"time" "time"
"github.com/spf13/viper" "github.com/spf13/viper"
@ -58,7 +59,8 @@ func (t *Transcoder) Start() {
func (t *Transcoder) Transcode(inFile string) { func (t *Transcoder) Transcode(inFile string) {
// create ingest and archive paths // create ingest and archive paths
ingestPath := filepath.Join(t.repo.GetIngestPath(), inFile) 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) log.Printf("Transcoding video file %s.", ingestPath)