Skip to content

Commit

Permalink
We do not need to touch the file anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
COMTOP1 committed Feb 17, 2024
1 parent 92c7a84 commit 3da210a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions recorder/recorder_start.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 3da210a

Please sign in to comment.