diff --git a/recorder/recorder_start.go b/recorder/recorder_start.go index 07f1937..b51ca3e 100644 --- a/recorder/recorder_start.go +++ b/recorder/recorder_start.go @@ -138,13 +138,9 @@ func (v *Views) helperStart(transporter commonTransporter.Transporter, streamIn, // return fmt.Errorf("failed to run ffmpeg: %w", err) //} _ = ffmpeg.Stream{} - _, err := os.OpenFile(fmt.Sprintf("%s%s_%d.mkv", path, baseFileName, i), os.O_RDWR|os.O_CREATE, os.FileMode(0777)) - if err != nil { - return fmt.Errorf("failed to touch file: %w", err) - } c := exec.Command("ffmpeg", "-i", streamIn, "-f", "matroska", "-c", "copy", fmt.Sprintf("%s%s_%d.mkv", path, baseFileName, i)) log.Println(c.String()) - err = v.cache.Add(transporter.Unique, c, cache.NoExpiration) + err := v.cache.Add(transporter.Unique, c, cache.NoExpiration) if err != nil { return fmt.Errorf("failed to add command to cache: %w", err) }