mirror of
https://github.com/EvolutionAPI/evolution-audio-converter.git
synced 2025-07-13 15:14:50 -06:00
add more formats
This commit is contained in:
parent
0a14e6b2db
commit
733d5df5ab
6
main.go
6
main.go
@ -84,6 +84,12 @@ func convertAudio(inputData []byte, inputFormat string, outputFormat string) ([]
|
||||
cmd = exec.Command("ffmpeg", "-i", "pipe:0", "-f", "mp3", "pipe:1")
|
||||
case "wav":
|
||||
cmd = exec.Command("ffmpeg", "-i", "pipe:0", "-f", "wav", "pipe:1")
|
||||
case "aac":
|
||||
cmd = exec.Command("ffmpeg", "-i", "pipe:0", "-c:a", "aac", "-b:a", "128k", "-f", "adts", "pipe:1")
|
||||
case "amr":
|
||||
cmd = exec.Command("ffmpeg", "-i", "pipe:0", "-c:a", "libopencore_amrnb", "-b:a", "12.2k", "-f", "amr", "pipe:1")
|
||||
case "m4a":
|
||||
cmd = exec.Command("ffmpeg", "-i", "pipe:0", "-c:a", "aac", "-b:a", "128k", "-f", "ipod", "pipe:1")
|
||||
default:
|
||||
cmd = exec.Command("ffmpeg", "-i", "pipe:0", "-c:a", "libopus", "-b:a", "16k", "-vbr", "on", "-compression_level", "10", "-ac", "1", "-ar", "16000", "-f", "ogg", "pipe:1")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user