How to convert WMA lossless to FLAC?

5,504

Solution 1

To convert WMA to FLAC, you could try soundconverter, a graphical application, but it allows to add multiple files and directories. It keeps the metadata if the output format supports it. To install it enter into your terminal this: sudo apt-get install soundconverter

Solution 2

I've used avconv with great success. It's a command-line utility and has a vast number of options.

The avconv utility is provided by the libav-tools Install libav-tools package (starting in Ubuntu 12.04). To install that, click that link or run:

sudo apt-get update && sudo apt-get install libav-tools

I needed only the most basic conversion of WMA to FLAC (the same as you're asking for). To do that with avconv

avconv -i <input-filename.wma> <output-filename.flac>

For more information, see man avconv.

To convert all WMA files inside a directory, you can use the following script:

for file in *.wma; do avconv -i "${file}" "${file%%.wma}.flac"; done
Share:
5,504
Adam Matan
Author by

Adam Matan

Team leader, developer, and public speaker. I build end-to-end apps using modern cloud infrastructure, especially serverless tools. My current position is R&amp;D Manager at Corvid by Wix.com, a serverless platform for rapid web app generation. My CV and contact details are available on my Github README.

Updated on September 18, 2022

Comments

  • Adam Matan
    Adam Matan over 1 year

    I have some CDs that I want to convert to FLAC. Banshee can't find their metadata, but Windows Media Player can.

    I figured there are two workarounds:

    • Rip all CDs using Windows Media Player WMA-lossless, and batch-convert to FLAC with metadata.
    • Tweak Banshee to connect to Windows Media Player metadata sources

    Any ideas how to do it? I'm preferably looking for a command-line method.

  • bomben
    bomben about 3 years
    Great answer, however, the flac is 10 times larger than the wma file...