Saturday, May 23, 2009

Compress Mp3 in Ubuntu

It is just simple bash script that can run in linux to compress a mp3 file to larger or smaller bitrate.
In windows I ussually use DBPowerAmp to compress a mp3 file format but I can't find similar program ini Linux (ubuntu) so I search in internet and found this script. It just need Lame installed on your system, do not need installation, just run this script in the folder where you saved your mp3 files.
It is as simple as :
mkdir ./compressed
for file in *.mp3; do lame --mp3input -b 32 "$file" "./compressed/$file"; done
Just copy this code and use your favourite text editor to paste in it and save in .sh extension.
To run this script you just need to copy this cript into folder where you save your mp3 and run from command line. it is very easy and fast.


GBU

Categories: , ,

Related Posts:

  • Android Programming - Override Options MenuTo override options menu simply add this code to your activity. @Override     public boolean onCreateOptionsMenu(Menu menu) {         MenuInflater inflater = getMenuInflater(); &n… Read More
  • Android Programming - Setting Up Your EnvironmentThis is my first article of Android Programming Series in my blog. I'll share you how to set up an environment to begin programming in Android. Actually it was easy and the Android Developer site have a full article about thi… Read More
  • Otak-atik Ubuntu 11.04Berawal dari setting VGA SiS itu, saya jadi terarik otak-atik si Ubuntu, sesuai dengan niatan juga untuk pindah framework pemrograman Eclipse saya ke Ubuntu, biar lebih terasa lagi opensourcenya.Karena tujuan awal memindahkan… Read More
  • Android Programming - Url ConnectThis the basis for web service. Android + Web Service is a future will be for me. With open platform you can access open information. That's really great I think. Simple, with a piece of code to access web service in Android,… Read More
  • Apakah Android Itu? !-- @page { margin: 0.79in } P { margin-bottom: 0.08in } -- Menurut Google IO 2010 : Opensource dan openplatform untuk pengembangan teknologi mobile SDK, API dan sourcecodenya tersedia u… Read More

2 komentar:

DBees said...

i am newbie in linux ubuntu 9.10, i've tried your instruction, but it didn't work, and there was notice as below:
bash: syntax error near unexpected token `do'

Johannes Dwi Cahyo Kristanto said...

Hi Ruhyat..i'm sorry for late response..
I think the problem is you do not have lame installed n your Ubuntu
Just install lame witn command from terminal..
Thx

Copyright © 2025 Johannes Dwi Cahyo | Powered by Blogger

Design by Anders Noren | Blogger Theme by NewBloggerThemes.com | BTheme.net      Up ↑