FFmpeg-iOS icon indicating copy to clipboard operation
FFmpeg-iOS copied to clipboard

How do I convert a flac file to wav?

Open progressiveCaveman opened this issue 8 years ago • 2 comments

I just pulled this down through cocoapods, but the only way I know how to use FFMPEG is through something like ffmpeg -i inputfile.flac output.wav. I am trying to convert a flac file to wav, how can I do this? If there's not a simple answer to this, where in the code should I investigate?

progressiveCaveman avatar May 12 '17 13:05 progressiveCaveman

@popctrl did you succeed with this?

zsoltbalint avatar Jun 08 '17 05:06 zsoltbalint

Yes I did. I ended up implementing the same functionality without the ffmpeg.c file. These two links were key:

  • For decoding the audio https://blinkingblip.wordpress.com/2011/10/08/decoding-and-playing-an-audio-stream-using-libavcodec-libavformat-and-libao/
  • For writing the WAV header/file https://stackoverflow.com/questions/28231198/how-to-add-playablesuch-as-wav-wmv-header-with-pcm-data-buffer-in-ios

progressiveCaveman avatar Jun 08 '17 14:06 progressiveCaveman