MCPcopy Create free account
hub / github.com/code-scan/AutoSubtitles / GetAudio

Function GetAudio

pkg/ffmpeg.go:33–39  ·  view source on GitHub ↗
(video string)

Source from the content-addressed store, hash-verified

31 return buf2
32}
33func GetAudio(video string) string {
34
35 name := path.Base(video)
36 cmd := "ffmpeg -y -i %s -ar 16000 output/%s_audio.wav"
37 Run(fmt.Sprintf(cmd, video, name))
38 return fmt.Sprintf("output/%s_audio.wav", name)
39}
40func MergeText(video string, textpath string) string {
41 name := path.Base(video)
42 cmd := "ffmpeg -y -i %s -vf subtitles=output/video.srt output/merge_%s.mp4"

Callers 1

mainFunction · 0.92

Calls 1

RunFunction · 0.85

Tested by

no test coverage detected