master
Bel LaPointe 2024-09-18 11:33:35 -04:00
parent 102df09caf
commit 6f0ce15715
2 changed files with 9 additions and 12 deletions

View File

@ -69,18 +69,13 @@ func Run(ctx context.Context, args []string) error {
outd := strings.ReplaceAll(cam, "record", "movement")
os.MkdirAll(outd, os.ModePerm)
cmd := exec.CommandContext(ctx,
"convert",
append(seriesFiles,
"-delay", "20", // 20 frames at 60fps
path.Join(outd, series+".gif"),
)...,
//"ffmpeg",
//"-y",
//"-framerate", "1",
//"-pattern_type", "glob",
//"-i", path.Join(cam, series)+".*.jpg",
//"-r", "3",
//path.Join(outd, series+".webm"),
"ffmpeg",
"-y",
"-framerate", "3",
"-pattern_type", "glob",
"-i", path.Join(cam, series)+".*.jpg",
"-r", "3",
path.Join(outd, series+".gif"),
)
if out, err := cmd.CombinedOutput(); err != nil {
return fmt.Errorf("failed to webm series %s: (%w) %s", series, err, out)

View File

@ -57,6 +57,8 @@ func TestRun(t *testing.T) {
} else if len(results) != 1 {
t.Fatal(results)
} else if path.Base(results[0]) != "series.webm" {
t.Error(results[0])
time.Sleep(time.Minute)
t.Fatal(results)
}