diff options
Diffstat (limited to 'ffmpeg.go')
-rw-r--r-- | ffmpeg.go | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -6,6 +6,16 @@ import ( ffmpeg "github.com/u2takey/ffmpeg-go" ) +func buildFFmpegCall(ut *Utterance) string { + return fmt.Sprintf( + `yes no | ffmpeg -i "%s" -ss %s -to %s \ + -metadata text_source="%s" \ + -ar 22050 "%s"`, + ut.FD.AudioPath, ut.LeftTime, ut.RightTime, + ut.FD.VttPath, ut.OutPath, + ) +} + func cutoutClipAndTranscode(ut *Utterance) error { err := ffmpeg.Input(ut.FD.AudioPath, ffmpeg.KwArgs{ @@ -19,9 +29,9 @@ func cutoutClipAndTranscode(ut *Utterance) error { return err } -func cutOnEqualParts(filepath, segment string) error { +func cutOnEqualParts(filepath, outname, segment string) error { err := ffmpeg.Input(filepath). - Output(filepath+"%03d.opus", + Output(outname+"%02d.opus", ffmpeg.KwArgs{ "c": "copy", "map": 0, |