refactor ffmpeg, download styling

This commit is contained in:
Carl Pearson
2024-10-14 05:36:34 -06:00
parent ccd21636cf
commit 30a2407e46
11 changed files with 145 additions and 71 deletions

View File

@@ -2,7 +2,6 @@ package ytdlp
import (
"bytes"
"fmt"
"os/exec"
"strings"
)
@@ -25,11 +24,3 @@ func Run(args ...string) ([]byte, []byte, error) {
log.Infoln("stderr:", stderr.String())
return stdout.Bytes(), stderr.Bytes(), err
}
func Clip(src, dst string, from, to float64) error {
_, _, err := Run("-i", src,
"-ss", fmt.Sprintf("%f", from),
"-to", fmt.Sprintf("%f", to),
dst)
return err
}