(video string)
| 31 | return buf2 |
| 32 | } |
| 33 | func 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 | } |
| 40 | func 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" |