code cleanup

This commit is contained in:
stefanodvx 2025-04-24 12:20:35 +02:00
parent 917be1687f
commit 5336968e05
34 changed files with 193 additions and 115 deletions

View file

@ -0,0 +1,23 @@
package av
import (
ffmpeg "github.com/u2takey/ffmpeg-go"
)
func AudioFromVideo(videoPath string, audioPath string) error {
err := ffmpeg.
Input(videoPath).
Output(audioPath, ffmpeg.KwArgs{
"map": "a",
"vn": nil,
"f": "mp3",
"ab": "128k",
}).
Silent(true).
OverWriteOutput().
Run()
if err != nil {
return err
}
return nil
}