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 }