Skip to content

Commit

Permalink
Return full path not just the folder
Browse files Browse the repository at this point in the history
  • Loading branch information
KillerX committed Apr 30, 2024
1 parent 31ff5b5 commit c760aa0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion services/transcode/multitrack.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit c760aa0

Please sign in to comment.