First build
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
/build/**
|
||||
/lib/yt-dlp
|
||||
@@ -0,0 +1,6 @@
|
||||
[submodule "lib/sys"]
|
||||
path = lib/sys
|
||||
url = https://go.googlesource.com/sys
|
||||
[submodule "lib/fsnotify"]
|
||||
path = lib/fsnotify
|
||||
url = https://github.com/fsnotify/fsnotify.git
|
||||
Binary file not shown.
Binary file not shown.
Submodule
+1
Submodule lib/fsnotify added at 20b1e15ef3
Submodule
+1
Submodule lib/sys added at 99666ae32e
+10
-7
@@ -39,6 +39,9 @@ import (
|
||||
// ── Configuration ──────────────────────────────────────────────────────────────
|
||||
|
||||
const (
|
||||
ffmpegBin = `C:\Users\x119877\ffmpeg\bin\ffmpeg.exe`
|
||||
ffprobeBin = `C:\Users\x119877\ffmpeg\bin\ffprobe.exe`
|
||||
|
||||
frameInterval = 5 // Extract one key frame every N seconds
|
||||
panelWidth = 320 // Each filmstrip panel width in px
|
||||
panelHeight = 240 // Each filmstrip panel height in px
|
||||
@@ -56,8 +59,8 @@ const (
|
||||
vignetteAngle = "PI/4"
|
||||
|
||||
defaultExhibit = "Stories from the Community"
|
||||
fontBold = "/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf"
|
||||
fontRegular = "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf"
|
||||
fontBold = `../lib/fonts/DejaVuSans-Bold.ttf`
|
||||
fontRegular = `../lib/fonts/DejaVuSans.ttf`
|
||||
)
|
||||
|
||||
// videoExtensions that trigger the watch pipeline
|
||||
@@ -99,7 +102,7 @@ func run(label string, name string, args ...string) {
|
||||
// probeFormat returns the "format" section from ffprobe as a map.
|
||||
func probeFormat(path string) map[string]interface{} {
|
||||
out, err := exec.Command(
|
||||
"ffprobe", "-v", "quiet", "-print_format", "json",
|
||||
ffprobeBin, "-v", "quiet", "-print_format", "json",
|
||||
"-show_format", "-show_streams", path,
|
||||
).Output()
|
||||
if err != nil {
|
||||
@@ -167,7 +170,7 @@ func extractFrames(inputPath, framesDir string) []string {
|
||||
panelWidth, panelHeight,
|
||||
panelWidth, panelHeight,
|
||||
)
|
||||
run("", "ffmpeg", "-y", "-i", inputPath,
|
||||
run("", ffmpegBin, "-y", "-i", inputPath,
|
||||
"-vf", vf, "-q:v", "2",
|
||||
filepath.Join(framesDir, "frame_%04d.jpg"),
|
||||
)
|
||||
@@ -245,7 +248,7 @@ func buildFilmstrip(frames []string, tmpDir string) (stripPath string, stripW, s
|
||||
stripPath,
|
||||
)
|
||||
|
||||
run("Stitching panels with hstack…", "ffmpeg", args...)
|
||||
run("Stitching panels with hstack…", ffmpegBin, args...)
|
||||
return stripPath, stripW, stripH
|
||||
}
|
||||
|
||||
@@ -309,7 +312,7 @@ func composite(
|
||||
}, ";")
|
||||
|
||||
run("Rendering composite (this may take a while)…",
|
||||
"ffmpeg", "-y",
|
||||
ffmpegBin, "-y",
|
||||
"-i", inputPath,
|
||||
"-i", stripPath,
|
||||
"-filter_complex", filterComplex,
|
||||
@@ -328,7 +331,7 @@ func composite(
|
||||
func archiveCopy(displayPath, archivePath string) {
|
||||
log.Println("\n[4/5] Writing archive copy (ProRes HQ)...")
|
||||
run("",
|
||||
"ffmpeg", "-y",
|
||||
ffmpegBin, "-y",
|
||||
"-i", displayPath,
|
||||
"-c:v", "prores_ks", "-profile:v", "3",
|
||||
"-c:a", "pcm_s16le",
|
||||
|
||||
+10
-3
@@ -1,7 +1,14 @@
|
||||
module booth
|
||||
|
||||
go 1.26
|
||||
go 1.25.0
|
||||
|
||||
require github.com/fsnotify/fsnotify v1.10.1
|
||||
require github.com/fsnotify/fsnotify v1.7.0
|
||||
|
||||
require golang.org/x/sys v0.44.0 // indirect
|
||||
require golang.org/x/sys v0.35.0 // indirect
|
||||
|
||||
// Replace directives point the module resolver to your local copies.
|
||||
// Paths are relative to this go.mod file — adjust if your layout differs.
|
||||
replace (
|
||||
github.com/fsnotify/fsnotify => ../lib/fsnotify
|
||||
golang.org/x/sys => ../lib/sys
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user