Skip to content

Instantly share code, notes, and snippets.

@fresonn
fresonn / .go
Last active October 5, 2022 18:29
Process audio by ffmpeg in Golang
tempDirLoc := os.TempDir()
tempFile, err := os.CreateTemp(tempDirLoc, "audio-*.mp3")
if err != nil {
fmt.Println(err)
}
defer tempFile.Close()
fileBytes, err := io.ReadAll(input.Audiofile.File) // from multipart form
if err != nil {