Added more logging
This commit is contained in:
parent
e10528b00c
commit
f25d9448c3
3 changed files with 7 additions and 2 deletions
|
@ -2,9 +2,11 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
ffmpeg "github.com/u2takey/ffmpeg-go"
|
ffmpeg "github.com/u2takey/ffmpeg-go"
|
||||||
|
"github.com/charmbracelet/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
func mergeStreams(path1 string, path2 string, format string, output string) (err error) {
|
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)}
|
input := []*ffmpeg.Stream{ffmpeg.Input(path1), ffmpeg.Input(path2)}
|
||||||
|
|
||||||
defaultArgs := ffmpeg.KwArgs{"c:v": "copy", "c:a": "copy", "format": format}
|
defaultArgs := ffmpeg.KwArgs{"c:v": "copy", "c:a": "copy", "format": format}
|
||||||
|
|
3
file.go
3
file.go
|
@ -4,9 +4,10 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"errors"
|
"errors"
|
||||||
|
"io"
|
||||||
|
|
||||||
|
|
||||||
//"github.com/charmbracelet/log"
|
"github.com/charmbracelet/log"
|
||||||
"github.com/h2non/filetype"
|
"github.com/h2non/filetype"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
4
ytva.go
4
ytva.go
|
@ -126,7 +126,9 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Infof("Downloading video: %s", v.Title)
|
log.Infof("Downloading video: %s", v.Title)
|
||||||
downloadVideo(v.WebpageURL, path, group)
|
if err := downloadVideo(v.WebpageURL, path, group); err != nil {
|
||||||
|
log.Error(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue