Skip to content

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

@Aviv1236

Description

@Aviv1236

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 ?? "")

    }
    
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions