-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Description
I try to convert opus file to mp3/wav file
But I get this error:
opus codec not supported in WAVE format.
for example I can
- convert opus file to ogg but not for mp3/wav
- convert mp3 file to wav file
My code, can you please advise what I am do wrong?
Thanks
override func viewDidLoad() {
super.viewDidLoad()
input = Bundle.main.path(forResource: "example", ofType: "opus")
let documents = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0]
output = documents.appending("/result1.wav")
self.convertAudio()
}
func convertAudio(){
self.ff.convertInputPath(input, outputPath: output, options: nil, progressBlock: { (bytesRead :UInt, totalBytesRead : UInt64, totalBytesExpectedToRead : UInt64) in
print("OK")
}) { (value, error) in
print(error ?? "")
}
}
Metadata
Metadata
Assignees
Labels
No labels