Add optional yt-dlp output to stderr
This commit is contained in:
@@ -30,8 +30,9 @@ func (l goYouTubeDLLogger) Print(v ...interface{}) {
|
|||||||
|
|
||||||
func (d *Downloader) downloadURL(dlCtx context.Context, url string) (rr *ReReadCloser, err error) {
|
func (d *Downloader) downloadURL(dlCtx context.Context, url string) (rr *ReReadCloser, err error) {
|
||||||
result, err := goutubedl.New(dlCtx, url, goutubedl.Options{
|
result, err := goutubedl.New(dlCtx, url, goutubedl.Options{
|
||||||
Type: goutubedl.TypeSingle,
|
Type: goutubedl.TypeSingle,
|
||||||
DebugLog: goYouTubeDLLogger{},
|
DebugLog: goYouTubeDLLogger{},
|
||||||
|
// StderrFn: func(cmd *exec.Cmd) io.Writer { return io.Writer(os.Stdout) },
|
||||||
MergeOutputFormat: "mkv", // This handles VP9 properly. yt-dlp uses mp4 by default, which doesn't.
|
MergeOutputFormat: "mkv", // This handles VP9 properly. yt-dlp uses mp4 by default, which doesn't.
|
||||||
SortingFormat: "res:720", // Prefer videos no larger than 720p to keep their size small.
|
SortingFormat: "res:720", // Prefer videos no larger than 720p to keep their size small.
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user