Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opus file to mp3 - opus codec not supported in WAVE format. #19

Open
Aviv1236 opened this issue Mar 14, 2017 · 1 comment
Open

opus file to mp3 - opus codec not supported in WAVE format. #19

Aviv1236 opened this issue Mar 14, 2017 · 1 comment

Comments

@Aviv1236
Copy link

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

  1. convert opus file to ogg but not for mp3/wav
  2. 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 ?? "")

    }
    
}
@Aviv1236
Copy link
Author

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant