|
|
@ -8,7 +8,7 @@ import ( |
|
|
|
"os" |
|
|
|
"os" |
|
|
|
"math/rand" |
|
|
|
"math/rand" |
|
|
|
"strings" |
|
|
|
"strings" |
|
|
|
"lcthw.dev/vidcrunch/config" |
|
|
|
"lcthw.dev/go/vidcrunch/config" |
|
|
|
"github.com/modfy/fluent-ffmpeg" |
|
|
|
"github.com/modfy/fluent-ffmpeg" |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
@ -81,7 +81,6 @@ func DevNull() string { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func RenderFile(pid int, path string, target string) { |
|
|
|
func RenderFile(pid int, path string, target string) { |
|
|
|
target = ModFile(target, config.Settings.Scale) |
|
|
|
|
|
|
|
Run(1, pid, path, DevNull()) |
|
|
|
Run(1, pid, path, DevNull()) |
|
|
|
Run(2, pid, path, DevNull()) |
|
|
|
Run(2, pid, path, DevNull()) |
|
|
|
Run(3, pid, path, target) |
|
|
|
Run(3, pid, path, target) |
|
|
@ -94,6 +93,7 @@ func RenderToDir() { |
|
|
|
for _, path := range matches { |
|
|
|
for _, path := range matches { |
|
|
|
base := filepath.Base(path) |
|
|
|
base := filepath.Base(path) |
|
|
|
target := filepath.Join(config.Settings.OutDir, base) |
|
|
|
target := filepath.Join(config.Settings.OutDir, base) |
|
|
|
|
|
|
|
target = ModFile(target, config.Settings.Scale) |
|
|
|
|
|
|
|
|
|
|
|
_, err := os.Stat(target) |
|
|
|
_, err := os.Stat(target) |
|
|
|
|
|
|
|
|
|
|
|