After a recent hop to Ubuntu MATE 16.04 and using it comfortably for quite some time, I finally hit my first snag. Seems SoundConverter has issues when converting m4a files to mp3. I use Soundconverter for batch conversions and was quite happy with the way it worked. But on Ubuntu 16.04, it seems to have issues installing the right version of gstreamer required to convert files to mp3. Attempts to install gstreamer mp3 plugin seperately also failed miserably. All said and done, I still could not use SoundConverter as intended to convert few m4a audio files to mp3 format.
While searching around for answers, I came across a blog post which advocated use of the Perl Audio Converter. It was a good alternative to the SoundConverter sans the UI. Though being a command line program, the Perl Audio Converter promised to be very versatile and easy to use.
It is available in the debian repositories and can be installed with command
sudo apt-get install pacpl
PACPL site gives some more information about their program like so – Perl Audio Converter is a tool for converting multiple audio types from one format to another. It supports AAC, AC3, AIFF, APE, AU, AVR, BONK, CAF, CDR, FAP, FLA, FLAC, IRCAM, LA, LPAC, M4A, MAT, MAT4, MAT5, MMF, MP2, MP3, MP4, MPC, MPP, NIST, OFR, OFS, OGG, PAC, PAF, PVF, RA, RAM, RAW, SD2, SF, SHN, SMP, SND, SPX, TTA, VOC, W64, WAV, WMA, and WV. It can also convert audio from the following video formats: RM, RV, ASF, DivX, MPG, MKV, MPEG, AVI, MOV, OGM, QT, VCD, SVCD, M4V, NSV, NUV, PSP, SMK, VOB, FLV, and WMV.
Looks to me that it can do pretty much everything. To convert a bunch of m4a files in a folder to mp3, I simply used the command
pacpl -t mp3 –bitrate 192 -r ./ –normalize –delete
This command will convert everything below the ./ current path and transcode every audio file (regardless of file type) into MP3 (-t mp3) at a bitrate of 192 (–bitrate 192). The -r will do this job recursively from the current directory. It will also normalize (–normalize) each file and then delete (–delete) the original source/input file.
That’s all there is to using this utility. To make things simpler I created an alias to the above command and added it to my ~/.profile file.
alias convert2mp3=”pacpl -t mp3 –bitrate 192 -r ./ –normalize –delete”
This nifty little program has made my script from this previous post obsolete. I no longer need to depend on ffmpeg or soundconverter installation for my audio format conversion needs.