This commit is contained in:
Linrador 2025-08-13 07:14:07 +02:00
parent 596b8389fb
commit e9126e34f0
2 changed files with 14 additions and 4 deletions

16
main.go
View File

@ -7,9 +7,9 @@ import (
"fmt"
"io"
"net/http"
"path/filepath"
"os"
"os/exec"
"path/filepath"
"regexp"
"strconv"
"strings"
@ -86,11 +86,21 @@ func main() {
mp4Out = strings.TrimSuffix(outputPath, ext) + ".mp4"
}
if err := exec.Command("ffmpeg", "-y", "-i", outputPath, "-c", "copy", mp4Out).Run(); err != nil {
if err := exec.Command(
"ffmpeg",
"-y",
"-i", outputPath,
"-c:v", "copy",
"-c:a", "copy",
"-bsf:a", "aac_adtstoasc",
"-movflags", "+faststart",
mp4Out,
).Run(); err != nil {
fmt.Println("⚠️ Fehler bei Umwandlung in MP4:", err)
} else {
fmt.Println("✅ Umwandlung abgeschlossen:", mp4Out)
fmt.Println("✅ Umwandlung abgeschlossen (web-optimiert):", mp4Out)
}
}
// --- helper ---

Binary file not shown.