From c760aa00872da490e89390f08681a9c8bd111f45 Mon Sep 17 00:00:00 2001 From: Matjaz Debelak Date: Tue, 30 Apr 2024 09:40:39 +0200 Subject: [PATCH] Return full path not just the folder --- services/transcode/multitrack.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/services/transcode/multitrack.go b/services/transcode/multitrack.go index 1f6d5903..c64c22df 100644 --- a/services/transcode/multitrack.go +++ b/services/transcode/multitrack.go @@ -33,17 +33,20 @@ func MultitrackMux(files paths.Files, outputPath paths.Path, cb ffmpeg.ProgressC params = append(params, "-i", f.Local()) } + outputPath = outputPath.Append(files[0].Base() + ".mxf") + params = append(params, "-vf", fmt.Sprintf("scale=960:540:force_original_aspect_ratio=decrease,pad=960:540:(ow-iw)/2:(oh-ih)/2,drawtext=text=%s:fontsize=36:fontcolor=white:x=100:y=100", text), "-c:v", "libx264", "-c:a", "pcm_s24le", "-t", fmt.Sprintf("%f", info.TotalSeconds), - outputPath.Append(files[0].Base()+".mxf").Local(), + outputPath.Local(), ) _, err = ffmpeg.Do(params, ffmpeg.StreamInfo{}, cb) if err != nil { return nil, err } + return &outputPath, nil }