LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Thread Tools Search this Thread
Old 06-24-2005, 12:11 PM   #1
lumpfish
Member
 
Registered: Sep 2002
Location: Halifax Nova Scotia, Canada
Distribution: Arch Linux 0.7
Posts: 38
Thanked: 0
Reduce MP3 bitrate


[Log in to get rid of this advertisement]
I have a bunch of mp3's that I would reduce the bitrate of. Wondering of a tool to use to accomplish this? I would like to retain them as mp3's just bring down the size from 512 to 128.
lumpfish is offline     Reply With Quote
Old 06-25-2005, 06:24 AM   #2
mmmm
Member
 
Registered: Oct 2004
Location: Poland
Distribution: Slack 10.1, Mandrake 10.1
Posts: 118
Thanked: 0
You need lame - mp3 coder. You can download it on http://lame.sourceforge.net/ . Then to every file you need :
1. Uncompress to wave - lame --decode <file>
2. Compress to mp3 with bitrate 128 - lame -b 128 <wav file>
Then put this in for (or foreach) in bash script
mmmm is offline     Reply With Quote
Old 06-25-2005, 07:02 AM   #3
mmmm
Member
 
Registered: Oct 2004
Location: Poland
Distribution: Slack 10.1, Mandrake 10.1
Posts: 118
Thanked: 0
Ok : Put all mp3 files in one directory. Cd to this directory . Put in bash script :

#!/bin/bash

for file in `ls`
do
file=`echo $file | sed s/\ /_/g`
echo $file
lame --decode $file
lame -b 128 $file.wav
rm $file
rm $file.wav
mv $file.wav.mp3 $file
done

It will recode EVERY file in this directory, So here should be only mp3's. WARNING : It doesn't work when names of files contains " " (space) !!
mmmm is offline     Reply With Quote
Old 10-26-2009, 05:49 AM   #4
shaakunthala
LQ Newbie
 
Registered: Dec 2008
Location: Ambalangoda, Sri Lanka
Distribution: Fedora, Ubuntu
Posts: 11
Thanked: 0
Lightbulb Better Sccript

The following script would do a favour:

http://www.4shared.com/file/14371378...c9/mp3enc.html
linuxubuntu shaakunthala is offline     Reply With Quote
Old 10-26-2009, 05:59 AM   #5
shaakunthala
LQ Newbie
 
Registered: Dec 2008
Location: Ambalangoda, Sri Lanka
Distribution: Fedora, Ubuntu
Posts: 11
Thanked: 0
Thumbs up

Quote:
Originally Posted by shaakunthala View Post
The following script would do a favour:

http://www.4shared.com/file/14371378...c9/mp3enc.html
Sorry, I forgot to put the usage,

$ ./mp3enc.sh <directory where your mp3 files are> <bitrate in kbps>

You'll get the processed output inside <directory where your mp3 files are>/output
This script does not recurse into subdirectories.
linuxubuntu shaakunthala is offline     Reply With Quote
Old 10-26-2009, 06:17 AM   #6
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 7,100
Blog Entries: 2
Thanked: 249
I recommend the "-V2" option, but some old or crappy mp3 players don't support variable bitrate.
linuxslackware H_TeXMeX_H is offline     Reply With Quote

Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Enconding MP3 to lower bitrate Gonto Linux - Software 2 07-20-2005 05:50 AM
Changing bitrate on XAudioCreator mark.johnson Linux - Software 5 03-29-2005 05:44 PM
How do I find out the bitrate of an mp3? redhatman Linux - Newbie 3 07-05-2004 09:40 PM
abcde Ogg Bitrate voodoothunder Linux - Software 0 07-11-2003 11:18 AM
Covert Bitrate of MP3's DiZASTiX Linux - Software 5 05-19-2003 07:24 PM


All times are GMT -5. The time now is 05:27 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Advertisement
Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Click Here to receive a complimentary subscription courtesy of LQ.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration