diff --git a/main.go b/main.go index e4b8c3e..fd0d3ee 100644 --- a/main.go +++ b/main.go @@ -7,6 +7,7 @@ import ( "fmt" "io" "net/http" + "path/filepath" "os" "os/exec" "regexp" @@ -77,8 +78,14 @@ func main() { fmt.Println("❌ Aufnahmefehler:", err) } - // MP4 umwandeln - mp4Out := strings.TrimSuffix(outputPath, ".ts") + ".mp4" + mp4Out := outputPath + ext := filepath.Ext(outputPath) + + // Falls nicht bereits .mp4 als Endung existiert + if ext != ".mp4" { + mp4Out = strings.TrimSuffix(outputPath, ext) + ".mp4" + } + if err := exec.Command("ffmpeg", "-y", "-i", outputPath, "-c", "copy", mp4Out).Run(); err != nil { fmt.Println("⚠️ Fehler bei Umwandlung in MP4:", err) } else { diff --git a/recorder.exe b/recorder.exe index 8293809..4773972 100644 Binary files a/recorder.exe and b/recorder.exe differ