updated
This commit is contained in:
parent
596b8389fb
commit
e9126e34f0
18
main.go
18
main.go
@ -7,9 +7,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"path/filepath"
|
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
|
"path/filepath"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
@ -83,14 +83,24 @@ func main() {
|
|||||||
|
|
||||||
// Falls nicht bereits .mp4 als Endung existiert
|
// Falls nicht bereits .mp4 als Endung existiert
|
||||||
if ext != ".mp4" {
|
if ext != ".mp4" {
|
||||||
mp4Out = strings.TrimSuffix(outputPath, ext) + ".mp4"
|
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)
|
fmt.Println("⚠️ Fehler bei Umwandlung in MP4:", err)
|
||||||
} else {
|
} else {
|
||||||
fmt.Println("✅ Umwandlung abgeschlossen:", mp4Out)
|
fmt.Println("✅ Umwandlung abgeschlossen (web-optimiert):", mp4Out)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- helper ---
|
// --- helper ---
|
||||||
|
|||||||
BIN
recorder.exe
BIN
recorder.exe
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user