VideoTools/internal/utils/exec_unix.go
Stu Leak c6fc48eb97 fix: suppress ffmpeg popups on Windows and improve codec performance
- Fixed Windows ffmpeg.exe popups by adding //go:build tags and exporting CreateCommand/CreateCommandRaw properly
- Use utils.GetFFmpegPath(), GetFFprobePath(), GetFFplayPath() instead of hardcoded strings
- Switch AV1 codec to H.264 for better performance (AV1/libsvtav1 is extremely slow)
- Minor UI component refinements (padding, SetMinSize)
2026-01-02 15:22:13 -05:00

26 lines
1.0 KiB
Go

//go:build !windows
package utils
import (
"context"
"os/exec"
)
// CreateCommand is a platform-specific implementation for Unix-like systems (Linux, macOS).
// On these systems, external commands generally do not spawn new visible console windows
// unless explicitly configured to do so by the user's terminal environment.
// No special SysProcAttr is typically needed for console hiding on Unix.
func CreateCommand(ctx context.Context, name string, arg ...string) *exec.Cmd {
// For Unix-like systems, exec.CommandContext typically does not create a new console window.
// We just return the standard command.
return exec.CommandContext(ctx, name, arg...)
}
// CreateCommandRaw is a platform-specific implementation for Unix-like systems, without a context.
// No special SysProcAttr is typically needed for console hiding on Unix.
func CreateCommandRaw(name string, arg ...string) *exec.Cmd {
// For Unix-like systems, exec.Command typically does not create a new console window.
// We just return the standard command.
return exec.Command(name, arg...)
}