Linux Convert mp3 to WAV

Source: Internet
Author: User

link:https://www.cyberciti.biz/faq/convert-mp3-files-to-wav-files-in-linux/

Install mpg321 or mpg123

Type the following command under Debian/ubuntu Linux, enter:

sudo Install mpg321

OR

sudo Install mpg123

I recommend using mpg123 as it is updated frequently.

Install mpg123 under Centos/rhel/fedora Linux

Turn on Rpmforge repo and type the following command:

Install mpg123
Convert an MP3 to WAV

THE-W option would convert an. mp3 file to. wav file. The syntax is:

Mpg123-w output.wav Input.mp3

OR

mpg321-w output.wav Input.mp3
A Sample Shell Script Helper Function

Add the following to your ~/.BASHRC startup file (tested with bash v3.x+):

mp3towav () {[[$#-eq0]] && {Echo "mp3wav Mp3file"; Exit1; }  forIinch "[email protected]"     Do# Create. wavfilename Local out="${i%/*}.wav"        [[ -F"$i"]] && {Echo-N"processing ${i} ..."; Mpg123-W "${out}" "$i"&>/dev/NULL&&Echo "Done ."||Echo "failed."; }  Done}

Use it as follows:

Mp3towav *"This isa Test.mp3"ls *.wav

Linux Convert mp3 to WAV

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.