diff --git a/ffmpeg.go b/ffmpeg.go index 35f42e8..13ecfbe 100644 --- a/ffmpeg.go +++ b/ffmpeg.go @@ -2,9 +2,11 @@ package main import ( ffmpeg "github.com/u2takey/ffmpeg-go" + "github.com/charmbracelet/log" ) func mergeStreams(path1 string, path2 string, format string, output string) (err error) { + log.Debugf("Merging \"%s\" and \"%s\" to \"%s\" using format \"%s\"", path1, path2, output, format) input := []*ffmpeg.Stream{ffmpeg.Input(path1), ffmpeg.Input(path2)} defaultArgs := ffmpeg.KwArgs{"c:v": "copy", "c:a": "copy", "format": format} diff --git a/file.go b/file.go index 15e3ff0..e884206 100644 --- a/file.go +++ b/file.go @@ -4,9 +4,10 @@ import ( "fmt" "os" "errors" + "io" - //"github.com/charmbracelet/log" + "github.com/charmbracelet/log" "github.com/h2non/filetype" ) diff --git a/ytva.go b/ytva.go index 19f86f3..ab1b226 100644 --- a/ytva.go +++ b/ytva.go @@ -126,7 +126,9 @@ func main() { } log.Infof("Downloading video: %s", v.Title) - downloadVideo(v.WebpageURL, path, group) + if err := downloadVideo(v.WebpageURL, path, group); err != nil { + log.Error(err) + } } } }