feat: update

This commit is contained in:
yanghao05
2025-04-22 14:45:04 +08:00
parent fb8c9a68a4
commit b1f090918d
19 changed files with 43 additions and 35 deletions

View File

@@ -32,6 +32,9 @@ func GetMediaDuration(path string) (int64, error) {
func CutMedia(input, output string, start, end int64) error {
args := []string{
"-y",
"-hide_banner",
"-nostats",
"-v", "error",
"-ss", strconv.FormatInt(start, 10),
"-i", input,
"-t", strconv.FormatInt(end, 10),
@@ -46,6 +49,9 @@ func CutMedia(input, output string, start, end int64) error {
func GetFrameImageFromVideo(input, output string, time int64) error {
args := []string{
"-y",
"-hide_banner",
"-nostats",
"-v", "error",
"-i", input,
"-ss", strconv.FormatInt(time, 10),
"-vframes", "1",