summaryrefslogtreecommitdiff
path: root/ffmpeg.go
diff options
context:
space:
mode:
Diffstat (limited to 'ffmpeg.go')
-rw-r--r--ffmpeg.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/ffmpeg.go b/ffmpeg.go
index e36c05b..7c5b6fd 100644
--- a/ffmpeg.go
+++ b/ffmpeg.go
@@ -18,3 +18,17 @@ func cutoutClipAndTranscode(ut *Utterance) error {
}).OverWriteOutput().ErrorToStdOut().Run()
return err
}
+
+func cutOnEqualParts(filepath, segment string) error {
+ err := ffmpeg.Input(filepath).
+ Output(filepath+"%03d.opus",
+ ffmpeg.KwArgs{
+ "c": "copy",
+ "map": 0,
+ "segment_time": segment,
+ "f": "segment",
+ "reset_timestamps": 1,
+ }).
+ OverWriteOutput().ErrorToStdOut().Run()
+ return err
+}