feat(app): add internal components batch 4

This commit is contained in:
吴璨
2026-09-30 10:20:08 +08:00
parent 713098f5b7
commit 4ec1f85bbc
10 changed files with 1374 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
package app
import (
"context"
"os"
"os/exec"
"strings"
)
func ffmpegMediaCommand(ctx context.Context, executable string, args ...string) *exec.Cmd {
command := exec.CommandContext(ctx, executable, args...)
command.Env = make([]string, 0, len(os.Environ()))
for _, entry := range os.Environ() {
key, _, _ := strings.Cut(entry, "=")
switch strings.ToLower(key) {
case "http_proxy", "https_proxy", "all_proxy":
continue
}
command.Env = append(command.Env, entry)
}
return command
}